sql stringlengths 6 1.05M |
|---|
<gh_stars>10-100
CREATE TABLE "public"."articles"("id" serial NOT NULL, "author_id" integer NOT NULL, "title" text NOT NULL, "about" text NOT NULL, "content" text NOT NULL, "created_at" timestamptz NOT NULL DEFAULT now(), PRIMARY KEY ("id") , FOREIGN KEY ("author_id") REFERENCES "public"."users"("id") ON UPDATE cascade... |
<reponame>dram/metasfresh
-- 2017-07-05T12:16:14.215
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Table_Process SET AD_Window_ID=540345,Updated=TO_TIMESTAMP('2017-07-05 12:16:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=540801 AND AD_Table_ID=540823
;
|
<filename>src/main/java/com/weibao/chaopei/sql/PolicyMainDao_getPolicyMainPage.sql
select p.id,p.prod_id,p.plan_id,p.plate_no,p.frame_no,p.engine_no,p.start_date,p.end_date,p.`status`,p.contact_name,p.policy_mobile,
p.invoice_type,p.create_time,p.user_id,p.holder_nature,p.holder_org_code,p.holder_comp_name,p.holder_co... |
<reponame>ukncsc/MailCheck.Public.MtaSts<filename>src/MailCheck.MtaSts.Migration/Scripts/everytime/grants.sql
GRANT SELECT, INSERT, UPDATE, DELETE ON `mtasts_entity` TO '{env}-mtasts-ent' IDENTIFIED BY '{password}';
GRANT SELECT ON `mtasts_entity` TO '{env}-mtasts-api' IDENTIFIED BY '{password}';
GRANT SELECT ON `mtas... |
DROP TABLE IF EXISTS "stop_times" CASCADE;
CREATE TABLE stop_times(trip_id VARCHAR,arrival_time VARCHAR,departure_time VARCHAR,stop_id VARCHAR,PRIMARY KEY (arrival_time,stop_id,trip_id));
DROP TABLE IF EXISTS "trips" CASCADE;
CREATE TABLE trips(trip_id VARCHAR,PRIMARY KEY (trip_id));
|
XQUERY
<title>An introduction to XQUERY</title>
|
version https://git-lfs.github.com/spec/v1
oid sha256:e5cf80965176aee0d9ef3b0fcb8cc862be6f9c0ac9310b47497df8674474edf6
size 464
|
<filename>baseline/psql_files/query05_discharge_notes_icd9_create_table.sql
DROP TABLE IF EXISTS W266_DISCHARGE_NOTE_ICD9_CODES;
CREATE TABLE W266_DISCHARGE_NOTE_ICD9_CODES AS
select noteevents.HADM_ID, dianoses_top20_icd.SUBJECT_ID, noteevents.CHARTDATE, noteevents.TEXT, dianoses_top20_icd.ICD9_CODES
from not... |
/* Source table definitions from:
https://github.com/OHDSI/CommonDataModel/tree/master/PostgreSQL
*/
CREATE TABLE person
(
person_id INTEGER NOT NULL ,
gender_concept_id INTEGER NOT NULL ,
year_of_birth INTEGER NOT NULL ,
month_of_birth INTEGER NULL,
day_of_birth ... |
select * from #../empty |
<gh_stars>1-10
#namespace("goodsGame")
#sql("findListPage")
SELECT
gg.id,m.openid,m.nick_name,g.goods_name,g.goods_image,gg.exp_amt,gg.screen,gg.status,gg.game_result,gg.update_time,gg.create_time
FROM
joy_goods g inner join joy_goods_game gg on gg.goods_id=g.id inner join joy_wechat_member m on m.id=... |
-- This file and its contents are licensed under the Apache License 2.0.
-- Please see the included NOTICE for copyright information and
-- LICENSE-APACHE for a copy of the license.
--documentation of these function located in chunk_index.h
CREATE OR REPLACE FUNCTION _timescaledb_internal.chunk_index_clone(chunk_index... |
<reponame>lavki/TestTask-PrizeDraw
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Янв 15 2019 г., 08:03
-- Версия сервера: 5.7.21
-- Версия PHP: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+... |
<gh_stars>0
SELECT dblink_cancel_query('dtest1');
|
DELETE
FROM
cc_student_medical_manager
WHERE
created_at > MDY(4, 1, 2015);
DELETE
FROM
cc_athlete_sicklecell_waiver
WHERE
created_at > MDY(4, 1, 2015);
DELETE
FROM
cc_student_medical_history
WHERE
created_at > MDY(4, 1, 2015);
DELETE
FROM
cc_athlete_medical_history
WHERE
created_at... |
<reponame>opengauss-mirror/Yat
-- @testpoint:openGauss保留关键字to作为 用户名,
--不带引号,合理报错
CREATE USER to PASSWORD '<PASSWORD>';
--加双引号,创建成功
drop user if exists "to";
CREATE USER "to" PASSWORD '<PASSWORD>';
--清理环境
drop user "to";
--加单引号,合理报错
CREATE USER 'to' PASSWORD '<PASSWORD>';
--加反引号,合理报错
CREATE USER `to`... |
<reponame>montolm/RegisterParts
select *
from user;
select name_category
from category
where id_category = 1;
select *
from part;
select a.id_part,a.name_part,b.name_category,a.creation_date,a.fec_actu,a.mca_inh,c.username
from part a
inner join category b
on a.id_category = b.id_category
inner join user c
... |
CREATE SCHEMA IF NOT EXISTS open_data;
CREATE OR REPLACE VIEW open_data.tmcs_count_data AS (
SELECT
d."COUNT_INFO_ID" AS count_id,
cim."COUNT_DATE"::DATE + d."COUNT_TIME"::TIME - '15 minutes'::interval AS time_start,
cim."COUNT_DATE"::DATE + d."COUNT_TIME"::TIME AS time_end,
d."N_CARS_R" AS sb_cars_r... |
<reponame>DDuncan-qa/20DecSDET2-IMS-Starter
INSERT INTO `customers` (`first_name`, `surname`) VALUES ('jordan', 'harrison');
INSERT INTO `items` (`name` , `value`) VALUES ('Laptop', 500.00);
INSERT INTO `items` (`name` , `value`) VALUES ('item1', 1.00);
INSERT INTO `orders` (`fk_customers_id`, `order_value`) VALUES (1,... |
<reponame>MadProgrammerGR/Assignment-Management
---- sudo -u postges -i or su postgres
---- createuser --pwprompt DBuser
---- createdb --owner=DBuser DBassignments
---- exit
---- psql -h 127.0.0.1 -d DBassignments -U DBuser
CREATE TYPE user_role AS ENUM ('professor', 'student');
CREATE TABLE users (
id serial prim... |
<reponame>jixu-invn/veterinary_clinic_database
Select A.traitements.EXTRACT('/traitements/traitement/@nom_veto').GETSTRINGVAL() as veto_myrtille,
A.traitements.EXTRACT('/traitements/traitement/medicament').GETSTRINGVAL() as medoc_utilise,
A.traitements.EXTRACT('/traitements/traitement/medicament/@qte').GETSTRINGVAL() ... |
-- CreateTable
CREATE TABLE "books" (
"id" SERIAL NOT NULL,
"title" VARCHAR(50),
"creator" VARCHAR(50),
"publisher" VARCHAR(50),
"id_category" INTEGER,
"isbn" VARCHAR(50),
"pages" VARCHAR(100),
"cover" VARCHAR(255),
"id_user" INTEGER,
"descriptions" TEXT,
PRIMARY KEY ("id")
... |
SELECT customers.name
FROM customers, addresses
WHERE customers.name > 'M' AND addresses.state > 'M'
AND customers.name <> addresses.state |
INSERT INTO tenants (id, name) VALUES ('hoge', '株式会社トヨテック');
INSERT INTO groups (id, name, tenant_id) VALUES ('FS', '財務部', 'hoge');
INSERT INTO users (username, encoded_password)
VALUES ('user1', '<PASSWORD>');
INSERT INTO users (username, encoded_password)
VALUES ('user2', '<PASSWORD>');
INSERT INTO groups_users (gr... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: mysql
-- Generation Time: Jul 02, 2020 at 02:01 PM
-- Server version: 10.4.13-MariaDB-1:10.4.13+maria~focal
-- PHP Version: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... |
<filename>uscho_women/sos/connectivity.sql
begin;
select
r.year,
r.school_div_id as t_div,
r.opponent_div_id as o_div,
sum(case when r.team_score>r.opponent_score then 1 else 0 end) as won,
sum(case when r.team_score<r.opponent_score then 1 else 0 end) as lost,
sum(case when r.team_score=r.opponent_score then 1 else 0... |
alter table fact_visits
add missingText varchar(300) |
<gh_stars>1-10
-- DDL generated by Postico 1.5.10
-- Not all database features are supported. Do not use for backup.
-- Table Definition ----------------------------------------------
CREATE TABLE fs_category_relationship (
fs_category_parent_id integer REFERENCES fs_category(id) ON DELETE CASCADE,
fs_categor... |
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100
-- file:advisory_lock.sql ln:146 expect:true
SELECT count(*) FROM pg_locks WHERE locktype = 'advisory'
|
<reponame>scossin/Achilles
-- 804 Number of persons with at least one observation occurrence, by observation_concept_id by calendar year by gender by age decile
--HINT DISTRIBUTE_ON_KEY(stratum_1)
WITH rawData AS (
SELECT
o.observation_concept_id AS stratum_1,
YEAR(o.observation_date) AS stratum_2,
p.gender_concep... |
<filename>laravel.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 27, 2021 at 06:53 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 7.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!... |
<reponame>Min-Flower/twu-biblioteca-MinWang<gh_stars>0
-- 4. ADD the book 'The Pragmatic Programmer', AND ADD yourself AS a member. CHECK OUT 'The Pragmatic Programmer'. USE your QUERY FROM question 1 TO verify that you have checked it out. Also, provide the SQL used TO UPDATE the database.
INSERT INTO book (id, title)... |
<filename>sql_scripts/Security/GetUserSID.sql
SET NOCOUNT ON
SELECT CONVERT(NVARCHAR(max), sid, 1) FROM sys.server_principals WHERE name='$(user)'
|
<gh_stars>0
/*from(br)*/CREATE TABLE `_mtable8` (
`_mcoldrn2aa` int(11) NOT NULL,
`_mcol1aq8myh` varchar(10) DEFAULT NULL,
`_mcol15vd1z0` varchar(20) DEFAULT NULL,
`_mcol1aa8g0t` varchar(20) DEFAULT NULL,
`_mcol13f1vc1` varchar(20) DEFAULT NULL,
`_mcoliqvlls` char(2) DEFAULT NULL,
`_mcol135uvyf` char(9) D... |
<filename>sample_project/dbt/models/templates/sources/new_source/source_example.sql
/*
Using the flight source files as an example, create dbt models that define
your Materialize source(s) on top of the streams.
*/
{{ config(
enabled = false,
materialized ='source'
) }}
{% set source_name %}
{{ mz_gen... |
<gh_stars>1-10
DROP TABLE IF EXISTS `ocenter_issue`;
DROP TABLE IF EXISTS `ocenter_issue_content`;
|
#standardSQL
# input types occurence prefined set %
CREATE TEMPORARY FUNCTION getInputStats(payload STRING)
RETURNS STRUCT<found_advanced_types BOOLEAN, total_inputs INT64> LANGUAGE js AS '''
try {
var $ = JSON.parse(payload);
var almanac = JSON.parse($._almanac);
var found_index = almanac['input-elemen... |
<filename>src/main/resources/scripts/class_queries/medication_administration/get_by_rut_and_medication_name.sql<gh_stars>1-10
SELECT *
FROM residence.medication_administration
WHERE elder_rut = ?
AND medication_name = ?; |
<gh_stars>1-10
select name from ol_account_custom
group by account_id having count(name)>1;
782 rows
delete from ol_account_custom where value =''; |
<reponame>postgrespro/tsvector2<filename>sql/json_flags.sql<gh_stars>1-10
CREATE EXTENSION tsvector2;
select jsonb_to_tsvector2('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::jsonb, '""');
select jsonb_to_tsvector2('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, ... |
<reponame>qingzma/CRegressionRDBM<filename>query/load_data/file7_u.sql
CREATE TABLE table7u (x DOUBLE, y DOUBLE) ROW FORMAT DELIMITED FIELDS TERMINATED BY ",";
LOAD DATA LOCAL INPATH '/Users/hduser/workspace/CRegressionRDBM/data/file7u.csv' INTO TABLE table7u; |
<reponame>LIXTON/biempleos2<filename>assets/biempleos2.sql
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 03-10-2017 a las 17:34:56
-- Versión del servidor: 5.7.9
-- Versión de PHP: 5.6.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
-- SET time_zone ... |
<filename>fixtures/doctests/lock/000_example/input.sql
BEGIN WORK;
LOCK TABLE films IN SHARE MODE;
SELECT id FROM films
WHERE name = 'Star Wars: Episode I - The Phantom Menace';
-- Do ROLLBACK if record was not returned
INSERT INTO films_user_comments VALUES
(_id_, 'GREAT! I was waiting for it for so long!');
C... |
<filename>_backup/db_backup_2016.07.05_22.23.05.sql
-- -------------------------------------------
SET AUTOCOMMIT=0;
START TRANSACTION;
SET SQL_QUOTE_SHOW_CREATE = 1;
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
-- ---------------------... |
<filename>_sql/mdr_device_sql_nak_masuk_dlm_yii2_learning.sql
/*
Navicat MySQL Data Transfer
Source Server : Local
Source Server Version : 100203
Source Host : localhost:3306
Source Database : medcast_v2
Target Server Type : MYSQL
Target Server Version : 100203
File Encoding : 65001... |
-- @testpoint:opengauss关键字no(非保留),作为外部数据源名
--关键字不带引号-成功
drop data source if exists no;
create data source no;
drop data source no;
--关键字带双引号-成功
drop data source if exists "no";
create data source "no";
drop data source "no";
--关键字带单引号-合理报错
drop data source if exists 'no';
create data source 'no';
--关键字带反引号-合理报错
dr... |
<reponame>ysaavedra/warehouse
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 10-04-2019 a las 01:56:52
-- Versión del servidor: 10.1.37-MariaDB
-- Versión de PHP: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTI... |
CREATE TABLE [dbo].[Features] (
[FeatureID] INT IDENTITY (1, 1) NOT NULL,
[Code] VARCHAR (50) NULL,
[CompanyID] INT NULL,
[Description] VARCHAR (250) NULL,
PRIMARY KEY CLUSTERED ([FeatureID] ASC),
FOREIGN KEY ([CompanyID]) REFERENCES [dbo].[Company] ([CompanyID])... |
/*
Navicat Premium Data Transfer
Source Server : php21
Source Server Type : MySQL
Source Server Version : 100406
Source Host : localhost:3307
Source Schema : laravel_lanhdd
Target Server Type : MySQL
Target Server Version : 100406
File Encoding : 65001
Date: 25/03/20... |
<reponame>Koala/mblock<filename>rexform_demo.sql
CREATE TABLE IF NOT EXISTS `rex_mblock_rexform_demo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`status` int(1) DEFAULT '1',
`name` text NOT NULL,
`mblock_field` text NOT NULL,
`createdate` datetime DEFAULT NULL,
`updatedate` datetime DEFAULT NULL,
`createuser... |
<filename>schema.sql
-- psql -d myDataBase -a -f myInsertFile.sql
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS pokefound;
DROP TABLE IF EXISTS poke;
-- holds all pokemon qualities and history of all poke found. Will not store duplicates
CREATE TABLE IF NOT EXISTS poke (
id SERIAL PRIMARY KEY,
name VARCHAR(20),
... |
SELECT
CategoryID,
CategoryDisplayName
FROM
CMS_SettingsCategory
WHERE
CategoryID IN @cmsSettingsCategoryIdsOnPaths |
<reponame>Melegaro-SENAI/S2019-T2-1-Api
CREATE DATABASE M_BookStore;
-- ou
CREATE DATABASE T_BookStore;
USE M_BookStore;
USE T_BookStore;
CREATE TABLE Generos
(
IdGenero INT PRIMARY KEY IDENTITY
,Descricao VARCHAR(200) NOT NULL UNIQUE
);
CREATE TABLE Autores
(
IdAutor INT PRIMARY KEY
... |
CREATE TABLE IF NOT EXISTS `games` (
`id` INT NOT NULL DEFAULT 0,
`idnr` INT NOT NULL DEFAULT 0,
`number1` INT NOT NULL DEFAULT 0,
`number2` INT NOT NULL DEFAULT 0,
`prize` INT NOT NULL DEFAULT 0,
`newprize` INT NOT NULL DEFAULT 0,
`prize1` INT NOT NULL DEFAULT 0,
`prize2` INT NOT NULL DEFAULT 0,
`pri... |
class AddAuthenticationToNotes < ActiveRecord::Migration
def up
add_column :notes, :role_visibility, :integer, default: 9, null: false
connection.execute(%q{
# https://github.com/postgraphql/postgraphql/blob/master/examples/forum/TUTORIAL.md#setting-up-your-schemas
ALTER TABLE notes ENABLE ROW L... |
<filename>sqls/analyze_init.sql
--
-- Check Table schema, auto-increment id, index
--
USE `database_name`;
SHOW tables;
DESC `table_name`;
SHOW CREATE TABLE `table_name` \G;
--
-- Create temp table based on one month data
--
CREATE TABLE `month_1705` as
select sender, receiver, content, receiver_time from `table... |
drop table if exists JOB_ERROR_MAPPING;
/*==============================================================*/
/* Table: JOB_ERROR_MAPPING */
/*==============================================================*/
create table JOB_ERROR_MAPPING
(
JOB_ID varchar(30) not null comment ... |
<filename>data/output.sql<gh_stars>1-10
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
--
-- Host: localhost Database: dbVol
-- ------------------------------------------------------
-- Server version 5.7.27
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_R... |
<filename>sql/database.sql
-- MySQL dump 10.13 Distrib 5.7.28, for Win64 (x86_64)
--
-- Host: 172.16.31.10 Database: my_fix_system
-- ------------------------------------------------------
-- Server version 5.7.31
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RES... |
CREATE TABLE cities (
id BIGSERIAL PRIMARY KEY NOT NULL,
"name" TEXT NOT NULL,
province TEXT NOT NULL,
country_code TEXT NOT NULL,
area_code VARCHAR(30) NOT NULL,
ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE UNIQUE INDEX idx_cities_area_code ON cities(area_code);
CREATE UNIQUE INDEX idx_cities... |
<filename>scripts/sql_dev/DataType_json.sql
/*
Data Type: JSON
*/
CREATE TABLE t1 (
a JSON,
b INT,
g INT GENERATED ALWAYS AS (a->"$.id"),
h INT GENERATED ALWAYS AS (a->"$.storeid"),
INDEX i (g),
INDEX j (h)
);
SELECT
CONCAT(a->"$.fname", ' ', a->"$.lname") AS name,
a->"$.id" AS id,
a->"$.storeid" A... |
CREATE TABLE IF NOT EXISTS address (
id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
street VARCHAR NOT NULL,
city VARCHAR NOT NULL,
voivodeship VARCHAR NOT NULL,
location VARCHAR NOT NULL, -- coords
UNIQUE (street, city, voivodeship, location)
);
GRANT ALL ON address TO fakers_u;
CREATE ... |
<reponame>aliostad/deep-learning-lang-detection<filename>data/test/sql/64e33ab5d4fc868b0a9cae5ea30d70fc98d846faMenu.sql
return
Insert into SYS_Menu
Select 'Url_Item_View','物料','Menu_MasterData','10','物料','~/Item/Index',
'~/Content/Images/Nav/Default.png',1
update SYS_Menu
Set imageurl='~/Content/Images/Nav/Default.png... |
<gh_stars>10-100
/*
SQL AGENT JOB : DAILY
=======================================================================
*/
GENERAL
----------------------------------------------------
NAME: Daily
OWNER: gemuser
CATEGORY: GEM
DESCRIPTION: NONE
STEPS
----------------------------------------------------
STEP NAME: Daily ... |
--------------------------------------------------------
-- File created - Ïîíåäåëíèê-Àïðèë-14-2014
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table ARTICLE
--------------------------------------------------------
CREATE TABLE "EL... |
create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."EXCHANGE_RATE_AB2" as (
-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type
select
cast(ID as
bigint
) as ID,
cast(CURRENCY as
varchar
) as CURRENCY,
cast(DATE as
date
) ... |
create trigger update_bid after insert on transactions for each row execute procedure trigger_update_bid();
|
/*
----------------------------------------------------------------------------
Shrink a Database File in Specified Increments
----------------------------------------------------------------------------
Author: <NAME> (t: @EitanBlumin | b: eitan<EMAIL>.<EMAIL>)
Creation Date: 2020-01-05
-----------------------------... |
-- Set Comparison (>=some/all)
-- #9
SELECT i1.name FROM instructor i1 WHERE i1.salary > SOME(SELECT i2.salary FROM instructor i2 WHERE i2.dept_name = 'Biology');
-- #10
SELECT i1.name FROM instructor i1 WHERE i1.salary > ALL(SELECT i2.salary FROM instructor i2 WHERE i2.dept_name = 'Biology' );
-- #11
SELECT de... |
INSERT INTO slider_sliderimage ("order", title, file, url)
SELECT "order", title, file, url
FROM site_sliderimage
|
<gh_stars>1-10
/*
Navicat MySQL Data Transfer
Source Server : 本地
Source Server Version : 50719
Source Host : localhost:3306
Source Database : dolphin
Target Server Type : MYSQL
Target Server Version : 50719
File Encoding : 65001
Date: 2018-02-08 08:05:58
*/
SET FOREIGN_KEY_CHECKS=... |
ALTER TABLE db_version CHANGE COLUMN required_2008_12_22_04_mangos_item_template required_2008_12_22_07_mangos_quest_template bit;
alter table `quest_template`
add column `PlayersSlain` tinyint(3) UNSIGNED DEFAULT '0' NOT NULL after `CharTitleId`,
add column `BonusTalents` tinyint(3) UNSIGNED DEFAULT '0' NOT N... |
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50548
Source Host : 127.0.0.1:3306
Source Database : male_ambry
Target Server Type : MYSQL
Target Server Version : 50548
File Encoding : 65001
Date: 2016-11-23 16:35:54
*/
SET FOREIGN_KEY_CHECKS=... |
-- MySQL dump 10.13 Distrib 5.7.12, for Win32 (AMD64)
--
-- Host: 127.0.0.1 Database: proyectodephp
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.21-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CH... |
/*
Warnings:
- The `status` column on the `Semester` table would be dropped and recreated. This will lead to data loss if there is data in the column.
*/
-- CreateEnum
CREATE TYPE "SemesterStatus" AS ENUM ('open', 'closed', 'current', 'finished');
-- AlterTable
ALTER TABLE "Semester" DROP COLUMN "status",
ADD CO... |
-- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 30, 2014 at 05:29 AM
-- Server version: 5.6.16
-- PHP Version: 5.5.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... |
<filename>src/test/resources/jp/co/tis/gsp/tools/dba/mojo/GenerateDdlMojo_test/specifiedSchemaInEdm/oracle/expected/ddl/10_CREATE_TEST_TBL2.sql
CREATE TABLE SCHEMA_TEST.TEST_TBL2 (
TEST_TBL2_ID NUMBER NOT NULL ,
TEST_TBL1_ID NUMBER NOT NULL ,
TEST_NAME VARCHAR2(20 CHAR)
);
COMMENT ON table SCHEMA_TEST.TEST_TBL2 i... |
metadata :name => "SimpleRPC Agent For APT Management",
:description => "Agent To Manage APT",
:author => "<NAME>",
:license => "GPLv2",
:version => "1.1",
:url => "https://github.com/mstanislav/mCollective-Agents",
:timeout => 90
action "upgrades... |
<gh_stars>1-10
-- test numeric hash join
set enable_hashjoin to on;
set enable_mergejoin to off;
set enable_nestloop to off;
create table nhtest (i numeric(10, 2)) distributed by (i);
insert into nhtest values(100000.22);
insert into nhtest values(300000.19);
explain select * from nhtest a join nhtest b using (i);
se... |
/*
Navicat Premium Data Transfer
Source Server : 127.0.0.1
Source Server Type : MySQL
Source Server Version : 50717
Source Host : localhost:3306
Source Schema : message
Target Server Type : MySQL
Target Server Version : 50717
File Encoding : 65001
Date: 24/04/2019 18... |
<gh_stars>1-10
# Quote all table names with '{' and '}', and prefix all system tables with 'core.'
CREATE TABLE `{page}` (
`id` int(10) unsigned NOT NULL auto_increment,
`title` varchar(255) NOT NULL default '',
`name` varchar(64) default NULL,
`u... |
-- @testpoint:opengauss关键字cardinality(非保留),作为游标名
--前置条件
drop table if exists cardinality_test cascade;
create table cardinality_test(cid int,fid int);
--关键字不带引号-成功
start transaction;
cursor cardinality for select * from cardinality_test order by 1;
close cardinality;
end;
--关键字带双引号-成功
start transaction;
cursor "card... |
<filename>18_copying_a_table.sql
-- Creating a copy of a table --
USE sql_store;
CREATE TABLE orders_archived AS SELECT * FROM orders;
-- note: the copy table won't have the original table's attributes
-- `SELECT * FROM orders` is a sub-query
INSERT INTO orders_archived
SELECT * FROM orders WHERE order_date < '2019-0... |
<filename>database/migrations/20210815154343_util.up.sql
create extension if not exists plpgsql with schema pg_catalog;
create extension if not exists "uuid-ossp" with schema public;
create extension if not exists citext with schema public;
create extension if not exists pgcrypto with schema public;
create ... |
<filename>db/schema.sql
DROP DATABASE IF EXISTS so5tlxyy1a2qgpud;
CREATE DATABASE so5tlxyy1a2qgpud;
USE so5tlxyy1a2qgpud;
CREATE TABLE songs(
id INT NOT NULL AUTO_INCREMENT,
burger_name VARCHAR(45) NOT NULL,
devoured IF(devoured, 'true', 'false') devoured
PRIMARY KEY (id)
);
|
-- Updates the phase of the game with the given ID
UPDATE Game SET phase = ? WHERE id = ?
|
<gh_stars>0
PRAGMA foreign_keys = on;
.headers off
.mode column
SELECT "";
SELECT "-------- Trigger 6 verification --------";
SELECT "-- Keep the storage of an infrastructure updated according to the delivery associated with a distribution";
SELECT "-- center.";
SELECT "";
SELECT "-- Let's start by seeing the amount ... |
<gh_stars>0
CREATE TABLE USER (
ID BIGINT NOT NULL AUTO_INCREMENT,
USERNAME VARCHAR(50) UNIQUE NOT NULL,
PASSWORD VARCHAR(500) NOT NULL,
NAME VARCHAR(500) NOT NULL,
USER_EMAIL VARCHAR(250) NOT NULL,
ACTIVE BIT NOT NULL DEFAULT 1,
LOCKED BIT NOT NULL DEFAULT 0,
EXPIRATION_DATE DATETIME NULL DEFAULT NULL,
PASSWO... |
<gh_stars>0
SET @sName = 'bx_posts';
|
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Temps de generació: 27-09-2019 a les 22:19:17
-- Versió del servidor: 10.4.6-MariaDB
-- Versió de PHP: 7.1.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
CREATE SCHEMA IF NOT EXISTS api;
DROP TYPE IF EXISTS api.husnummer CASCADE;
CREATE TYPE api.husnummer AS (
id TEXT,
municpalityCode TEXT,
municipalityName TEXT,
streetCode TEXT,
streetName TEXT,
streetBuildingIdentifier TEXT,
postcodeIdentifier TEXT,
districtName TEXT,
presentationstring TEXT,
vejp... |
create materialized view gift_card_cancellation_reasons_view as
select
gc.id,
-- Subtype
case when count(r) = 0
then
null
else
to_json((r.reason_type, r.body)::export_reasons)
end as canceled_reason
from gift_cards as gc
left join reasons as r on (gc.canceled_reason = r.id)
group... |
<reponame>CSCfi/antero
USE [ANTERO]
GO
/****** Object: StoredProcedure [dw].[p_lataa_d_arvokyselykerta] Script Date: 24.10.2019 12:11:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dw].[p_lataa_d_arvokyselykerta] AS
if not exists (select * from dw.d_arvokyselykerta where id=-1) begi... |
INSERT INTO student (first_name, last_name) VALUES
('Bill', 'Gates'),
('Rafa', 'Nadal'),
('Angela', 'Merckel');
INSERT INTO tuition (fee, student_id) VALUES
(100000, 1),
(50000, 2),
(254000, 3);
|
<reponame>Shuttl-Tech/antlr_psql
-- file:portals_p2.sql ln:25 expect:true
DECLARE foo19 CURSOR FOR
SELECT * FROM onek WHERE unique1 = 56
|
<reponame>Shuttl-Tech/antlr_psql
-- file:numeric.sql ln:447 expect:true
INSERT INTO num_exp_ln VALUES (9,'17.03145425013166006962')
|
<gh_stars>100-1000
SELECT
has_maxvalue = 0
FROM
sql_range_partitions
WHERE
table_name='test_sql_range_partitions_quarter_no_maxvalue'
;
|
ALTER TABLE [dbo].[OpenIDAssociation]
ADD CONSTRAINT [PK_OpenIDAssociations] PRIMARY KEY CLUSTERED ([AssociationId] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF);
|
<gh_stars>0
CREATE TABLE "Container" (
records TEXT,
PRIMARY KEY (records)
);
CREATE TABLE "FileLevelMetadata" (
"File_Name" TEXT NOT NULL,
"File_Description" TEXT NOT NULL,
"Standard" TEXT,
"UTC_Offset" TEXT,
"File_Version" TEXT,
"Contact" TEXT,
"Date_Start" DATETIME,
"Date_End" DATETIME,
"North... |
<filename>migrations/codeinsights/1000000012/up.sql
BEGIN;
-- Insert migration here. See README.md. Highlights:
-- * Always use IF EXISTS. eg: DROP TABLE IF EXISTS global_dep_private;
-- * All migrations must be backward-compatible. Old versions of Sourcegraph
-- need to be able to read/write post migration.
-- ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.