sql stringlengths 6 1.05M |
|---|
DELETE FROM `creature_loot_template` WHERE `entry`=50063;
INSERT INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
(50063, 67129, 4, 1, 0, 1, 1),
(50063, 67130, 4, 1, 0, 1, 1),
(50063, 67138, 4, 1, 0, 1, 1),
(50063, 69820, 4, 1, 0, 1, 1),
(... |
<filename>dj.sql
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 10, 2017 at 06:46 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT... |
-- In SQL92 DATE - DATE = INTEGER
-- DATE - INTERVAL = DATE
-- 1. 查询2011年进校年龄大于20岁的男学生的学号与姓名。
SELECT *
FROM s
WHERE csrq < DATE '2011-09-01' - INTERVAL '20 YEARS';
-- 2. 检索刘晓明不学的课程的课程号。
SELECT kh
FROM c
WHERE kh NOT IN (
SELECT kh
FROM e
WHERE xh = (
SELECT xh
FROM s
WHERE xm = '刘晓明... |
<gh_stars>0
use veritabani;
go
create procedure sp_koltuk_ekle
@koltuk_salon_id int,
@koltuk_no text
as
begin
insert into tbl_koltuk(koltuk_salon_id, koltuk_adi) values (@koltuk_salon_id,@koltuk_no)
end
go
exec sp_koltuk_ekle 1,'Emre' |
<reponame>chrisjdavis/habari-system-0.10.1-alpha
CREATE TABLE {$prefix}posts (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
slug VARCHAR(255) NOT NULL,
content_type SMALLINT UNSIGNED NOT NULL,
title VARCHAR(255) NOT NULL,
guid VARCHAR(255) NOT NULL,
content LONGTEXT NOT NULL,
cached_content LONGTEXT NOT NULL,... |
<reponame>collinsrj/i18n-book-spring<gh_stars>0
-- Locality and region from https://github.com/patch/i18n-testing/blob/master/personal-names.tsv
-- Street address random
insert into address (streetAddress,locality, region, country) values ()
values ("9454 Lafayette Street", "ʻEwa Gentry", "Hawaiʻi","US");
values ("379... |
select count(*) from
movie_companies AS mc
join company_type AS ct on (ct.kind = 'production companies' AND ct.id = mc.company_type_id and (mc.note NOT LIKE '%(as Metro-Goldwyn-Mayer Pictures)%' AND mc.note LIKE '%(co-production)%'))
join title AS t on (t.production_year >2010 AND t.id = mc.movie_id)
join
(select mo... |
<reponame>ChiranjivMalhi/web
-- Add indexes to the mime types in image for use on Special:MIMEsearch,
-- changes a query like
--
-- SELECT img_name FROM image WHERE img_major_mime = "image" AND img_minor_mime = "svg";
-- from:
-- +-------+------+---------------+------+---------+------+------+-------------+
-- | table |... |
<filename>db.sql
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE commands (
id INTEGER NOT NULL,
device_id INTEGER,
target_name VARCHAR(256),
function_name VARCHAR(256),
ir_command VARCHAR(512),
PRIMARY KEY (id),
FOREIGN KEY(device_id) REFERENCES devices (id)
);
INSERT INTO commands VALUES(1,1,'テレビ','電源... |
<reponame>ma110y/yii2
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Авг 31 2018 г., 00:07
-- Версия сервера: 5.6.38
-- Версия PHP: 5.6.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... |
DROP MATERIALIZED VIEW IF EXISTS scorecomp CASCADE;
CREATE MATERIALIZED VIEW scorecomp as
with temp as(
select
coalesce(cv.icustay_id, mv.icustay_id) as icustay_id,
coalesce(cv.day,mv.day) as day
, coalesce(cv.rate_norepinephrine, mv.rate_norepinephrine) as rate_norepinephrine
, coalesce(cv.rate_epinephrine, ... |
<filename>tests/data/test.sql
DROP DATABASE IF EXISTS harbortest;
CREATE DATABASE harbortest;
USE harbortest;
CREATE TABLE npm (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(40) NOT NULL,
url VARCHAR(255) NOT NULL,
description TEXT
) ENGINE=InnoDB;
INSERT INTO npm (name, url, description) ... |
--------------------------------------------------------------------------------
-- REST REGISTRY ---------------------------------------------------------------
--------------------------------------------------------------------------------
/**
* Запрос данных в формате REST JSON API (реестр).
* @param {text} pPath... |
<gh_stars>0
CREATE DATABASE todo;
-- table to store tasks
CREATE TABLE todo.tasks (id int AUTO_INCREMENT PRIMARY KEY, description varchar(200), completed boolean DEFAULT false);
-- create a new user that MariaDB Connector/Node.js can use to connect to and communicate with MariaDB database instance.
-- CREATE USER 'ap... |
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64)
--
-- Host: localhost Database: m_art_db
-- ------------------------------------------------------
-- Server version 5.7.23
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *... |
<gh_stars>0
Select * from planiranje_zaglavlje
where broj_dok < 0
-- and PLAN_TIP_ID = 3
Order by PLAN_PERIOD_ID, PLAN_TRAJANJE_ID, BROJ_DOK
|
CREATE DATABASE IF NOT EXISTS foo CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
<reponame>CHSR/PyramidModelWebAppDatabase
CREATE TABLE [dbo].[Training]
(
[TrainingPK] [int] NOT NULL IDENTITY(1, 1),
[Creator] [varchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CreateDate] [datetime] NOT NULL,
[Editor] [varchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EditDate] [datetime]... |
select
Nome,
Materia,
((Nota1 + Nota2 + Nota3 + Nota4 + Nota5 + Nota6)/6) as 'Media',
IIF(((Nota1 + Nota2 + Nota3 + Nota4 + Nota5 + Nota6)/6) >= 5, 'aprovado','reprovado')as 'Status'
from Diario1 where id = 3;
--insert into Diario1
--(Nome, Materia, Nota1, Nota2 ,Nota3 ,Nota4, Nota5 ,Nota6)
--Values
--('Raul','facil... |
create database if not exists bdcadastro;
use bdcadastro;
-- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Máquina: localhost
-- Data de Criação: 26-Jun-2019 às 10:42
-- Versão do servidor: 5.6.12-log
-- versão do PHP: 5.4.12
SET FOREIGN_KEY_CHECKS=0;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";... |
SELECT
name AS ProcedureName
, object_id AS ProcedureID
, type AS ProcedureType
, type_desc AS ProcedureDesc
, create_date AS ProcedureCreated
, modify_... |
<reponame>u2ros/imposm2-dockerized
SET search_path TO 'public';
CREATE EXTENSION postgis; |
<filename>inst/sql/src/sql/BANK/GROUNDFISH/Synonyms/OBIS_ECNASAP_DATA_NZ.sql
--------------------------------------------------------
-- DDL for Synonymn OBIS_ECNASAP_DATA_NZ
--------------------------------------------------------
CREATE OR REPLACE SYNONYM "GROUNDFISH"."OBIS_ECNASAP_DATA_NZ" FOR "NWAGSCOL"."OBIS_E... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 07, 2019 at 07:50 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
<reponame>ViktorAleksandrov/SoftUni--CSharp-DB-Fundamentals<filename>Database Basics MS SQL/07. Database Programmability and Transactions/Exercise/02. Employees with Salary Above Number.sql
CREATE PROC usp_GetEmployeesSalaryAboveNumber (@number DECIMAL(18, 4))
AS
SELECT FirstName,
LastName
FROM Employees
WHE... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th6 24, 2017 lúc 09:44 SA
-- Phiên bản máy phục vụ: 10.1.21-MariaDB
-- Phiên bản PHP: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Czas generowania: 23 Maj 2018, 17:03
-- Wersja serwera: 10.1.21-MariaDB
-- Wersja PHP: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Baza danych: `test`
--
-- ----------------------------... |
<filename>database/setting.sql<gh_stars>1-10
/*
SQLyog Ultimate v10.00 Beta1
MySQL - 5.6.12-log : Database - psarnetwork_db
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQ... |
<filename>Miscellaneous/StoredProcedures/Backup_2015 March 24/h3giOrderInsuranceStoreCustomerDetails.sql<gh_stars>1-10
-- ==============================================================
-- Author: <NAME>
-- Create date: 25/07/13
-- Description: Stores customer details for an insurance package
-- ===============... |
-- ##### INFO
-- DO NOT USE SCRIPT TO GENERATE DB - THIS IS OUT OF SYNC OF WHAT TYPEORM GENERATES
-- IT IS JUST AN OVERSIMPLIFIED EXAMPLE SCRIPT GEN'D FROM THE ./MODEL.DBML FILE
-- EX. Of what TypeORM generates:
-- Table: public."user"
DROP TABLE public."user";
CREATE TABLE public."user"
(
id uuid NOT NULL DEF... |
UPDATE cclf_files set import_status = 'Completed' where created_at < now();
UPDATE suppression_files set import_status = 'Completed' where created_at < now(); |
/*
Navicat MySQL Data Transfer
Source Server : LocalDB
Source Server Version : 50129
Source Host : localhost:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50129
File Encoding : 65001
Date: 2015-07-15 18:20:10
*/
SET FOREIGN_KEY_CHECK... |
USE spring_petclinic;
INSERT INTO reference_lists(list_name, values) VALUES ('vet_specialty', {'radiology', 'dentistry', 'surgery'});
INSERT INTO reference_lists(list_name, values) VALUES ('pet_type', {'bird', 'cat', 'dog', 'lizard','hamster','snake'});
INSERT INTO vets (vet_id, first_name, last_name, specialties) VA... |
<filename>generator-cas-app/generators/app/templates/schema/test/unit/types/keycloak_jwt_test.sql
begin;
select plan(3);
select has_type('<%- schemaName %>', 'keycloak_jwt', 'Type keycloak_jwt should exist');
select has_column('<%- schemaName %>', 'keycloak_jwt', 'sub', 'Type keycloak_jwt should have a sub column');
s... |
<filename>regadb-install/src/net/sf/regadb/install/ddl/schema/mssqlSchema.sql
create table regadbschema.aa_insertion (insertion_position smallint not null, aa_sequence_ii int not null, insertion_order smallint not null, version int not null, aa_insertion varchar(30) not null, nt_insertion_codon varchar(3) not null, pri... |
-- database: presto; groups: tpch; tables: lineitem
SELECT sum(l_extendedprice * l_discount) AS revenue
FROM
lineitem
WHERE
l_shipdate >= DATE '1994-01-01'
AND l_shipdate < DATE '1994-01-01' + INTERVAL '1' YEAR
-- AND l_discount BETWEEN decimal '0.06' - decimal '0.01' AND decimal '0.06' + decimal '0.01'
-- we don... |
<reponame>bcgov/cas-ciip-portal
-- Deploy ggircs-portal:function_application_application_revision_status to pg
-- requires: table_application_revision_status
-- requires: table_application
begin;
create or replace function ggircs_portal.application_application_revision_status(application ggircs_portal.application, ve... |
<reponame>vitorCamargo/PC
CREATE DATABASE bdCurso;
USE bdCurso;
CREATE TABLE Aluno(
id int primary key auto_increment,
nome varchar(40) not null,
idade int not null,
curso varchar(30) not null,
renda float,
ano_cadastro int not null); |
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
--------... |
--! Previous: sha1:291d72f6d02f5e522ae77d2176858ca1a69adc03
--! Hash: sha1:8d85de82d3497103916af311f8f18c3594f21d34
-- Enter migration here
alter table app_public.lilies drop column if exists ahs_ref;
alter table app_public.lilies
add column ahs_ref int generated always as (cast(ahs_id as int)) stored references app_p... |
<filename>app/doc_db/test_bdd.sql
/**
1 - Faire afficher pour les magasins de Gap : le nom du magasin, son type, sa catégorie, le nom et prénom du responsable
*/
SELECT m.nomMagasin, t.libType, c.libCategorie, r.nomResponsable, r.prenomResponsable
FROM magasin m
NATURAL JOIN type t, responsable r
LEFT JOIN categorie... |
<filename>src/test/resources/data.sql
insert into carro (nome,descricao,url_foto,url_video,latitude,longitude,tipo) VALUES('Tucker 1948','Descrição Tucker 1948','http://www.livroandroid.com.br/livro/carros/classicos/Tucker.png','http://www.livroandroid.com.br/livro/carros/classicos/tucker.mp4','-23.564224','-46.653156'... |
<filename>service/prisma/migrations/20211023215149_init/migration.sql
-- CreateEnum
CREATE TYPE "Turno" AS ENUM ('MATUTINO', 'VERSPERTINO', 'NOTURNO');
-- CreateEnum
CREATE TYPE "Modalide" AS ENUM ('PRESENCIAL', 'EAD', 'HIBRIDO');
-- CreateTable
CREATE TABLE "Usuario" (
"id" SERIAL NOT NULL,
"usernam... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.31.10
-- Generation Time: Nov 30, 2020 at 03:22 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
<reponame>zhibirc/nodejs-1
CREATE TABLE users (
user_id SERIAL PRIMARY KEY,
email VARCHAR(255) NOT NULL UNIQUE,
password_hash TEXT NOT NULL,
role VARCHAR(80),
active BOOL NOT NULL DEFAULT TRUE
);
CREATE TABLE movies (
movie_id SERIAL PRIMARY KEY,
data J... |
insert into empresas
(nome, cnpj)
values
('Bradesco',1234567891234),
('Vale',2345678912345),
('Cielo',3456789123456);
alter table empresas modify cnpj varchar(14);
desc empresas;
insert into empresas_unidades
(empresa_id,cidade_id, sede)
values
(1,1,1),
(1,2,0),
(2,1,0),
(2,2,1)... |
<reponame>Karloar/nks
/*
Navicat MySQL Data Transfer
Source Server : mysql
Source Server Version : 50719
Source Host : localhost:3306
Source Database : nks
Target Server Type : MYSQL
Target Server Version : 50719
File Encoding : 65001
Date: 2018-06-15 12:32:32
*/
SET FOREIGN_KEY_C... |
<gh_stars>0
CREATE TABLE external_writers
(
writer_id VARCHAR(50) NOT NULL,
writer_code VARCHAR(50) NOT NULL,
type VARCHAR(50) NOT NULL,
pat VARCHAR(255),
url VARCHAR(255),
tenant_id VARCHAR(50) NOT NULL,
created_at DATETIME N... |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.17.32
-- Generation Time: Oct 13, 2020 at 09:41 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.2.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... |
<gh_stars>1-10
@&&run_dir_begin
prompt Dropping table TAPIR_REFERENCE
drop table tapir_reference purge;
prompt Dropping TAPI package
drop package px_tapir_reference;
prompt Dropping TAPI collection type
drop type cx_tapir_reference force;
prompt Dropping TAPI type
drop type tx_tapir_reference force;
prompt Droppin... |
<filename>src/main/resources/db/migration/V20210319.2__adiciona-dados-iniciais-cliente.sql
INSERT INTO cliente(nome, email, telefone)
VALUES ('<NAME>', '<EMAIL>', '99999999999'),
('<NAME>', '<EMAIL>', '98989898989'),
('<NAME>', '<EMAIL>', '98979878979'),
('<NAME>', '<EMAIL>', '98989890089'),
... |
<filename>data/test/sql/9d65b993bbb21e4781443a34f1f1a0a0a4031f89wsp_getAllContents.sql
IF OBJECT_ID('dbo.wsp_getAllContents') IS NOT NULL
BEGIN
DROP PROCEDURE dbo.wsp_getAllContents
IF OBJECT_ID('dbo.wsp_getAllContents') IS NOT NULL
PRINT '<<< FAILED DROPPING PROCEDURE dbo.wsp_getAllContents >>>'
EL... |
<reponame>flexsocialbox/una<gh_stars>100-1000
-- TABLE: bx_inv_invites
ALTER TABLE `bx_inv_invites` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `bx_inv_invites` CHANGE `key` `key` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `bx_inv_invites` CHANGE `email` `e... |
<filename>parte001/ex056_seleccion_registros_especificos_where.sql
DROP TABLE IF EXISTS usuarios;
CREATE TABLE usuarios (
nombre VARCHAR(30),
clave VARCHAR(10)
);
DESCRIBE usuarios;
INSERT INTO usuarios (nombre, clave) VALUES ('Leonardo','payaso');
INSERT INTO usuarios (nombre, clave) VALUES ('MarioPerez','Marit... |
CREATE EXTENSION IF NOT EXISTS swarm64da;
|
--Run in PostgreSQL v10.0
CREATE TABLE countries (
"id" VARCHAR(3),
"region_id" VARCHAR(3),
"country_name" VARCHAR(25)
);
INSERT INTO countries
("id", "region_id", "country_name")
VALUES
('ABW', 'LCN', 'Aruba'),
('AND', 'ECS', 'Andorra'),
('ARE', 'MEA', 'United Arab Emirates'),
('ARG', 'LCN', 'Argent... |
<gh_stars>1-10
-- --------------------------------------------------------
-- Yugandhar Microservices Platform V1.0.0.RELEASE
-- Database scripts for MariaDB
-- --------------------------------------------------------
CREATE USER 'YUG_OWNER'@'%' IDENTIFIED BY 'YUG_OWNER';
GRANT EXECUTE, PROCESS, SELECT, SHOW DATABASES... |
<gh_stars>10-100
CREATE DATABASE carstore;
CREATE TABLE body (
id serial PRIMARY KEY,
name VARCHAR(255) NOT NULL UNIQUE
);
CREATE TABLE engine (
id serial PRIMARY KEY,
name VARCHAR(255) NOT NULL UNIQUE
);
CREATE TABLE drive (
id serial PRIMARY KEY,
name VARCHAR(255) NOT NULL UNIQUE
);
CREAT... |
<gh_stars>10-100
{% macro replace(field, old_chars, new_chars) -%}
{{ return(adapter.dispatch('replace', packages = dbt_utils._get_utils_namespaces()) (field, old_chars, new_chars)) }}
{% endmacro %}
{% macro default__replace(field, old_chars, new_chars) %}
replace(
{{ field }},
{{ old_chars ... |
<reponame>faizol/babelfish_extensions<filename>test/JDBC/input/BABEL-646.sql
create table t1 ( a int )
GO
create procedure my_proc as
PRINT 'OK'
GO
create procedure test_proc1 as
execute my_proc
execute [my_proc]
GO
create procedure test_proc2 as
execute my_proc
execute [my_proc]
GO
create procedure test_proc3 as
e... |
<reponame>CUBRID/cubrid-testcase<filename>sql/_01_object/_10_system_table/_012_db_auth/cases/1011.sql
--+ holdcas on;
--Test db_auth by creating new user with grant option
call login('dba') on class db_user;
create class test_class(col1 integer, col2 varchar(10));
insert into test_class values(999,'nhnchina');
insert... |
CREATE OR REPLACE VIEW pt_questions_view AS
WITH RECURSIVE questionnaire_parts_with_descendents AS (
SELECT
section_fields.tab_title AS root_section,
questionnaire_parts.id,
questionnaire_parts.questionnaire_id,
questionnaire_parts.part_id,
questionnaire_parts.part_type,
questionnaire_parts.pa... |
<filename>openGaussBase/testcase/KEYWORDS/resource/Opengauss_Function_Keyword_Resource_Case0022.sql
-- @testpoint:opengauss关键字resource(非保留),作为用户组名
--关键字不带引号-成功
drop group if exists resource;
create group resource with password '<PASSWORD>';
drop group resource;
--关键字带双引号-成功
drop group if exists "resource";
create g... |
<gh_stars>0
-- 6.8 CASE Operator
select
order_id,
case
when year(order_date) = year(now()) then 'Active'
when year(order_date) = year(now()) - 1 then 'Last Year'
when year(order_date) < year(now()) - 1 then 'Arhived'
else 'Future'
end as category
from orders;
-- Exercise
select
concat(f... |
<gh_stars>0
IF OBJECT_ID(N'[__EFMigrationsHistory]') IS NULL
BEGIN
CREATE TABLE [__EFMigrationsHistory] (
[MigrationId] nvarchar(150) NOT NULL,
[ProductVersion] nvarchar(32) NOT NULL,
CONSTRAINT [PK___EFMigrationsHistory] PRIMARY KEY ([MigrationId])
);
END;
GO
BEGIN TRANSACTION;
GO
IF... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 24, 2021 at 03:56 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- Таблица моделей машин с количеством боевых машин собранных на основе каждой модели
SELECT O1_Car.Name AS Car_Model, count(*) AS Quantity_Of_BattleCars
FROM O1_Car
JOIN O1_BattleCar ON O1_Car.O1_Car_ID = O1_BattleCar.O1_Car_ID
GROUP BY O1_Car.Name
-- Таблица описывающая количество установленного оружения на каждой б... |
<filename>db/sql/10-2-select.sql
select * from ken2015 where (名前 like "%山%") and (char_length(名前) = 2);
|
--ZAD4
SELECT * FROM rabaty WHERE data_do-data_od =
(SELECT max(data_do-data_od) FROM rabaty) |
<gh_stars>0
CREATE TABLE %s.agencies (
agency_id integer NOT NULL,
agency_name char({{length .agencies.agency_name}}) DEFAULT NULL,
agency_url char({{length .agencies.agency_url}}) DEFAULT NULL,
agency_timezone char({{length .agencies.agency_timezone}}) DEFAULT NULL,
agency_lang char({{length .agencies.agency... |
<reponame>mennerich/instrument
# DC schema
# --- !Ups
ALTER TABLE ENTRY ADD COLUMN WEIGHT integer;
# --- !Downs
ALTER TABLE ENTRY DROP COLUMN WEIGHT; |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 11, 2021 at 07:45 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
-- date.test
--
-- db eval {SELECT strftime('%s','2003-10-22 12:34:00')}
SELECT strftime('%s','2003-10-22 12:34:00') |
<filename>updates/update_4.14.1_to_4.15.0.sql
-- Alterando tabela vendas
ALTER TABLE vendas ADD observacoes TEXT DEFAULT NULL NULL;
|
CREATE PROCEDURE DROP_TABLE(IN schemaName varchar(128), IN tableName varchar(128)) PARAMETER STYLE JAVA MODIFIES SQL DATA LANGUAGE JAVA EXTERNAL NAME 'org.jboss.arquillian.integration.persistence.datasource.derby.DerbyDropTable.dropTable'
CALL DROP_TABLE('app', 'SEQUENCE')
DROP PROCEDURE DROP_TABLE
CREATE TABLE SEQUENC... |
<filename>D42-POC-Demo/Resources/Default_DOQL/Impact_List_enh_RO.sql
/* Get report to Support Impact List */
/* Inline view of Target service and Device data - Filters down to just the records needed
Change xxxxx or xxxxy to the device id of the focused host before running */
With
src as (
... |
<filename>src/test/resources/sql/select/84caadef.sql
-- file:interval.sql ln:163 expect:true
SELECT '5.5 seconds 3 milliseconds'::interval
|
INSERT INTO security.app_user(is_active, password, registration_date_time, username) VALUES (true, '$2a$10$qzEKGj8Gnu4Xh.sV1xnTWuCooI6HAQ.iwbiySrpErXWgMAohCWpBy', LOCALTIMESTAMP, 'fulladmin');
INSERT INTO security.app_user(is_active, password, registration_date_time, username) VALUES (true, <PASSWORD>ohCWpBy', LOCALTIM... |
USE [WebhooksDb]
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[HangFire].[AggregatedCounter]') AND type in (N'U'))
DROP TABLE [HangFire].[AggregatedCounter]
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[HangFire].[Counter]') AND type in (N'U'))
DROP TABLE [HangFire]... |
<reponame>Nazdarovja/Security_Assignment_GDPR
DROP DATABASE IF EXISTS security_database;
CREATE DATABASE security_database;
USE security_database;
CREATE TABLE users
(
username VARCHAR(50) NOT NULL,
passwd VARCHAR(50) NOT NULL,
role ENUM('user','admin')
);
INSERT INTO users VALUES("testuser", "test", "user");
I... |
<gh_stars>10-100
USE distributed_ats;
DROP TABLE IF EXISTS `instrument_market_map`;
CREATE TABLE `instrument_market_map` (
`instrument_id` int(11) DEFAULT NULL,
`market_id` int(11) DEFAULT NULL,
KEY `market_id_fk_idx` (`market_id`),
KEY `instrument_id_fk_idx` (`instrument_id`),
CONSTRAINT `instrument_id_f... |
/* 2019 / 2020 (announced 2021-06-23) */
insert into donations(donor, donee, amount, fraction, donation_date, donation_date_precision, donation_date_basis, cause_area, url, goal_amount, influencer, intended_use_of_funds_category, intended_use_of_funds, donor_donee_reason, donor_amount_reason, donor_timing_reason, dono... |
<reponame>Kycklingar/PBooru
CREATE TABLE IF NOT EXISTS post_score_mapping(
id SERIAL PRIMARY KEY,
post_id INTEGER NOT NULL REFERENCES posts(id),
user_id INTEGER NOT NULL REFERENCES users(id),
CONSTRAINT post_user UNIQUE (post_id, user_id)
);
ALTER TABLE posts ADD COLUMN IF NOT EXISTS score INTEGER NOT NULL DEFAULT... |
-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
-- Copyright [2016-2020] EMBL-European Bioinformatics Institute
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may ob... |
<filename>How to List and Monitor DBMS Jobs and Scheduler Jobs in Oracle Database.sql
How to List and Monitor DBMS Jobs and Scheduler Jobs in Oracle Database
<NAME> March 29, 2020 Leave a comment
I will explain How to List and Monitor DBMS Jobs and Scheduler Jobs in Oracle Database in this post.
Monitoring Oracle... |
CREATE TABLE [dbo].[NewsReleaseType] (
[PageTitle] NVARCHAR (50) NOT NULL,
[LanguageId] INT NOT NULL,
[ReleaseType] INT NOT NULL,
[SortOrder] INT NOT NULL,
[PageLayout] INT NOT NULL,
[PageImageId] UNIQUEIDENTIFIER NULL,
CONSTRAINT... |
/*
Navicat MySQL Data Transfer
Source Server : 192.168.8.126
Source Server Version : 50722
Source Host : 192.168.8.126:3306
Source Database : gpmall
Target Server Type : MYSQL
Target Server Version : 50722
File Encoding : 65001
Date: 2019-08-12 15:35:01
*/
SET FOREIGN_KEY_CHECKS=0... |
<filename>dbms/tests/queries/0_stateless/00906_low_cardinality_cache.sql
drop table if exists test.lc;
create table test.lc (b LowCardinality(String)) engine=MergeTree order by b;
insert into test.lc select '0123456789' from numbers(100000000);
select count(), b from test.lc group by b;
drop table if exists test.lc;
|
-- Test: plperl 31
SELECT * FROM perl_record_set();
|
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
IF EXISTS (SELECT TOP 1 1 FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].spEIDSSUpdate_DeleteUpdateBlock')) DROP PROCEDURE [dbo].spEIDSSUpdate_DeleteUpdateBlock
GO
-- =============================================
-- Author: <NAME>.
-- Create date:
-- De... |
use payroll;
ALTER TABLE user_input_transfer ADD uit_scid_from int(11) Default null AFTER uit_workingpost_from;
-- ------------------------------------------------------------------------------------------------
|
CREATE TABLE IF NOT EXISTS permission_dependency (
id bigint primary key auto_increment,
parent varchar(100) not null,
child varchar(100) not null,
foreign key (parent) references permissions (name),
foreign key (child) references permissions (name)
);
-- Give the system administrator some initial ... |
<gh_stars>0
-- @testpoint: opengauss关键字Key_Type非保留),作为索引名,部分测试点合理报错
--前置条件,创建一个表
drop table if exists explain_test;
create table explain_test(id int,name varchar(10));
--关键字不带引号-成功
drop index if exists Key_Type;
create index Key_Type on explain_test(id);
drop index Key_Type;
--关键字带双引号-成功
drop index if exists "Key_Ty... |
<gh_stars>0
CREATE TABLE moderation_logs (
id serial NOT NULL,
entity_id bigint NOT NULL,
entity_type entity_types NOT NULL,
moderation_status moderation_statuses NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
CONSTRAINT moderation_logs_pkey PRIMARY KEY (id)
);
CREATE ... |
INSERT INTO burgers (burger_name, devoured) VALUES ('Bacon Western', true), ('All American', false), ('The Full Monte', false); |
select s.*, a.name as sendername
from shipment s
join actor a
on a.id = s.sender
left join shipment_confirmation sc
on sc.shipment = s.id
where sc.shipment is null
and s.recipient = $1;
|
<gh_stars>0
select
info.account_id,
info.user_id,
indiv.fst_name,
indiv.lst_name,
email.email_addr,
info.create_dt,
info.update_dt
from account_info info
left join account_indiv indiv on info.account_id = indiv.account_id
left join account_email email on info.account_id = email.account... |
INSERT INTO products (id, price, name, company, product_type_id)
SELECT 1, 3.40, 'Mushroom - Morels, Dry', 'Connelly-Lowe', round(dbms_random.value(1, 6)
FROM DUAL
UNION ALL
SELECT 2, 6.95, 'Foil Cont Round', 'Weissnat, Waters and Kirlin', round(dbms_random.value(1, 6)
FROM DUAL
UNION ALL
SELECT 3, 8.60, 'Nut - Chestnu... |
<reponame>azurefy/database-scripts<filename>mysql-sqlserver/[sql_server] check backup.sql
--SQL VERIFICAR BACKUPS
--master,model and temp doesnt have backups
SELECT name FROM master.sys.databases
where name not in
(
select database_name
--,backup_start_date
from msdb.dbo.backupset
where backup_star... |
<filename>DATA_BACKUP/BD5W6_424P_sys_certificates.sql
CREATE TABLE sys.certificates
(
name sysname NOT NULL,
certificate_id int NOT NULL,
principal_id int,
pvt_key_encryption_type char(2) NOT NULL,
pvt_key_encryption_type_desc nvarchar(60),
is_active_for_begin_dialog bit,
issuer_name nvarcha... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.