sql stringlengths 6 1.05M |
|---|
-- MySQL dump 10.13 Distrib 5.7.19, for Linux (x86_64)
--
-- Host: localhost Database: api
-- ------------------------------------------------------
-- Server version 5.7.19-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RE... |
DROP DATABASE IF EXISTS `ci_blog_test`;
CREATE DATABASE `ci_blog_test`;
USE `ci_blog_test`;
CREATE TABLE `users`(
`id` INT NOT NULL AUTO_INCREMENT,
`username` VARCHAR(64) NOT NULL,
`email` VARCHAR(255) NOT NULL,
`password` VARCHAR(255) NOT NULL,
`created_at` DATETIME DEFAULT CURRENT_TIMESTAMP,
`updated_a... |
<reponame>arisbakri/smallgameclick<filename>webtech.sql
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 20, 2020 at 03:53 PM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TR... |
/*Student No: C12561353
Name: <NAME>
Case Study: Edmunds Electrics
File: Query SQL*/
/*QUERIES*/
/*Simple queries to show all the individual tables (unjoined) created and populated*/
SELECT *
FROM appliance;
SELECT *
FROM customer;
SELECT *
FROM fault;
SELECT *
FROM manufacturer;
SELECT *
FROM new_stock;... |
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50726
Source Host : localhost:3306
Source Schema : fenxiao
Target Server Type : MySQL
Target Server Version : 50726
File Encoding : 65001
Date: 25/06/2021 09... |
<reponame>niyas/OPAS_ETL_PUSH
USE [AITool]
GO
/****** Object: StoredProcedure [dbo].[usp_IncidentManagement_WeeklyDataInsert] Script Date: 09/01/2018 16:11:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[usp_IncidentManagement_WeeklyDataInsert]
(
@IncidentId varchar(50),
@Notific... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 04, 2015 at 03:12 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=@@CHARACTER_SE... |
<gh_stars>0
SELECT MAX(hanbai_tanka), MIN(shiire_tanka)
FROM Shohin; |
<filename>apps/gjafakort/bin/startup.sql
\set db_user `echo $DB_USER`
\set db_password `<PASSWORD>`
\set db_name `echo $DB_NAME`
\set test_db_user `echo $TEST_DB_USER`
\set test_db_password `echo $<PASSWORD>`
\set test_db_name `echo $TEST_DB_NAME`
CREATE DATABASE :db_name;
CREATE DATABASE :test_db_name;
CREATE USER :... |
USE [League]
GO
/****** Object: Table [dbo].[Season] Script Date: 08.06.2019 16:52:39 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Season](
[SeasonID] [int] NOT NULL,
[StartDate] [date] NOT NULL,
[EndDate] [date] NOT NULL,
PRIMARY KEY CLUSTERED
(
[SeasonID] ASC
)WITH (PAD_IND... |
<filename>Database Basic/Data Aggregation - Exercises/Data Aggregation - Exercises/12. Rich Wizard, Poor Wizard.sql
SELECT SUM(e.Diff) AS SumDifference FROM (
SELECT w.DepositAmount - (
LEAD(DepositAmount) OVER (ORDER BY Id)
) AS Diff
FROM WizzardDeposits AS w
) AS e
-- OR THIS
SELECT SUM(e.Diff) AS SumDifferenc... |
<gh_stars>1-10
create table car (
id BIGSERIAL PRIMARY KEY,
make VARCHAR(100) NOT NULL,
model VARCHAR(100) NOT NULL,
model_year INTEGER NOT NULL,
price NUMERIC(19, 2) NOT NULL
);
insert into car (id, make, model, model_year, price) values (1, 'Volkswagen', 'Eurovan', 2000, '80436.21');
insert into car (id, make, m... |
<filename>challange15_dynamic_documents.sql<gh_stars>1-10
CREATE table documents (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT,
content TEXT,
author TEXT);
INSERT INTO documents (author, title, content)
VALUES ("<NAME>", "Fancy Stuff", "Ceiling wax, dragon wings, etc.");
INSERT INTO do... |
<reponame>isabella232/Ore-1
# --- !Ups
alter table project_versions drop column mcversion;
# --- !Downs
alter table project_versions add column mcversion varchar(255) default null;
|
<reponame>CSCfi/antero<gh_stars>1-10
IF NOT EXISTS (select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='sa' and TABLE_NAME='sa_suorat_yo_talous_5_kustannustiedot_harjoittelukoulut') BEGIN
create table sa.sa_suorat_yo_talous_5_kustannustiedot_harjoittelukoulut
(
tilik varchar(255)
, yliop varchar(255)
, yliop... |
/*
sauth mod support file - created by <EMAIL>
Use this file to import the data set from a Minetest 0.5 auth.sqlite
database file by copying it to the world folder you want to apply it
to and importing it with sqlite from that location. See readme file
for further information on using sqlite to import the default db.
... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50624
Source Host : localhost:3306
Source Database : cloud_oauth
Target Server Type : MYSQL
Target Server Version : 50624
File Encoding : 65001
Date: 2019-06-17 09:50:59
*/
SET FOREIGN_KEY_CHECKS=0;
... |
<reponame>mrudulpolus/kc<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/log/Release_2_0_logs/KRACOEUS-2816.sql
CREATE SEQUENCE KRIM_ROLE_PERM_ID_S INCREMENT BY 1 START WITH 10000 NOMAXVALUE NOCYCLE NOCACHE ORDER
/
|
ALTER TABLE `creature_template`
ADD COLUMN `MovementType` int(11) unsigned NOT NULL default '0' AFTER `MoveName`;
UPDATE `creature_template`
SET `MovementType` = '1' WHERE `MoveName` = 'Random';
UPDATE `creature_template`
SET `MovementType` = '2' WHERE `MoveName` = 'Waypoint';
ALTER TABLE `creature_template`
... |
-- --------------------------------------------------
-- TABLE IDN_OAUTH2_ACCESS_TOKEN
-- --------------------------------------------------
DELIMITER //
DROP TABLE IF EXISTS IDN_OAUTH2_ACCESS_TOKEN_SYNC//
CREATE TABLE `IDN_OAUTH2_ACCESS_TOKEN_SYNC` (
`SYC_ID` INT NOT NULL AUTO_INCREMENT,
`TOKEN_ID` varchar(255) NOT... |
<filename>data/20180323/price.sql
insert into t_jing_dong_price (id, last_update_date, price, sku) values (1, '2018-03-23 11:53:34', 52.9, 2877592);
insert into t_jing_dong_price (id, last_update_date, price, sku) values (2, '2018-03-23 11:55:39', 52.9, 2877592);
insert into t_jing_dong_price (id, last_update_date, pri... |
create table agenda (
data_livre date not null,
id integer not null,
horario_fim time,
horario_inicio time,
medico_id integer not null,
paciente_id integer,
primary key (data_livre, id, medico_id)
) |
update SR_CAT set questions = replace(questions, 'PROC_SUPPLIER_SUSTAINABILITY,','') where id = 55; |
SELECT * FROM Employees
WHERE YEAR(Birthday) = 1990 |
<reponame>justomiguel/java-bootcamp-2016
#Create and use database HighSchool
create database HighSchool;
use HighSchool;
#Create tables
CREATE TABLE Student (Registration_Number INT NOT NULL ,
First_Name TEXT NOT NULL,
Last_Name TEXT NOT NULL,
Date_Of_Birth DATE NOT NULL,
PRIMARY KEY (Registration_N... |
Select * from Good |
<filename>gemfirexd/tools/src/testing/java/org/apache/derbyTesting/system/mailjdbc/schema/schema.sql
--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownersh... |
<reponame>bcgov/cas-ciip-portal
-- Deploy ggircs-portal:function_import_swrs_organisation_facility to pg
begin;
create or replace function ggircs_portal.import_swrs_organisation_facility()
returns void as $function$
begin
with latest_reporting_period as (
select organisation.swrs_organisation_id, max(reporting_... |
<filename>database/wlodzimierz.sql
-- Copyright 2020-2021 <NAME>
--
-- 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
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required ... |
ALTER TABLE "udadefinition" ADD COLUMN "configurationtype" VARCHAR(255);
ALTER TABLE "udadefinitionhistory" ADD COLUMN "configurationtype" VARCHAR(255);
UPDATE "udadefinition" SET "configurationtype" = 'SUPPLIER';
UPDATE "udadefinitionhistory" SET "configurationtype" = 'SUPPLIER';
ALTER TABLE "udadefinition" ALTER C... |
<filename>openvim/database_utils/vim_db_structure.sql
/**
* Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U.
* This file is part of openmano
* All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may o... |
<reponame>jleiva-gap/Ed-Fi-Analytics-Middle-Tier<filename>src/EdFi.AnalyticsMiddleTier.DataStandard32/Equity/MSSQL/0004-View-StudentProgramCohortDim-Create.sql
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the... |
<gh_stars>100-1000
### select 功能测试 ###
# 初始化数据
delete from `Baikaltest`.`select` ;
insert into `Baikaltest`.`select`(id,name1,name2,age1,age2,class1,class2,address1,address2,height1,height2) values(1,'zhangsan1','zhangsan11',10,11,100,101,'zhangsanaddress1','zhangsanaddress11',1000,1001);
insert into `Baikaltest`.`sele... |
<reponame>BranoMacek/steampipe-mod-aws-compliance
with data as (
select
distinct name
from
aws_s3_bucket,
jsonb_array_elements(server_side_encryption_configuration -> 'Rules') as rules
where
rules -> 'ApplyServerSideEncryptionByDefault' ->> 'KMSMasterKeyID' is not null
)
select
-- Required Col... |
<gh_stars>1000+
-- +migrate Up
CREATE TABLE goalert_user (
id UUID PRIMARY KEY,
bio TEXT,
first_name TEXT,
last_name TEXT,
login TEXT UNIQUE,
email TEXT UNIQUE,
email_verified BOOLEAN NOT NULL default false,
role TEXT,
schedule_color TEXT,
time_zone TEXT,
title TEXT
);
-- type can be PUSH, EMAIL, VOICE, SMS... |
<gh_stars>1000+
SELECT CounterID, count(), max(GoalsReached), min(GoalsReached), minIf(GoalsReached, notEmpty(GoalsReached)) FROM test.hits GROUP BY CounterID ORDER BY count() DESC LIMIT 20;
SELECT CounterID, count(), max(GoalsReached), min(GoalsReached), minIf(GoalsReached, notEmpty(GoalsReached)) FROM test.hits GROUP... |
<reponame>hzy9819/GreenPlum_WooKongDB
\set step 100
\setrandom id1 1 99900
\set id2 :id1 + :step
SELECT pad FROM sbtest WHERE id BETWEEN :id1 AND :id2;
|
<reponame>juyeongkim/LabKeyModules<filename>ISCore/queries/immport/public/ISC_assoc_studies.sql
PARAMETERS($STUDY VARCHAR DEFAULT NULL)
SELECT DISTINCT
study_pubmed.study_accession
FROM
study.studyproperties AS SP,
study_pubmed,
(
SELECT
pubmed_id AS cpid,
study_accession AS csa
FROM
study_pubme... |
CREATE TABLE IF NOT EXISTS writers(
writer_id SERIAL PRIMARY KEY,
first_name VARCHAR NOT NULL,
last_name VARCHAR NOT NULL,
gender VARCHAR(1) NOT NULL
); |
--+ holdcas on;
set system parameters 'dont_reuse_heap_file=yes';
create table t1( a char(1200), b varchar(1200), c nchar(1200), d NCHAR VARYING(1200), e BIT(1200), f BIT VARYING(1200), g int, h SMALLINT, i BIGINT, j NUMERIC, k FLOAT, l DOUBLE, m MONETARY, n DATE, o TIME, p TIMESTAMP, q DATETIME);
i... |
<filename>test/sql/setup.sql<gh_stars>0
\set ON_ERROR_STOP
-- we need this to test older versions so they all have the same behavier
set client_min_messages = WARNING;
CREATE OR REPLACE FUNCTION expected_or_fail_bool(val bool, expected bool)
RETURNS void AS
$body$
BEGIN
IF val != expected THEN
RAISE EX... |
<reponame>analucatti/aplicacaofinanceira
DELETE FROM public.papel_servico;
DELETE FROM public.usuario_papel;
DELETE FROM public.usuario;
DELETE FROM public.papel;
DELETE FROM public.servico;
INSERT INTO public.usuario (usuario_id, nome_de_usuario, senha) VALUES(1, 'admin', '<PASSWORD>');
INSERT INTO public.usuario (us... |
create or replace function me() returns json as $$
declare
usr record;
begin
select * from data."user"
where id = request.user_id()
into usr;
return json_build_object(
'id', usr.id,
'user_name', usr.user_name,
'email', usr.email,
'role', usr.role
);
end
$$ stabl... |
<gh_stars>0
create database airline_tickets;
\c airline_tickets
create table tickets (
id serial not null,
nameCompany varchar(100) not null,
nameSeat varchar(100) not null,
available boolean not null
); |
<gh_stars>0
use cadastro;
alter table gafanhotos add column fazendo int;
alter table gafanhotos
add foreign key (fazendo)
references cursos(idcurso);
describe gafanhotos;
select * from gafanhotos;
UPDATE gafanhotos SET fazendo ='12' WHERE id='1';
select gafanhotos.nome , cursos.nome from gafanhotos join cursos ... |
CREATE PROC [dspUtil].[CreateSynonym]
@SchemaName TSTRING, @SynonymName TSTRING, @ObjectName TSTRING
AS
BEGIN
DECLARE @sql TSTRING;
-- drop if already exists
SET @sql = 'DROP SYNONYM IF EXISTS ' + @SchemaName + '.' + @SynonymName;
EXEC (@sql);
-- create synonym
SET @sql = 'CREATE SYNONYM ' + @SchemaName + '.'... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 07, 2021 at 08:53 AM
-- Server version: 5.6.49-cll-lve
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 03, 2019 at 11:46 AM
-- Server version: 5.7.24-0ubuntu0.18.04.1
-- PHP Version: 7.2.10-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
<gh_stars>0
CREATE TABLE features (
{descriptors}
);
|
<gh_stars>1-10
CREATE DATABASE IF NOT EXISTS blog;
USE blog;
DROP TABLE IF EXISTS ARTICLES;
CREATE TABLE ARTICLES (
ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
TITLE VARCHAR(255),
DESCRIPTION TEXT
);
INSERT INTO ARTICLES VALUES (null, 'Article par défaut', 'Description à venir...'); |
CREATE PROCEDURE [dbo].[BulkUpdatePullRequestComments]
@RepositoryId BIGINT,
@IssueId BIGINT,
@PendingReviewId BIGINT = NULL,
@DropWithMissingReview BIT = 0,
@Comments PullRequestCommentTableType READONLY
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statem... |
<reponame>j-sieben/PIT<filename>PIT/parameters/revoke_client_rights.sql
@tools/revoke_access.sql execute param
@tools/revoke_access.sql execute param_admin
@tools/revoke_access.sql "select, references" parameter_group
@tools/revoke_access.sql "select, references" parameter_realm
@tools/revoke_access.sql "select... |
CREATE TABLE sysdbdatabase (
id chave NOT NULL,
database CHARACTER VARYING(50) NOT NULL,
id_sysdbhost chave NOT NULL,
active BOOLEAN NOT NULL,
CONSTRAINT pk_sysdbdatabase PRIMARY KEY (id),
CONSTRAINT fk_sysdbdatabase_sysdbhost FOREIGN KEY (id... |
<reponame>ilya40umov/go-link<gh_stars>0
ALTER TABLE namespace
ADD COLUMN owner_account_id BIGINT NOT NULL REFERENCES user_account ON DELETE RESTRICT;
ALTER TABLE alias
ADD COLUMN owner_account_id BIGINT NOT NULL REFERENCES user_account ON DELETE RESTRICT; |
/*
################################################################################
Migration script to create a new curation status for unpublishing studies,
create a new UNPUBLISH_REASON table and create a new column in HOUSEKEEPING
to crossreference the unpublish reason.
Designed for execution with Flyway databas... |
-- start_ignore
-- end_ignore
-- @description query01 tests that multiple files are read as a single row each
--
select count(*) from file_as_row_multi_files;
-- Display on for output consistency between GPDB 5 and 6
\x on
\pset format unaligned
select * from file_as_row_multi_files order by text_blob;
|
<gh_stars>0
-- @author prabhd
-- @created 2012-12-05 12:00:00
-- @modified 2012-12-05 12:00:00
-- @tags dml
-- @db_name dmldb
-- @description union_test3: INTERSECT with generate_series
\echo --start_ignore
set gp_enable_column_oriented_table=on;
\echo --end_ignore
SELECT COUNT(*) FROM dml_union_r;
SELECT COUNT(*)... |
-- CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
GRANT SELECT ON Search.url_list TO 'user'@'localhost';
GRANT INSERT ON Search.url_list TO 'user'@'localhost';
GRANT UPDATE ON Search.url_list TO 'user'@'localhost';
GRANT DELETE ON Search.url_list TO 'user'@'localhost';
|
<filename>sql/db_update_0.9-alpha3_0.9-alpha4_mysql.sql<gh_stars>100-1000
create table {PREFIX}plugincategories (
class_name varchar(250) default null,
category varchar(250) default null
);
CREATE INDEX plugincat_idx ON {PREFIX}plugincategories(class_name, category);
create table {PREFIX}pluginlist (
plugin_fil... |
<gh_stars>100-1000
--
-- The contents of this file are subject to the license and copyright
-- detailed in the LICENSE and NOTICE files at the root of the source
-- tree and available online at
--
-- http://www.dspace.org/license/
--
---------------------------------------------------------------
-- DS-3086 OAI Harves... |
<gh_stars>0
--------------------------------------------------------------------------------
-- FUNCTION GetLocale ----------------------------------------------------------
--------------------------------------------------------------------------------
CREATE OR REPLACE FUNCTION GetLocale (
pCode text
) RETURNS u... |
<gh_stars>0
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: localhost (MySQL 5.6.33)
# Database: ion
# Generation Time: 2016-11-09 20:46:48 +0000
# ***************************************... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- Application: gallery
--
-- --------------------------------------------------------
--
-- Struttura della tabella `gallery_category`
--
CREATE TABLE IF NOT EXISTS `gallery_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`showcase` tinyint(1)... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.6.33-0ubuntu0.14.04.1 - (Ubuntu)
-- Server OS: debian-linux-gnu
-- HeidiSQL Version: 9.5.0.5196
-- ----------------------------------------------------... |
/*
Warnings:
- Added the required column `modifiedAt` to the `User` table without a default value. This is not possible if the table is not empty.
*/
-- CreateTable
CREATE TABLE "Organization" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTA... |
CREATE TABLE `events` (
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,
`event_bedding_resources_link_children` BIGINT UNSIGNED ,
`event_personal_resources_link_children` BIGINT UNSIGNED ,
`event_food_resources_link_children` BIGINT UNSIGNED ,
`event_place_link_children` BIGINT UNSIGNED ,
`event_person_link_children` BI... |
<reponame>DamolAAkinleye/ADF.procfwk
CREATE PROCEDURE [procfwk].[SetLogStagePreparing]
(
@ExecutionId UNIQUEIDENTIFIER,
@StageId INT
)
AS
BEGIN
SET NOCOUNT ON;
UPDATE
[procfwk].[CurrentExecution]
SET
[PipelineStatus] = 'Preparing'
WHERE
[LocalExecutionId] = @ExecutionId
AND [StageId] = @StageId
AND... |
-- Variables to use in extrapolating COVID cases from ILI data.
declare dr_visits_per_week, ili_baseline, h1n1_visits, h1n1_cases, detection_ratio float64;
-- How many times does the average American visit a primary-care provider each week?
-- We use the numbers from the CDC's web site https://www.cdc.gov/nchs/fastat... |
# framebuffer-srgb true
# gl-version 3 2
# textures-power-2 none
debug #t
parallax-mapping-samples 3
parallax-mapping-scale 0.3
threading-model Cull/Cull
audio-library-name p3openal_audio
model-path $THIS_PRC_DIR/assets
text-default-font assets/font/TerminessB.ttf
text-pixels-per-unit 64
window-title Devils Tower... |
<reponame>VickyJFoster/my_sql_octopus_poc<filename>Databases/SqlServerCentral/state/Tables/dbo.SyndicatedBlogs.sql
CREATE TABLE [dbo].[SyndicatedBlogs]
(
[Id] [int] NOT NULL IDENTITY(1, 1),
[BlogId] [int] NOT NULL,
[FeedUrl] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Enabled] [bit] NOT NULL,
[Auth... |
<filename>sql/create_table.sql
CREATE TABLE IF NOT EXISTS Faculty(
facid INT(10) AUTO_INCREMENT NOT NULL,
name VARCHAR(50) NOT NULL,
PRIMARY KEY (facid)
) DEFAULT CHARACTER SET = utf8;
CREATE TABLE IF NOT EXISTS Departments(
facid INT(10) NOT NULL,
name VARCHAR(50) NOT NULL,
PRIMARY KEY (facid,... |
-- CreateTable
CREATE TABLE "UserDocument" (
"id" TEXT NOT NULL,
"type" TEXT NOT NULL,
"citationKey" TEXT,
"lastModified" TIMESTAMP(3),
"added" TIMESTAMP(3),
"author" TEXT,
"editor" TEXT,
"title" TEXT,
"journal" TEXT,
"journaltitle" TEXT,
"booktitle" TEXT,
"date" TEXT,
... |
<reponame>JabRef/JabRefOnline<gh_stars>10-100
/*
Warnings:
- You are about to drop the column `other` on the `UserDocument` table. All the data in the column will be lost.
- Added the required column `displayName` to the `Group` table without a default value. This is not possible if the table is not empty.
- A... |
<reponame>Shuttl-Tech/antlr_psql
-- file:foreign_data.sql ln:779 expect:true
ALTER FOREIGN TABLE pt2_1 ADD CONSTRAINT pt2chk1 CHECK (c1 > 0)
|
-- file:float8.sql ln:92 expect:true
select ceiling(f1) as ceiling_f1 from float8_tbl f
|
-- file:rules.sql ln:241 expect:true
insert into rtest_system values ('neptun', 'Fileserver')
|
<filename>tests/root/get_num_tokens/02/test.sql
SELECT get_num_tokens('a--b--c--d', '--') = 4
|
select * from {{ dbt_unit_testing.source('dbt_unit_testing', 'source-with-dashes') }} |
ALTER TABLE movie ADD COLUMN mtime date;
CREATE TRIGGER movie_update_trg AFTER UPDATE ON movie
BEGIN
UPDATE movie SET mtime = datetime('NOW') WHERE rowid = new.rowid;
END;
CREATE VIEW cinema AS SELECT m.name, m.year, GROUP_CONCAT(d.name, "+")
AS directors
FROM movie m JOIN director_movie dm
ON m.mid=dm.mid JOIN direc... |
ALTER TABLE db_version CHANGE COLUMN required_12441_01_mangos_npc_spellclick_spells required_12465_01_mangos_spell_template bit;
DELETE FROM spell_template WHERE id=50574;
INSERT INTO spell_template (id, attr, attr_ex, attr_ex2, proc_flags, proc_chance, duration_index, effect0, effect0_implicit_target_a, effect0_impli... |
-- ----------------------------------------
-- -- CLEAR DOWN THE TABLE --
-- ----------------------------------------
TRUNCATE TABLE `gameobject_battleground`;
-- ----------------------------------------
-- MySQL dump 10.13 Distrib 5.5.37, for Win32 (x86)
--
-- Host: localhost Database: mangos0
-... |
DROP INDEX IF EXISTS data_file_md5sum_idx;
CREATE INDEX data_file_md5sum_idx on data_file(md5sum);
|
<gh_stars>0
//languages
--INSERT [dbo].[Localization_Culture] ([Id], [Name]) VALUES ('en-US', N'English (US)')
--GO
INSERT [dbo].[Localization_Resource] ([CultureId], [Key], [Value]) VALUES ('en-US', N'A value for the {0} property was not provided.', N'A value for the {0} property was not provided.');
INSERT [dbo].[... |
<filename>src/main/resources/Bootstrap.sql<gh_stars>0
/*******************************************************************************
Icebox Database - Version 1.0
Script: Bootstrap.sql
Description: Creates and populates the Icebox database.
DB Server: Oracle
Author: <NAME>
*****************************... |
{{ config(enabled=var('greenhouse_using_eeoc', True)) }}
select * from {{ var('eeoc') }}
|
<filename>src/question19to45/q22_answer.sql
# Q22
# 查询名字中含有“风”字的学生信息
# 简单,通配符
SELECT s.*
FROM Student as s
WHERE s.Sname LIKE '%风%';
# +---+-----+-------------------+----+
# |SId|Sname|Sage |Ssex|
# +---+-----+-------------------+----+
# |03 |孙风 |1990-12-20 00:00:00|男 |
# +---+-----+-----------------... |
<gh_stars>10-100
use `s3_dumpling_lightning2`;
insert into t2 (id, name) values (26, '26'), (27, '27');
insert into t2 (id, name) values (28, '28'), (29, '29');
|
<reponame>Rob--W/phabricator<filename>resources/sql/autopatches/20150930.drydock.log.1.sql
TRUNCATE {$NAMESPACE}_drydock.drydock_log;
ALTER TABLE {$NAMESPACE}_drydock.drydock_log
DROP resourceID;
ALTER TABLE {$NAMESPACE}_drydock.drydock_log
DROP leaseID;
ALTER TABLE {$NAMESPACE}_drydock.drydock_log
DROP messag... |
-- Update jiveVersion to JM 2.4
UPDATE jiveVersion SET majorVersion=2, minorVersion=4;
-- jiveGroupUser: Alter length of username column
ALTER TABLE jiveGroupUser ALTER COLUMN username SET DATA TYPE VARCHAR(100);
|
<gh_stars>1-10
/*
SQLyog Enterprise - MySQL GUI v6.15
MySQL - 5.1.36-community-log : Database - dharanpaper
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
create database if not exists `dharanpaper`;
USE `dharanpaper`;
... |
<gh_stars>10-100
CREATE SCHEMA IF NOT EXISTS cartodb;
CREATE OR REPLACE FUNCTION cartodb.CDB_QueryTables_Updated_At(query text)
RETURNS TABLE(dbname text, schema_name text, table_name text, updated_at timestamptz)
AS $$
WITH query_tables AS (
SELECT
CASE WHEN position('atm_machines' in query... |
-- Populates a DB with "dictionary" data.
-- Run this after creating tables, etc., with 0000_SCHEMA_before_patches_start.sql
-- Created 2010-01-27 by VG,
-- based on treebase-core/src/main/resources/initTreebase.sql by mjdominus
-- - Removed COMMIT and DELETE statements.
-- - Converted commented-out DB2 RESTART s... |
<reponame>opengauss-mirror/Yat<filename>openGaussBase/testcase/KEYWORDS/Global/Opengauss_Function_Keyword_Global_Case0027.sql<gh_stars>0
-- @testpoint:opengauss关键字Global非保留),作为序列名
--关键字不带引号-成功
drop sequence if exists Global;
create sequence Global start 100 cache 50;
drop sequence Global;
--关键字带双引号-成功
drop sequence... |
create table if not exists divisionReferee (
id bigint auto_increment,
divisionId bigint not NULL,
refereeId bigint not NULL,
isCenter tinyint not NULL,
isAssistant tinyint not NULL,
isMentor tinyint not NULL,
PRIMARY KEY (id),
unique index ux_divisionReferee(divisionId, refereeId)
) ... |
<filename>db/schema.sql
-- Drops the employeetracker_db if it exists currently --
DROP DATABASE IF EXISTS employeetracker_db;
-- Creates the "employeetracker_db" database --
CREATE DATABASE employeetracker_db;
-- Makes it so all of the following code will affect employeetracker_db --
USE employeetracker_db;
CREATE TA... |
<filename>db_backup/geocars.sql
-- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1
-- Время создания: Июл 18 2018 г., 14:55
-- Версия сервера: 10.1.31-MariaDB
-- Версия PHP: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Oct 25, 2019 at 11:54 AM
-- Server version: 10.1.41-MariaDB-0ubuntu0.18.04.1
-- PHP Version: 7.2.19-0ubuntu0.18.04.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
... |
<filename>dbv/data/schema/proc_get_national_sample_types.sql<gh_stars>0
DROP PROCEDURE IF EXISTS `proc_get_national_sample_types`;
DELIMITER //
CREATE PROCEDURE `proc_get_national_sample_types`
(IN from_year INT(11), IN to_year INT(11))
BEGIN
SET @QUERY = "SELECT
`month`,
`year`,
`edta`,
... |
INSERT INTO `reminder_types` VALUES (1,'Activities',1,1,NULL,'2017-06-07 00:00:08','2017-06-07 00:00:08'),(2,'Blood Pressure',1,1,NULL,'2017-06-07 00:00:15','2017-06-07 00:00:15'),(3,'Weight',1,1,NULL,'2017-06-07 00:00:25','2017-06-07 00:00:25'),(4,'Workout',1,1,NULL,'2017-06-07 00:00:32','2017-06-07 00:00:32'),(5,'Run... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Waktu pembuatan: 24 Sep 2019 pada 09.59
-- Versi server: 10.1.37-MariaDB
-- Versi PHP: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.