sql stringlengths 6 1.05M |
|---|
-- +migrate Up
CREATE INDEX idx_ep_step_policies ON escalation_policy_steps (escalation_policy_id);
-- +migrate StatementBegin
CREATE FUNCTION fn_enforce_ep_step_limit() RETURNS trigger AS $$
DECLARE
max_count INT := -1;
val_count INT := 0;
BEGIN
SELECT INTO max_count max
FROM config_limits
WHERE... |
<gh_stars>1-10
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
CREATE INDEX pg2_co_btree_idx1_b0 ON pg2_co_table_btree_index_b0 (numeric_col);
|
CREATE PROCEDURE `pha_stock_report_by_date`(
IN tenant_id INT(11),
IN report_date VARCHAR(10)
)
BEGIN
SELECT
batch_id,
batch_no,
product_name,
expiry_date,
SUM(total_purchase_qty) AS total_purchase,
SUM(total_sale_quantity) AS total_sale,
(SUM(total_purchase_qty) - SUM(total_sale_quantity)) AS stock,
IFNULL(FO... |
-- @testpoint: opengauss关键字postfix(非保留),作为同义词对象名,部分测试点合理报错
--前置条件
drop table if exists postfix_test;
create table postfix_test(id int,name varchar(10));
--关键字不带引号-成功
drop synonym if exists postfix;
create synonym postfix for postfix_test;
insert into postfix values (1,'ada'),(2, 'bob');
update postfix set postfix.na... |
<filename>openGaussBase/testcase/KEYWORDS/in/Opengauss_Function_Keyword_In_Case0027.sql
-- @testpoint:opengauss关键字in(保留),作为序列名
--关键字不带引号-合理报错
drop sequence if exists in;
create sequence in start 100 cache 50;
--关键字带双引号-成功
drop sequence if exists "in";
create sequence "in" start 100 cache 50;
--清理环境
drop sequence "... |
<reponame>opengauss-mirror/Yat
-- @testpoint: degrees函数入参为空值
select degrees(null);
select degrees('');
|
<filename>symfony/data/sql/lib.model.schema.sql
# This is a fix for InnoDB in MySQL >= 4.1.x
# It "suspends judgement" for fkey relationships until are tables are set.
SET FOREIGN_KEY_CHECKS = 0;
#-----------------------------------------------------------------------------
#-- pp_meta
#------------------------------... |
<reponame>tpDcc/tpDcc-libs-datalibrary
INSERT OR IGNORE INTO versions (uuid, version, name, comment, user)
SELECT '$(UUID)','$(VERSION)','$(NAME)','$(COMMENT)','$(USER)'
WHERE NOT EXISTS(
SELECT 1 FROM versions WHERE NAME='$(NAME)'
);
-- INSERT OR IGNORE INTO
-- map_versions(element_id, version_id)
-- SELECT
-- ... |
<filename>ConsoleApp/.NETFramework/HelloWorld/SQLServerLocalDB/sql/dbo.Book.data.sql
INSERT INTO [dbo].[Book] ([ID], [Name], [Price]) VALUES (1, N'C# Language', 21.3)
INSERT INTO [dbo].[Book] ([ID], [Name], [Price]) VALUES (2, N'C++ Language', 99)
INSERT INTO [dbo].[Book] ([ID], [Name], [Price]) VALUES (3, N'Java Lang... |
<reponame>luthfi0354/1818068-AhmadLuthfi-Tugas-RestfulServer
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 22, 2021 at 01:05 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET ... |
<filename>queries.sql
-- Multi-Table Query Practice
-- Display the ProductName and CategoryName for all products in the database. Shows 77 records.
select ProductName, CategoryId from [Product];
-- Display the order Id and shipper CompanyName for all orders placed before August 9 2012. Shows 429 records.
-- SELECT ... |
CREATE TABLE `majors`(
major_id INT(11) PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(50)
);
CREATE TABLE `subjects`(
subject_id INT(11) PRIMARY KEY AUTO_INCREMENT,
subject_name VARCHAR(50)
);
CREATE TABLE `students`(
student_id INT(11) PRIMARY KEY AUTO_INCREMENT,
student_number VARCHAR(12),
student_name VAR... |
-- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 04, 2016 at 07:04 PM
-- Server version: 5.5.16
-- PHP Version: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... |
-- +goose Up
-- SQL in this section is executed when the migration is applied.
-- The intent of this table was to use TimescaleDB
CREATE TABLE metrics_development (
time TIMESTAMPTZ NOT NULL,
node_name TEXT NOT NULL,
cpu_used INT NOT NULL,
mem_used INT NOT NULL
);
CREATE TABLE metrics_test (
LIKE metrics_de... |
<reponame>radityaputranto/example_codeigniter
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 29, 2017 at 10:35 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101... |
DROP EXTENSION IF EXISTS pgcrypto CASCADE;
DROP SCHEMA IF EXISTS {{SCHEMA}} CASCADE;
CREATE SCHEMA {{SCHEMA}} AUTHORIZATION postgres;
GRANT ALL ON SCHEMA {{SCHEMA}} TO postgres;
|
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 21, 2020 at 04:37 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
DROP TABLE IF EXISTS routes;
CREATE TABLE routes (
route_id int primary key,
route_short_name varchar,
route_long_name varchar,
route_fare decimal,
route_service varchar,
route_city varchar,
route_headsign1 varchar,
route_poly1 varchar,
route_headsign2 varchar,
route_poly2 varch... |
CREATE PROC [dbo].[SetUserPasswordExpiryDate]
@userId INT
AS
BEGIN
UPDATE smApplicationUsers
SET passwordExpiryDate = DATEADD(MONTH, 3, GETDATE())
WHERE userId = @userId
UPDATE smApplicationUsers
SET loginAttempts = 0
WHERE userId = @userId
END
GRANT EXECUTE ON SetUserPasswordExpiryDate TO b... |
/*
проект AirBnB
онлайн-площадка для размещения, поиска и аренды жилья.
Содержит данные о субъектах(арендаторы и арендодатели), объектах аренды и контрактах.
*/
-- Субъекты
CREATE TABLE public.subjects (
id bigint NOT NULL GENERATED ALWAYS AS IDENTITY,
firstname text NOT NULL,
middlename text NULL,
lastname tex... |
start core_random_v.package.sql
start core_random.package.sql
start company_data.package.sql
start company_random.package.sql
start computer_data.package.sql
start computer_random.package.sql
start consumer_data_electronics.package.sql
start consumer_data_dairy.package.sql
start consumer_data_bread.package.sql
start co... |
-- file:xml.sql ln:238 expect:true
INSERT INTO xmltest VALUES (6, '<myns:menu xmlns:myns="http://myns.com"><myns:beers><myns:name>Budvar</myns:name><myns:cost>free</myns:cost><myns:name>Carling</myns:name><myns:cost>lots</myns:cost></myns:beers></myns:menu>'::xml)
|
<reponame>Db2-DTE-POC/db2shift
-------------------------------------
-- Top customers by state
-------------------------------------
connect to sample;
set current_schema="DVDEMO";
WITH BY_STATE(STATE,CUSTCOUNT) AS (
SELECT JSON_VALUE(INFO,'$.contact.state' RETURNING CHAR(2)), COUNT(*) FROM CUSTOMERS
GROUP BY JSON_... |
create table states (
id bigserial not null,
name varchar(255),
country_id int8 not null,
primary key (id)
);
alter table states
add constraint uk_state_name unique (name);
alter table states
add constraint FKskkdphjml9vjlrqn4m5hi251y
foreign key (country_id)
references countries;
|
<filename>src/main/resources/camel/query/manado/writer-customer-merge.sql<gh_stars>1-10
merge into Vehicles as v1
using (select :#id as Id,
:#customer_name as CustomerName,
:#police_number as PoliceNumber,
:#vincode as VinCode
) as v2
on (v1.Id = v2.Id)
when ma... |
<gh_stars>1-10
CREATE TABLE IF NOT EXISTS codeintel_langugage_support_requests (
id SERIAL,
user_id integer NOT NULL,
language_id text NOT NULL
);
CREATE UNIQUE INDEX IF NOT EXISTS codeintel_langugage_support_requests_user_id_language ON codeintel_langugage_support_requests(user_id, language_id);
|
--SELECT title, description FROM film;
--SELECT *
--FROM film
--WHERE length > 60 AND length < 75;
--SELECT *
--FROM film
--WHERE rental_rate = 0.99 AND replacement_cost = 12.99 OR replacement_cost = 28.99
--SELECT *
--FROM customer
--WHERE first_name = 'Mary'
SELECT *
FROM film
WHERE length <= 50 AND rental_rate... |
CREATE DEFINER=`root`@`localhost` PROCEDURE `prc_GetCronJobSetting`(IN `p_CronJobID` INT)
BEGIN
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
select Settings from tblCronJob where CronJobID=p_CronJobID;
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
END |
<reponame>ckohler1972/gophish<gh_stars>0
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
CREATE INDEX idx_events_campaign_id ON "events" ("campaign_id");
CREATE INDEX idx_results_campaign_id ON "results" ("campaign_id");
CREATE INDEX idx_results_r_id ON "results" ("r_id");
-- +goose Do... |
DELETE
FROM Orders
WHERE ReturnDate IS NULL |
<reponame>yorek/devweek2016
------------------------------------------------------------------------
-- Author: <NAME> (SolidQ)
-- Credits: -
-- Copyright: Attribution-NonCommercial-ShareAlike 2.5
-- Tab/indent size: 4
------------------------------------------------------------------------
USE DynamicSchema
GO
D... |
-- ----------------------------------------------------------------
--
-- This is a script to add the MIMIC-III indexes for Postgres.
--
-- ----------------------------------------------------------------
-- Define the schema where all the indexes are created
SET search_path TO mimiciii;
-- Restoring the search path ... |
<filename>haikudepotserver-core/src/main/resources/db/haikudepot/migration/V1.45__Usage_conditions.sql
-- A small addition to the user data structures to hold settings related to
-- users agreeing to the user usage conditions.
CREATE TABLE haikudepot.user_usage_conditions_agreement (
id BIGINT NOT NULL,
active BOO... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 15, 2018 at 02:12 AM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE... |
<gh_stars>1-10
CREATE TABLE repositories (
name VARCHAR NOT NULL PRIMARY KEY,
path VARCHAR NOT NULL
)
|
BEGIN;
DROP TABLE IF EXISTS path_segment_traces CASCADE;
-- TODO: Spend more time on the EXPLAIN
CREATE TABLE path_segment_traces AS
WITH within_bounds_by_track_point AS (
SELECT
track_points.ogc_fid AS track_point_id,
path_segments.id AS path_segment_id,
row_number() OVER (
... |
<reponame>johannesgerer/peekattack<gh_stars>1-10
#######################################################################
# Erzeugt die Matches
#######################################################################
#### used in updateFilterCounts.sql
DROP VIEW IF EXISTS `vFilterCounts`;
CREATE OR REPLACE ALGORIT... |
<reponame>colindcli/COLINBLOG
--OUTER_KEYS
SELECT
FK = OBJECT_NAME(pt.constraint_object_id),
Referenced_tbl = OBJECT_NAME(pt.referenced_object_id),
Referencing_col = pc.name,
Referenced_col = rc.name
FROM sys.foreign_key_columns AS pt
INNER JOIN sys.columns AS pc
ON pt.parent_object_id = pc.[object_id]
AND pt.par... |
<reponame>billinkc/SSMSTemplates
-- Thanks Aaron
-- http://sqlblog.com/blogs/aaron_bertrand/archive/2007/01/11/reviewing-autogrow-events-from-the-default-trace.aspx
-- http://msdn.microsoft.com/en-us/library/ms191263.aspx
-- http://msdn.microsoft.com/en-us/library/ms187491.aspx
DECLARE @path NVARCHAR(260);
SELECT
... |
-- file:plpgsql.sql ln:3457 expect:true
create or replace function raise_test() returns void as $$
begin
raise
|
/*
Navicat Premium Data Transfer
Source Server : 172.16.58.3_3306
Source Server Type : MySQL
Source Server Version : 50644
Source Host : 172.16.58.3:3306
Source Schema : db_gardenprotector
Target Server Type : MySQL
Target Server Version : 50644
File Encoding : 65001
... |
create table PricingPublish (
KeyEMDPricing varchar(255) not null,
ActiveRow bit,
InstrumentDeliveryEnd datetime(6),
InstrumentDeliveryStart datetime(6),
InstrumentValue double precision,
InstrumentValueAsOf datetime(6),
InstrumentValuePublishDate datetime(6),
KeyInstrument varchar(255),
KeyIn... |
-- Name: RoiLinkagesByFileId
-- Schema: posda_files
-- Columns: ['roi_id', 'sop_instance_uid', 'contour_type']
-- Args: ['file_id']
-- Tags: ['LinkageChecks', 'used_in_struct_linkage_check']
-- Description: Get list of Roi with info by file_id
--
--
select
distinct roi_id,
linked_sop_instance_uid as sop_instance... |
<gh_stars>10-100
DO
$$
begin
if not exists (select 1 from device_function_mapping where "function" = 'SET_RANDOMISATION_SETTINGS') then
insert into device_function_mapping (function_group, "function") values ('OWNER', 'SET_RANDOMISATION_SETTINGS');
end if;
end;
$$ |
CREATE FUNCTION func536() RETURNS integer
LANGUAGE plpgsql
AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE159);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE481);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE420);val:=(SELECT COUNT(*)INTO MYCOU... |
<reponame>Jmaharman/docs.particular.net
startcode MsSqlServer_SubscriptionSubscribeSql
declare @dummy int;
merge EndpointNameSubscriptionData with (holdlock) as target
using(select @Endpoint as Endpoint, @Subscriber as Subscriber, @MessageType as MessageType) as source
on target.Endpoint = source.Endpoint and
... |
<gh_stars>100-1000
/*
Copyright 2019 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/LICENSE-2.0
Unless required by applicable law or agreed to in writi... |
SELECT
name, thread_ts, thread_dur
FROM thread_slice;
|
<filename>sql/0004-publication_isbn.sql
CREATE TABLE `publication_isbn` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`publication_id` int(10) unsigned DEFAULT NULL,
`isbn` varchar(50) COLLATE utf8_czech_ci NOT NULL,
`note` varchar(255) COLLATE utf8_czech_ci NOT NULL,
`type` enum('ISBN','ISSN') COLLATE utf... |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2016-01-12 09:42:18
-- 服务器版本: 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_SET_CLIENT */;
/*!40101 SET ... |
-- @testpoint: 测试创建哈希索引时,是否支持NULL first|last关键字,部分step合理报错
--创建表
drop table if exists t_hash_index_0060;
create table t_hash_index_0060
(
id01 char(20),
id02 char(20)
)
with(orientation=row);
--创建哈希索引(是否支持nulls first|last)
create index i_hash_index_0060_01 on t_hash_index_0060 using hash(id01 nulls first);
c... |
<reponame>treebat1/SQL
/*
Created By: <NAME>
Website: http://www.wisesoft.co.uk
Description:
Script databases for attach. Run this script before detaching your databases to generate an attach script for each database.
Also checks db ownership chaining, trustworthy and broker enabled settings which are nor... |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 28, 2020 at 03:41 PM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<reponame>cleysonsilvame/disk-pizza
INSERT INTO `tb_cliente` VALUES (1,'11988045319','07260346','987','<NAME>','Jardim Angélica Guarulhos/SP'),(2,'11988410457','07241150','915','<NAME>','Jardim Ansalca Guarulhos/SP'),(3,'11991048859','07135290','492','<NAME>','Jardim Adriana Guarulhos/SP'),(4,'11981218227','07033140','... |
<filename>mssql/General/stored-proc-with-cursor-loop.sql<gh_stars>0
CREATE OR ALTER PROCEDURE [dbo].[prc_run_some_crap]
(
@id BIGINT,
@unused_second_param_id BIGINT
)
AS
BEGIN
PRINT '@id=' + CONVERT(VARCHAR(10), @id);
PRINT '@unused_second_param_id=' + CONVERT(VARCHAR(10), @unuse... |
<filename>sql/yjbb/600318.sql<gh_stars>0
EXEC [EST].[Proc_yjbb_Ins] @Code = N'600318',@CutoffDate = N'2017-09-30',@EPS = N'0.08',@EPSDeduct = N'0',@Revenue = N'4.57亿',@RevenueYoy = N'-26.35',@RevenueQoq = N'-7.21',@Profit = N'3958.92万',@ProfitYoy = N'-62.45',@ProfiltQoq = N'-100.34',@NAVPerUnit = N'2.8534',@ROE = N'3.0... |
<filename>!_ServersExpExamples/zz_skybox/a_v0_mvc_BootStrapThymleaf_trash/src/main/webapp/configTmp/schema.sql
CREATE TABLE CUSTOMER(
id BIGINT AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(64),
last_name VARCHAR(64),
email_address VARCHAR(64),
address VARCHAR(64),
city VARCHAR(64),
country VARCHAR(64),
... |
<reponame>sharkodlak/php-dbal
ALTER TABLE category
ADD UNIQUE (name);
ALTER TABLE film
ADD UNIQUE (title);
INSERT INTO film (film_id, title, description, language_id, length, release_year) VALUES
(-1, 'Die Welle', 'A high school teacher''s experiment to demonstrate to his students what life is like under a dictators... |
<reponame>navikt/isdialogmote
-- ROLLBACK-START
------------------
-- DROP INDEX IX_MOTE_TILDELT_VEILEDER_IDENT;
-- DROP INDEX IX_MOTE_TILDELT_ENHET;
-- DROP INDEX IX_TID_STED_MOTE_ID;
-- DROP INDEX IX_MOTEDELTAKER_ARBEIDSGIVER_MOTE_ID;
-- DROP INDEX IX_MOTEDELTAKER_ARBEIDSGIVER_VIRKSOMHETSNUMMER;
-- DROP INDEX IX_MOTE... |
CREATE OR REPLACE FUNCTION kartoza_road_score_mapper () RETURNS trigger LANGUAGE plpgsql
AS $$
BEGIN
SELECT
CASE
WHEN new.road_type = 'Motorway link' THEN 1
WHEN new.road_type = 'Motorway or highway' THEN 0.8
WHEN new.road_type = 'Primary link' THEN 0.7
WHEN n... |
<filename>test_append/lineitem/update_5.sql
INSERT INTO public.lineitem VALUES (4289888, 7636, 5137, 2, 35, 54027.05, 0.06, 0.07, 'N', 'O', '1996-05-09', '1996-03-19', '1996-05-28', 'TAKE BACK RETURN ', 'REG AIR ', 'lent packages. carefull');
INSERT INTO public.lineitem VALUES (1825797, 126695, 6696, 1, 50, 8... |
<reponame>SkillsFundingAgency/das-commitments
CREATE TABLE [dbo].ApprenticeshipConfirmationStatus
(
[ApprenticeshipId] BIGINT NOT NULL,
[ApprenticeshipConfirmedOn] DATETIME2 NULL,
[CommitmentsApprovedOn] DATETIME2 NOT NULL,
[ConfirmationOverdueOn] DATETIME2 NULL,
CONSTRAINT [FK_ApprenticeshipConfirmationStatus_Ap... |
INSERT INTO burgers (name) VALUES ('Double Whataburger');
INSERT INTO burgers (name) VALUES ('Tex - Mex Burger');
INSERT INTO burgers (name) VALUES ('Hangover Burger');
INSERT INTO burgers (name) VALUES ('Brisket BBQ Burger');
INSERT INTO burgers (name) VALUES ('Smoke Gouda Burger');
INSERT INTO burgers (name) VALUES (... |
USE poe_currency;
DROP TABLE searches;
DROP TABLE visits;
DROP TABLE visitors;
USE migrations; |
<gh_stars>0
INSERT INTO MARKS VALUES('20','12','10','0','15CS31','1BI17CS001');
INSERT INTO MARKS VALUES('20','12','12','0','15CS32','1BI17CS001');
INSERT INTO MARKS VALUES('12','12','12','0','15CS33','1BI17CS001');
INSERT INTO MARKS VALUES('20','20','20','0','15CS34','1BI17CS001');
INSERT INTO MARKS VALUES('17','15','... |
<filename>edexOsgi/build.edex/opt/db/ddl/hmdb/load_cli_mon_season_yr.sql
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose... |
drop VIEW if EXISTS reclada.v_filter_inner_operator;
CREATE OR REPLACE VIEW reclada.v_filter_inner_operator
AS
SELECT ' , ' AS operator, 'JSONB' AS input_type , true as brackets
UNION SELECT ' AND ' , 'TIMESTAMP WITH TIME ZONE' , false
;
|
# Users and Notes schema
# --- !Ups
CREATE TABLE "USERS" (
"ID" SERIAL,
"EMAIL" varchar(255) UNIQUE NOT NULL,
"PASSWORD" varchar(255) NOT NULL,
"ROLE" varchar(20) NOT NULL,
PRIMARY KEY ("ID"));
CREATE TABLE "NOTES" (
"ID" SERIAL,
"OWNER" bigint NOT NULL REFERENCES "USERS"("ID"),
"TYPE" varchar(20) NOT ... |
<filename>farrago/unitsql/expressions/row.sql
-- $Id$
-- Test ROW constructor
-- NOTE: sales.depts is used because optimizer fails
-- when onerow is replaced with values().
-- Should change once optimizer is fixed.
-- NOTE: field names of ROW constructors are implementation-defined.
-- These tests rely on Farrago... |
<gh_stars>1-10
insert into hypervisor(name) values(?)
|
-- phpMyAdmin SQL Dump
-- version 4.4.10
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: 2016-04-13 09:20:29
-- 服务器版本: 5.5.42
-- PHP Version: 5.6.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101... |
<filename>microsetta_private_api/db/patches/0087.sql<gh_stars>1-10
CREATE TABLE barcodes.daklapack_order_to_kit
(
dak_order_id uuid NOT NULL,
kit_uuid uuid NOT NULL,
CONSTRAINT dak_order_to_kit_uuid_pkey PRIMARY KEY ( dak_order_id, kit_uuid ),
CONSTRAINT fk_dak_order_id FOREIGN KEY ( dak_order_id ) REFE... |
<reponame>lol768/tabula
-- TAB-579
create table studentcourseyeardetails (
id nvarchar2(250) not null,
scjcode nvarchar2(20) not null,
scesequencenumber nvarchar2(4) not null,
academicYear number(4,0) not null,
enrolmentstatuscode nvarchar2(10),
modeofattendancecode nvarchar2(10),
yearofstudy nvarchar2(2),
... |
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: eshop
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/... |
-- FUNCTION: topology.f_trigger_insert_predio_gis()
-- DROP FUNCTION topology.f_trigger_insert_predio_gis();
CREATE OR REPLACE FUNCTION topology.f_trigger_insert_predio_gis()
RETURNS trigger
LANGUAGE 'plpgsql'
COST 100
VOLATILE NOT LEAKPROOF
AS $BODY$
declare
ID_PREDIO_GIS int;
_ZO... |
<filename>sql/adsearch_tokyo.sql
-- MySQL dump 10.13 Distrib 5.7.23, for Linux (x86_64)
--
-- Host: 192.168.127.12 Database: adsearch.tokyo
-- ------------------------------------------------------
-- Server version 5.7.14-google-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @O... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Apr 10, 2020 at 06:58 PM
-- Server version: 5.7.26
-- PHP Version: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
<reponame>dfds/team-service<filename>db/migrations/20200403150052_add_creation_timestamp_and_last_modified_timestamp_to_topic_table.sql
-- 2020-04-03 15:00:52 : add_creation_timestamp_and_last_modified_timestamp_to_topic_table
ALTER TABLE public."KafkaTopic"
ADD COLUMN "Created" timestamp;
ALTER TABLE public."KafkaTo... |
CREATE TABLE IF NOT EXISTS `oc_product_profile` (
`product_id` int(11) NOT NULL,
`profile_id` int(11) NOT NULL,
`customer_group_id` int(11) NOT NULL,
PRIMARY KEY (`product_id`,`profile_id`,`customer_group_id`)
) ENGINE=MyISAM COLLATE=utf8_general_ci;
CREATE TABLE IF NOT EXISTS `oc_profile` (
`profile_id` ... |
-- MySQL Script generated by MySQL Workbench
-- 05/29/20 00:09:53
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL... |
<reponame>PacktPublishing/PostgreSQL-10-Quick-Start-Guide
CREATE OR REPLACE RULE
r_append_to_playlist
AS ON INSERT
TO files
WHERE ( NEW.f_type = 'mp3' )
DO ALSO
INSERT INTO playlist( p_name )
VALUES ( NEW.f_name );
|
-- capi3c.test
--
-- db eval {CREATE INDEX i2 ON t2(a)}
CREATE INDEX i2 ON t2(a) |
-- file:name.sql ln:73 expect:true
SELECT parse_ident(' aaa . ')
|
<filename>sql/updates/world/already_applied/12_01_21_00_smart_scripts.sql<gh_stars>10-100
-- Sealing the Way (Deepholm) Questfix
-- by <NAME>
UPDATE creature_template SET AIName="SmartAI" WHERE entry=43170 LIMIT 1;
SET @ENTRY := -6594081;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
INSERT INTO `smart_scri... |
<reponame>Tognolia/Calsses<gh_stars>0
use bank;
SELECT * FROM regional_unempl_rank u
where u.rank_u in (1,2,3);
#join
#Q: can we get regional unempl. for each client
select * from client c
join district d
on c.district_id = d.A1;
#join more thatn two tables
#bridge join
select * from client c
join district d #right ... |
# User schema
# --- !Ups
ALTER TABLE `documents`
ADD COLUMN `path` VARCHAR(255) NOT NULL AFTER `updated_at`;
# --- !Downs
ALTER TABLE `documents`
DROP COLUMN `path`;
|
<gh_stars>0
# --- !Ups
ALTER TABLE interaction MODIFY COLUMN note text null;
ALTER TABLE interaction MODIFY COLUMN result text null;
ALTER TABLE recruiter_credit_history add column units int signed null;
# --- !Downs
ALTER TABLE interaction MODIFY COLUMN note varchar(255) null;
ALTER TABLE interaction MODIFY COLUMN ... |
<reponame>jianyuezhexue/gin-vue-admin
/*
Navicat Premium Data Transfer
Source Server : Localhost
Source Server Type : MySQL
Source Server Version : 50726
Source Host : localhost:3306
Source Schema : qmplus
Target Server Type : MySQL
Target Server Version : 50726
File Encoding ... |
/**
* Contains the MySQL schema for Peachy Tools.
*
* @author Nim <<EMAIL>>
*/
/*
CREATE DATABASE peachy_tools
DEFAULT CHARACTER SET utf8mb4
DEFAULT COLLATE utf8mb4_unicode_ci;
*/
/* ---------- S U G G E S T I O N ---------- */
CREATE TABLE suggestion (
suggestion TEXT NOT NULL,
url ... |
<filename>bancoDeDados/bd_galeria.sql
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 28-Nov-2017 às 02:02
-- Versão do servidor: 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... |
CREATE TABLE event_stream(
uuid UUID NOT NULL PRIMARY KEY,
last_block_height BIGINT NOT NULL DEFAULT 1,
created TIMESTAMPTZ NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc'),
updated TIMESTAMPTZ NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc')
);
CREATE TABLE tx_status(
uuid UUID NOT NULL PRIMARY KEY,
tx_... |
create table if not exists lab_folder
(
id bigint(20) unsigned primary key auto_increment comment '主键',
del tinyint(4) not null default 0 comment '是否删除,0否,1是',
creator varchar(20) not null comment '创建者',
create_time datetime not null default current_timestamp comment '创建时间',
... |
--Order the transactions by card holder and date
SELECT cc.id_card_holder, trans.trans_date, trans.amount FROM credit_card AS cc
INNER JOIN transactions AS trans
ON trans.card = cc.card
ORDER BY cc.id_card_holder, trans.trans_date;
--isolate the transactions between 7am and 9pm
SELECT cc.id_card_holder, trans.trans_da... |
<reponame>angoca/log4db2
--#SET TERMINATOR ;
/*
Copyright (c) 2012 - 2014, <NAME> (AngocA)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyr... |
INSERT INTO cfc_app_location VALUES(1,'world','2020-08-03 05:07:12.060299','global','world','world',3);
INSERT INTO cfc_app_location VALUES(2,'United States','2020-08-03 05:07:36.507308','country','tucson','world.usa',3);
INSERT INTO cfc_app_location VALUES(3,'Arizona, USA','2020-08-03 05:07:52.073199','state','tucson'... |
--CLIENT
create class t_tr(i int, tbl varchar(255));
create table t1 (i int);
create trigger tr1 before delete on t1 execute insert into t_tr values(obj.i, 't1');
insert into t1 values (1), (2), (3), (4), (5);
create table t2 (i int);
create trigger tr2 before delete on t2 execute insert into t_tr values(obj.i, 't2')... |
<filename>openGaussBase/testcase/KEYWORDS/Comments/Opengauss_Function_Keyword_Comments_Case0028.sql<gh_stars>0
-- @testpoint: opengauss关键字comments(非保留),作为同义词对象名,部分测试点合理报错
--前置条件
drop table if exists comments_test;
create table comments_test(id int,name varchar(10));
--关键字不带引号-成功
drop synonym if exists comments;
crea... |
CREATE TABLE usuario (
id INTEGER PRIMARY KEY AUTOINCREMENT,
nombre VARCHAR(50),
apPat VARCHAR(50),
apMat VARCHAR(50),
email VARCHAR(100) UNIQUE,
passwd VARCHAR(50)
);
INSERT INTO usuario (nombre, apPat, apMat, email, passwd) VALUES("Cesar", "Hernandez", "Antonio", "<EMAIL>", "<PASSWORD>");
CREATE TABLE mensaje... |
<reponame>giyansanusi/Seller
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 18, 2017 at 02:59 PM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLI... |
<filename>music-link.sql
DROP DATABASE IF EXISTS cascade_link;
CREATE DATABASE cascade_link;
\c cascade_link
DROP TABLE IF EXISTS instruments;
CREATE TABLE instruments
(
id SERIAL PRIMARY KEY,
instrument TEXT NOT NULL
);
INSERT INTO instruments
(instrument)
VALUES
('piano'),
('organ'),
('harpsichord'),
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.