sql stringlengths 6 1.05M |
|---|
-- data for the vacation request resource test.
INSERT INTO employee (id, version, email, firstName, lastName, title, hourlyCostRate, salary, federalState, joinDate, vacationEntitlement, deleted)
VALUES (0, 0, '<EMAIL>', 'John', 'Johnson', 'Software Engineer', 80, 10000, 'BERLIN', '2014-02-01', 30, false);
INSERT IN... |
-- Create a login and user
--
use master
go
if exists (select * from sys.server_principals where name = 'dbm_login')
DROP LOGIN dbm_login
go
CREATE LOGIN dbm_login WITH PASSWORD = '<PASSWORD>';
go
if exists (select * from sys.database_principals where name = 'dbm_user')
DROP USER dbm_user
go
CREATE USER dbm_user FOR ... |
<filename>schema/logs.sql<gh_stars>10-100
create table logs
(
log_index bigint,
transaction_hash varchar(66),
transaction_index bigint,
address varchar(42),
data text,
topic0 varchar(66),
topic1 varchar(66),
topic2 varchar(66),
topic3 varchar(66),
block_timestamp timestamp,
b... |
<filename>resources/migrations/20210218220135-schemas-table.down.sql
DROP TABLE schemas;
|
<gh_stars>0
CREATE PROCEDURE [dbo].[pe_NL_Suppliers_AD]
@Org int
AS
DECLARE @Server varchar(50)
DECLARE @DB varchar(50)
DECLARE @SQL varchar(8000)
SELECT @Server = NLServer, @DB = NLDatabase
FROM tblTranNominalOrgs
WHERE PracID = @Org
SET @SQL = 'SELECT LTRIM(RTRIM(Mast.SUCODE)) AS SupplierCode, Mast.SUNAME AS Su... |
<reponame>terminal0gr/WebEng1819B
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Φιλοξενητής: 127.0.0.1
-- Χρόνος δημιουργίας: 23 Οκτ 2018 στις 23:41:16
-- Έκδοση διακομιστή: 10.1.36-MariaDB
-- Έκδοση PHP: 5.6.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTI... |
#Sentencias para verificar sincronizacion
select count(*) from word_lang;
select count(*) from pronounciation;
select count(*) from word_translation;
|
/**
* Author: jsibona
* Created: 10/08/2017
SELECT * FROM "public".record LIMIT 100;
SELECT * FROM "public".databasechangelog LIMIT 100;
SELECT * FROM "public".databasechangeloglock LIMIT 100;
SELECT * FROM "public".client LIMIT 100;
SELECT * FROM "public".product LIMIT 100;
*/
CREATE TABLE "public".client
(
... |
<reponame>atarazana/java-inner-loop-dev-guide
insert into fruit (id, name) values (FRUIT_SEQ.NEXTVAL, 'Cherry');
insert into fruit (id, name) values (FRUIT_SEQ.NEXTVAL, 'Apple');
insert into fruit (id, name) values (FRUIT_SEQ.NEXTVAL, 'Banana');
|
<reponame>resultdoo/planning-poker
alter table "public"."users"
add constraint "users_room_id_fkey"
foreign key ("room_id")
references "public"."rooms"
("id") on update restrict on delete cascade;
|
<gh_stars>1-10
GO
IF OBJECT_ID('[DOI].[spDropRecreateSchemaBoundObjectsOnTable]') IS NOT NULL
DROP PROCEDURE [DOI].[spDropRecreateSchemaBoundObjectsOnTable];
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [DOI].[spDropRecreateSchemaBoundObjectsOnTable]
@SchemaName SYSNAME,
@TableNam... |
<filename>install/postgresql/rmbt_globals.sql
-- 2019-02-04_20-14-39 rmbt_globals.sql
-- pg_dumpall -g >> rmbt_globals.sql
--
-- PostgreSQL database cluster dump
--
SET default_transaction_read_only = off;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
--
-- Roles
--
CREATE ROLE nagios;
ALTER ... |
<reponame>svrakitin/x
CREATE UNIQUE INDEX "identity_recovery_addresses_status_via_uq_idx" ON "identity_recovery_addresses" (via, value) |
DROP TABLE IF EXISTS drenagem.tab_cobrancas;
CREATE TABLE drenagem.tab_cobrancas (
cod_cobranca serial not null,
participacao_fk int not null,
num_ano_ref smallint not null,
cb001 smallint,
cb002 int default nextval('public.campo_multi_opcoes_seq'),
cb003 varchar (100),
cb004 int,
cb005 numeric(14,... |
--TEST: test with columns with constraints
create table max_constraints(
col1 int not null,
col2 short auto_increment,
col3 bigint default 10000000,
col4 numeric(10, 5) not null,
col5 float unique,
col6 double primary key,
col7 monetary shared 500
);
insert into max_constraints values(10000, 100, 10000000,... |
--function for retrieving one or all education entries
CREATE OR REPLACE FUNCTION education_read(INTEGER DEFAULT NULL)
RETURNS TABLE (id INTEGER, user_id INTEGER, name VARCHAR(50), institute VARCHAR(100), state VARCHAR(50), country VARCHAR(50),
year SMALLINT, degree VARCHAR(100)) AS
$$
BEGIN
IF $1 IS NOT NULL THE... |
DECLARE @xml XML
SELECT @xml = (
select 1 AS Param1
, '29' AS Param2
, '2017-02-01' AS DateParam
for XML PATH, type)
DECLARE @fileName varchar(255) = 'MyFileName.txt'
INSERT INTO ReportJobQueue
(
ReportName
, CommandType
, Command
, [Parameters]
, OutputFileName
, OutputFilePath
, OutputFormat
, Delimi... |
<filename>db_eis.sql
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Oct 09, 2018 at 03:09 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00... |
CREATE OR REPLACE PROCEDURE tdm.model_cleanup (
a_model_id in int default null,
a_err inout character varying default null )
SECURITY DEFINER
LANGUAGE plpgsql
AS $$
/**
Procedure model_cleanup deletes a model
| Parameter | In/Out | Datatype | Remarks |
| --------------... |
/*
SQLyog Ultimate v12.09 (64 bit)
MySQL - 5.5.59 : Database - bbgshop
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS... |
update People
set IsMarried=1, firstname='Philippe',Country='Brazil'
where id=3 |
<filename>TestDataGenerator/SingleValue/Views/vw_RandomNumber.sql
Create View SingleValue.[vw_RandomNumber]
as
Select rand() RandomNumber |
<reponame>vyankatesh24/Asset-Management-System<gh_stars>1-10
CREATE TABLE [dbo].[Asset] (
[A_Id] INT IDENTITY (1, 1) NOT NULL,
[AssetName] NVARCHAR (100) NOT NULL,
[Description] NVARCHAR (100) NULL,
[Weight] NVARCHAR (10) NULL,
[DateOfPurchase] DATE N... |
<filename>src/Chinook/dbo/Stored Procedures/sproc_InsertInvoice.sql<gh_stars>10-100
CREATE PROCEDURE [dbo].[sproc_InsertInvoice]
(
@CustomerId int,
@InvoiceDate datetime,
@BillingAddress nvarchar (MAX),
@BillingCity nvarchar (MAX),
@BillingState nvarchar (MAX),
@BillingCountry nvarchar (MAX),
@BillingPostalCode... |
/* interactive-complex-11 */
select p2.id, p2.p_firstname, p2.p_lastname, o.o_name, pc.pc_workfrom
from person p1 JOIN (
knows k1 JOIN (knows k2 JOIN (person p2 JOIN (person_company pc JOIN (organisation o JOIN place pl ON o.o_placeid=pl.pl_placeid) ON pc.pc_organisationid=o.o_organisationid) ON p2.p_personid=pc.pc... |
CREATE FUNCTION func801() RETURNS integer
LANGUAGE plpgsql
AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE424);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE253);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE78);val:=(SELECT COUNT(*)INTO MYCOUN... |
<filename>webapp/src/main/resources/db/migration/V34__Add_Branch_owner.sql
alter table user add column partially_created bit not null default false;
alter table branch add column deleted bit not null default false;
alter table branch add column created_by_user_id bigint;
alter table branch add constraint FK__BRANCH__U... |
ALTER TABLE workspace_activity
ALTER COLUMN workspace_id DROP NOT NULL;
|
<filename>tests/queries/0_stateless/01323_redundant_functions_in_order_by.sql
DROP TABLE IF EXISTS test;
CREATE TABLE test (key UInt64, a UInt8, b String, c Float64) ENGINE = MergeTree() ORDER BY key;
INSERT INTO test SELECT number, number, toString(number), number from numbers(4);
set optimize_redundant_functions_in... |
--
-- Database version 21 Update script
--
-- 2013-01-10
--
-- Adds support for locking user accounts.
ALTER TABLE sysuser ADD sysuser_locked INT NOT NULL default '0';
ALTER TABLE sysuser ADD sysuser_locked_until DATETIME NULL;
|
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for `dhtv_cms_category`
-- ----------------------------
DROP TABLE IF EXISTS `dhtv_cms_category`;
CREATE TABLE `dhtv_cms_category` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL... |
<gh_stars>0
-- @testpoint:opengauss关键字Integer(非保留),作为用户名
--关键字explain作为用户名不带引号,创建成功
drop user if exists Integer;
CREATE USER Integer PASSWORD '<PASSWORD>';
drop user Integer;
--关键字explain作为用户名加双引号,创建成功
drop user if exists "Integer";
CREATE USER "Integer" PASSWORD '<PASSWORD>';
drop user "Integer";
--关键字explain作为用户... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 29, 2020 at 04:07 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<filename>klubovi_dump.sql
CREATE TABLE stadion
(
stadion_id INT PRIMARY KEY,
stadion_naziv VARCHAR(100) NOT NULL,
stadion_grad VARCHAR(100),
stadion_drzava VARCHAR(100),
adresa VARCHAR(100),
kapacitet INTEGER,
podloga VARCHAR(50)
);
CREATE TABLE klub
(
klub_id SERIAL PRIMARY KEY,
klub_naziv VARCHAR(100) NOT ... |
<reponame>georgialexandrov/bulgarian-elections
.read './db/structure.sql'
.read './db/elections/2014_european/voting_locations_2016.sql'
insert or ignore into election_periods(id, name) values (10, 'Избори за членове на европейския парламент 2014');
insert or ignore into elections (id, name, round1_date, election_peri... |
<filename>web/dbWebSource/table_types/accident_transactions_tt.sql<gh_stars>0
CREATE TYPE accident_transactions_tt AS TABLE(
accident_id INT NULL
,is_edited CHAR(1) NULL
,accident_date DATE NULL
,vehicle_id INT NULL
,driver_id INT NULL
,pao_id INT NULL
,accident_type_id INT NULL
,accident_level CHAR(50) NULL
,error_typ... |
select max(salary) as SecondHighestSalary from Employee where Salary< (select max(salary) from Employee) |
<filename>sclp/sc.web/App_Data/scripts/SC_Initial.sql<gh_stars>0
USE [sc_Default_v1]
GO
/****** Object: Table [dbo].[Textbooks] Script Date: 24/05/2018 13:43:05 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Textbooks](
[TextBookId] [int] IDENTITY(1,1) NOT NULL,
[MaterialId] [int]... |
-- Create a table named "follows" with the following columns:
-- id (integer) primary key, auto increment
-- following (string) the email of the person being followed,
-- should be a foreign key to the "users" table
-- follower (string) t... |
--1. The example uses a WHERE clause to show the cases in 'Italy' in March.
-- Modify the query to show data from Spain
SELECT name, DAY(whn), confirmed, deaths, recovered FROM covid
WHERE name = 'Spain' AND MONTH(whn) = 3 ORDER BY whn;
-- 2. The LAG function is used to show data from the preceding row or the tabl... |
<reponame>MichAcosta/alacran
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.5.5-10.1.13-MariaDB)
# Database: alacran
# Generation Time: 2016-08-13 19:06:02 +0000
# ***... |
--Problem_01
CREATE DATABASE SUPERMARKET
GO
USE SUPERMARKET
GO
CREATE TABLE CATEGORIES (
ID INT IDENTITY(1,1) PRIMARY KEY,
NAME NVARCHAR(30) NOT NULL
)
CREATE TABLE ITEMS (
ID INT IDENTITY(1,1) PRIMARY KEY,
NAME NVARCHAR(30) NOT NULL,
PRICE DECIMAL(18,2) NOT NULL,
CATEGORYID INT NOT NULL FOREIGN KEY REFER... |
<filename>Corporativo/Pedidos Corporativos - Análise Filial Retira.sql
SELECT A.DATA,
B.CODFILIAL,
A.NUMPED,
B.POSICAO,
B.CONDVENDA,
A.CODPROD,
P.DESCRICAO,
A.CODFILIALRETIRA,
A.QT,
A.PVENDA,
A.CODUSUR
FROM PCPEDI A,
PCPEDC B,
PCPRODU... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 16, 2018 at 07:07 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... |
-- Semaine
INSERT INTO public.t_semaine(nom, ordre, description, can_play)
VALUES ('Lancement !', 1, 'Partir et commencer le programme', true),
('Stabilisation !', 2, 'Bien consolider ses connaissances', true),
('Progression !', 3, 'Approfondir ses usages', true),
('Amerrissage !', 4, 'Dernière poussée pou... |
<gh_stars>10-100
-- file:rowsecurity.sql ln:849 expect:true
SET ROLE regress_rls_group1
|
-- file:json.sql ln:67 expect:true
SELECT array_to_json(array_agg(q),true) from (select x as b, x * 2 as c from generate_series(1,3) x) q
|
<reponame>carehart/dba-dash
CREATE PROC dbo.CustomCheckContext_Get(@InstanceIDs VARCHAR(MAX)=NULL)
AS
SELECT DISTINCT Context
FROM dbo.CustomChecks cc
WHERE (EXISTS(SELECT 1
FROM STRING_SPLIT(@InstanceIDs,',') ss
WHERE ss.Value = cc.InstanceID)
OR @InstanceIDs IS NULL)
ORDER BY cc.Context |
--
-- Table structure for table `armorsets`
--
CREATE TABLE IF NOT EXISTS armorsets (
id int(3) NOT NULL auto_increment,
chest decimal(11,0) NOT NULL default '0',
legs decimal(11,0) NOT NULL default '0',
head decimal(11,0) NOT NULL default '0',
gloves decimal(11,0) NOT NULL default '0',
feet decimal(11,0) NOT N... |
<filename>tests/ddl_csc2.test/t02_dbpad_check.sql
create table t {
schema {
byte a[2]
}
};$$
# not allowed: need dbpad to change size
alter table t {
schema {
byte a[4]
}
};$$
# not allowed: need dbpad to change size
alter table t {
schema {
byte a[1]
}
};$$
# not allo... |
<filename>resources/DDL/service_orchestration_definition.sql
-- Table: service_orchestration_definition
-- DROP TABLE service_orchestration_definition;
CREATE TABLE service_orchestration_definition
(
tenant_id character varying(128) NOT NULL,
service_id character varying(256) NOT NULL,
service_step integer NOT ... |
INSERT INTO pullrequests(changeset, repository)
VALUES($1, $2)
|
<filename>modules/bq-log-alerting/use-cases/ingress_from_external_ip.sql
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LI... |
--********************************************************************/
-- */
-- IBM Websphere Replication Server */
-- Version 9.7 for Linux, UNIX AND Windows */
-- ... |
<reponame>atreyu3/UER
create table tbl_login ( tbl_user int primary key not null,
tbl_Fecha_acceso date,
tbl_Fecha_salida date,
tbl_Status char(1),
tbl_Session_id int not null
); |
--marginal values of date/timestamp/datetime type
--1. marginal values: date argument
select dayofweek(date'0001-01-01');
select dayofweek(date'9999-12-31');
select dayofweek(date'12/31/9999');
select dayofweek(date'1/1/1');
--2. marginal values: timestamp argument
--select dayofweek(timestamp'00:00:00 01/01')... |
<filename>platform/mds/mds/src/main/resources/db/migration/default/V9__MOTECH-3073.sql
-- extend the draft with fields to remove and required changes--
CREATE TABLE "EntityDraft_fieldsToRemove" (
"id_OID" bigint NOT NULL,
"fieldName" varchar(255) NOT NULL,
PRIMARY KEY ("id_OID", "fieldName"),
CONSTRAINT "Entit... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.1.10-MariaDB - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL Version: 9.3.0.4984
-- ------------------------------------------------... |
<filename>test/datasets/migrationApp/server/migration/2_up.sql
/* Description 2 */
ALTER TABLE "Test"
ADD COLUMN "isActive" BOOLEAN NOT NULL DEFAULT true
; |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Máy chủ: localhost
-- Thời gian đã tạo: Th10 07, 2019 lúc 06:08 PM
-- Phiên bản máy phục vụ: 10.4.6-MariaDB
-- Phiên bản PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "... |
-- Somente para atualizar as linhas, não serve para atualizar a estrutura da tabela
-- "UPDATE <tabela>"
-- "SET <modificação>" especifica o que quer mudar
-- "WHERE <condição>" especifica em quais linhas a modificação deverá ser aplicada
--!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- ... |
SELECT
poi.id, poi.globalid, poi.timestamp,
ST_X (ST_Transform (poi.geom, 4326))::float as longitude,
ST_Y (ST_Transform (poi.geom, 4326))::float as latitude,
TRIM(poi.source) as "source",
TRIM(poi.market_name) as "market_name",
TRIM(poi.market_settlement_name) as "market_settlement_name",
T... |
CREATE TABLE comments (
comment_id INTEGER NOT NULL,
username VARCHAR2(100 CHAR) NOT NULL,
"Date" DATE NOT NULL,
text VARCHAR2(500 CHAR) NOT NULL
); |
<gh_stars>0
SELECT count(*)
FROM sysprocesses
WHERE program_name = 'SqlConsumer' |
<reponame>tetelias/data-engineering-zoomcamp-hw
-- Create table for Q1 and Q2
CREATE OR REPLACE EXTERNAL TABLE `ultimate-life-338623.ny_taxi_trips.external_fhv_tripdata`
OPTIONS (
format = 'CSV',
uris = ['gs://nyc_tlc_files/trip data/fhv_tripdata_2019-*.csv']
);
-- Query for Q1
SELECT COUNT(1) FROM ultimate-life-3... |
/*
SQLyog Ultimate v11.11 (64 bit)
MySQL - 5.6.37-log : Database - blizzcms
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQ... |
<gh_stars>1-10
if OBJECT_ID('CountPrice') is not null drop procedure CountPrice
if OBJECT_ID('ConcatCountries') is not null drop function ConcatCountries
if OBJECT_ID('ConcatGenres') is not null drop function ConcatGenres
if OBJECT_ID('CountCashM') is not null drop function CountCashM
if OBJECT_ID('CountCashPeriod') is... |
/*
SQLyog Ultimate v12.5.1 (64 bit)
MySQL - 10.4.13-MariaDB : Database - db_rsdjamil
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHEC... |
INSERT INTO part VALUES (1, 'Part1', 'Red', 4);
INSERT INTO part VALUES (2, 'Part2', 'Green', 5);
INSERT INTO part VALUES (3, 'Part3', 'Blue', 6);
INSERT INTO supplier VALUES (1, 'Supplier1', 'Mumbai', 'SBI');
INSERT INTO supplier VALUES (2, 'Supplier2', 'Chennai', 'Kotak');
INSERT INTO shipment VALUES (1, 1, 1, '202... |
<filename>src/test/resources/randexpr1.test_2031.sql
-- randexpr1.test
--
-- db eval {SELECT coalesce((select max(b-case when exists(select 1 from t1 where case when t1.c>t1.b then t1.c*19 else coalesce((select max((abs(t1.a)/abs(~(select +max(t1.c)*max(a)*cast(avg(t1.d) AS integer) from t1)+case when e=t1.c or t1.c b... |
drop materialized view mv_brain_details_with_game;
create materialized view mv_brain_details_with_game
refresh complete
start with sysdate
next sysdate + interval '30' minute
as
select
g.id as game_id,
b.id as "id",
b.signal_strength,
b.attention,
b.meditation,
b.delta,
b.t... |
CREATE TABLE `BotChannel` (
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`bot_id` INT(11) UNSIGNED NOT NULL,
`twitch_channel_id` VARCHAR(64) NOT NULL COMMENT 'i.e. 11148817',
PRIMARY KEY (`id`),
FOREIGN KEY (bot_id)
REFERENCES Bot(id)
ON DELETE CASCADE,
UNIQUE INDEX `bot_channel` (bot_id, ... |
insert into dbversion values('2.5', now()); |
<reponame>rafaelsplima/cadastro-pessoas
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table pessoa (
cpf bigint not null,
nome varchar(255),
data_nascimento varchar(255),
pes... |
<gh_stars>0
# Bidder schema
# --- !Ups
CREATE TABLE BIDDER (
ID BIGINT IDENTITY(1) PRIMARY KEY,
NAME varchar(63) NOT NULL UNIQUE
);
# --- !Downs
DROP TABLE BIDDER;
|
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table area (
id bigserial not null,
nome varchar(255),
nome_gerente varchar(255),
data_cadastro ... |
<filename>src/main/resources/db/migration/V1_20201206_2033__create_sys_user.sql
drop table if exists sys_user ;
create table `sys_user` (
`id` bigint(20) not null auto_increment comment '主键',
`username` varchar(100) not null unique comment '用户名',
`password` varchar(100) not null comment '密码',
`age` int(5) defau... |
/*!40101 SET NAMES utf8 */;
/*!40014 SET FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/ notes /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE notes;
DROP TABLE IF EXISTS note;
CREATE TABLE `note` (
`id` int NOT NULL AUTO... |
--------------------------------------------------------
-- Script to create XDM user for the examples in
-- Oracle ADF Enterprise Application Development - Made Simple
-- ISBN 978-1-849681-88-9
-- (c) <NAME> 2011, <EMAIL>
-- www.enterpriseadf.com, www.vesterli.com
-----------------------------------------------... |
CREATE TABLE [dwh].[Customer]
(
[CustomerId] Int IDENTITY(1,1)
, [CustomerKey] VarChar(50)
CONSTRAINT [PK_Customer] PRIMARY KEY CLUSTERED (CustomerId)
)
CREATE UNIQUE INDEX [BK_Customer]
ON [dwh].[Customer]
(
[CustomerKey]
)
|
CREATE TABLE `dts_branch_error_log` (
`branch_id` bigint(20) NOT NULL,
`tx_id` bigint(20) NOT NULL,
`client_ip` varchar(15) COLLATE utf8_bin NOT NULL,
`client_info` varchar(255) COLLATE utf8_bin NOT NULL,
`state` tinyint(1) NOT NULL DEFAULT '0',
`gmt_created` datetime NOT NULL,
`gmt_modified` timestamp NO... |
<gh_stars>1000+
--
-- Turn off autocommit and start a transaction so that we can use the temp tables
--
--SET AUTOCOMMIT = OFF;
START TRANSACTION;
--
-- Insert client information into the temporary tables. To add clients to the HSQL database, edit things here.
--
INSERT INTO client_details_TEMP (client_id, client_... |
current_scan_date as (
SELECT
av.asset_id,
finished
FROM assets_vulns av
LEFT JOIN dim_scan ds ON ds.scan_id = av.current_scan
GROUP BY av.asset_id, finished
),
--END current_scan_date |
CREATE TABLE buildStageTable (
id INT NOT NULL AUTO_INCREMENT,
build_id INT NOT NULL,
name VARCHAR(80) NOT NULL,
board VARCHAR(80),
status ENUM('fail', 'pass') NOT NULL,
log_url VARCHAR(240),
duration_seconds INT NOT NULL,
summary BLOB,
PRIMARY KEY (id),
FOREIGN KEY (build_id)
REFERENCES buildTa... |
<gh_stars>0
-- @testpoint:opengauss关键字schema_name(非保留),作为字段数据类型(合理报错)
--前置条件
drop table if exists explain_test cascade;
--关键字不带引号-合理报错
create table explain_test(id int,name schema_name);
--关键字带双引号-合理报错
create table explain_test(id int,name "schema_name");
--关键字带单引号-合理报错
create table explain_test(id int,name 'schem... |
delimiter //
CREATE DEFINER=`root`@`localhost` PROCEDURE `spConsultarCategorias`( in _nombre varchar(20)
)
begin
select *from tb_categoria where estado = 1 and nombre like concat('%',_nombre,'%');
end
// delimiter //
|
<filename>gesterra.sql
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 01-Out-2017 às 19:22
-- Versão do servidor: 10.1.9-MariaDB
-- PHP Version: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLI... |
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50520
Source Host : localhost:3306
Source Database : sideli
Target Server Type : MYSQL
Target Server Version : 50520
File Encoding : 65001
Date: 2017-07-17 16:38:50
*/
SET FOREIGN_KEY_CHECKS=0;
-- ------... |
<reponame>ArthurRmd/PHP-Framework-project<filename>sql.sql
CREATE DATABASE licence3;
CREATE TABLE `contactform` (
`id` int(11) NOT NULL,
`firstname` varchar(30) DEFAULT NULL,
`name` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
<reponame>koji-m/airbyte
USE [test_normalization];
if object_id ('test_normalization."non_nested_stream_wit__lting_into_long_names__dbt_tmp_temp_view"','V') is not null
begin
drop view test_normalization."non_nested_stream_wit__lting_into_long_names__dbt_tmp_temp_view"
end
USE [te... |
-- --------------------------------------------------------
-- Host: localhost
-- Server version: 5.7.13-log - MySQL Community Server (GPL)
-- Server OS: Win32
-- HeidiSQL Version: 9.2.0.4947
-- --------------------------------------------------------... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 05, 2019 at 05:58 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
CREATE DATABASE routine;
USE routine;
CREATE TABLE days (
dayid INTEGER NOT NULL AUTO_INCREMENT,
dayname VARCHAR(15) NOT NULL,
PRIMARY KEY (dayid)
) ENGINE=InnoDB;
CREATE TABLE routines (
routineid INTEGER NOT NULL AUTO_INCREMENT,
name VARCHAR(100) NOT NULL,
... |
<reponame>hmcts/am-lib<gh_stars>0
version https://git-lfs.github.com/spec/v1
oid sha256:60b39f87438f2be87e86a8da18279f8002ab91e9cbb82934344f0940cf95fbca
size 236
|
/*
Warnings:
- You are about to drop the column `pageId` on the `MenuCategory` table. All the data in the column will be lost.
- You are about to drop the column `accronym` on the `roles` table. All the data in the column will be lost.
- You are about to drop the column `description` on the `roles` table. All ... |
prompt --application/pages/page_01100
begin
wwv_flow_api.create_page(
p_id=>1100
,p_user_interface_id=>wwv_flow_api.id(25850780696402701559)
,p_name=>'NLS Parameter'
,p_step_title=>'NLS Parameter'
,p_autocomplete_on_off=>'OFF'
,p_page_template_options=>'#DEFAULT#'
,p_last_updated_by=>'<EMAIL>'
,p_last_upd_yyyymmddhh24... |
-- analyze.test
--
-- execsql {
-- PRAGMA writable_schema=on;
-- DELETE FROM sqlite_stat1;
-- INSERT INTO sqlite_stat1 VALUES('t4','t4i1','nonsense');
-- INSERT INTO sqlite_stat1 VALUES('t4','t4i2','120897349817238741092873198273409187234918720394817209384710928374109827172901827349871928741910');
-- ... |
<filename>Features/IntegrationPlatform-svn/Core/TfsMigrationDBConsolidation/Tfs_Integration/Schema Objects/Tables/dbo.RUNTIME_GENERAL_PERFORMANCE_DATA.table.sql
CREATE TABLE [dbo].[RUNTIME_GENERAL_PERFORMANCE_DATA]
(
Id int NOT NULL identity(1,1),
SessionGroupRunId int NOT NULL,
SessionUniqueId uniqueidentifier NO... |
<reponame>aliostad/deep-learning-lang-detection
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
create index NEW_PROTIN_1_PRIMARY_AC_lwr on NEW_PROTEIN_1(lower(PRIMARY_ACCESSION)) PARALLEL NOLOGGING tablespace CABIO;
cr... |
-- MySQL dump 10.13 Distrib 5.7.20, for osx10.12 (x86_64)
--
-- Host: localhost Database: team_topic
-- ------------------------------------------------------
-- Server version 5.7.20
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.