sql
stringlengths
6
1.05M
-- @testpoint: 插入超出右边界范围值,合理报错 drop table if exists int03; create table int03 (name int); insert into int03 values (2147483648); drop table int03;
<reponame>rubikloud/spark-public<filename>sql/hive/src/test/resources/sqlgen/generate_with_other_2.sql -- This file is automatically generated by LogicalPlanToSQLSuite. SELECT val, id FROM parquet_t3 LATERAL VIEW EXPLODE(arr2) exp1 AS nested_array LATERAL VIEW EXPLODE(nested_array) exp1 AS val WHERE val > 2 ORDER BY va...
INSERT INTO `user` (`userid`, `username`, `password`, `email`, `disattivo`) VALUES (1, 'MatteoRaga', 'matteo', '<EMAIL>', 0), (2, 'PaoloPenazzi', 'paolo', '<EMAIL>', 0), (3, 'DavideApli', 'davide', '<EMAIL>', 0), -- ALTER TABLE `user` -- MODIFY `userid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; INSERT INTO...
DROP TABLE IF EXISTS NOTES; DROP TABLE IF EXISTS ADRESSE; CREATE TABLE NOTES ( id VARCHAR PRIMARY KEY, body VARCHAR (250) NOT NULL ); CREATE TABLE ADRESSE ( id VARCHAR PRIMARY KEY, adresse VARCHAR (250) NOT NULL );
<filename>packages/jobs/deploy/schemas/app_jobs/procedures/run_scheduled_job.sql -- Deploy schemas/app_jobs/procedures/run_scheduled_job to pg -- requires: schemas/app_jobs/schema -- requires: schemas/app_jobs/tables/jobs/table -- requires: schemas/app_jobs/tables/scheduled_jobs/table BEGIN; CREATE FUNCTION app_jobs.r...
<filename>mmctegal_db.sql -- phpMyAdmin SQL Dump -- version 4.9.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Sep 06, 2021 at 02:12 PM -- Server version: 10.2.40-MariaDB-log-cll-lve -- PHP Version: 7.3.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; S...
<reponame>cnl-alexandre/bullao -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Generation Time: May 01, 2021 at 09:26 PM -- Server version: 5.7.26 -- PHP Version: 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `bullao` -- ...
<reponame>egalli64/hron -- examples on create table use hron; -- create a simple table with a primary key create table item ( item_id integer primary key, status char, name varchar(20), coder_id integer ); describe item; insert into item (item_id) values (12); select * from item; update item set st...
<gh_stars>1-10 -- Create a non-sysadmin account for the application to use CREATE LOGIN [ContosoClinicApplication] WITH PASSWORD = <<PASSWORD>> CREATE USER [ContosoClinicApplication] FOR LOGIN [ContosoClinicApplication] EXEC sp_addrolemember N'db_datareader', N'ContosoClinicApplication' EXEC sp_addrolemember N'db_data...
<gh_stars>100-1000 /* // Alpha Model // [ ] Not modeled in Nitro // [X] Modeled in Nitro // [-] Omitted in Nitro // [?] Unclear / has work to be done for Nitro { [X] title: { [X] type: String, [X] required: true }, [?] slug: { [X] type: String, [ ] required: true, // Not required in Nitro ...
<filename>tests/queries/149-float-gte-1.sql<gh_stars>0 select float_11 from nulls1 where float_11 >= 1.0 1.0
/* [df:title] The example for scalar select [df:description] This SQL is an example for scalar select of outside-SQL and also for the following functions: o auto-detection for alternate boolean methods */ -- #df:entity# -- +scalar+ -- !df:pmb! -- !!AutoDetect!! select mb.MEMBER_NAME from MEMBER mb left...
select c.id, c.libroId, c.fechaEntrega, l.titulo, l.categoria, l.distribucion, l.disponibles, l.precio, c.cantidad from compra c join libro l on c.libroId = l.id where c.id = :id
SET NAMES utf8mb4; -- ---------------------------- -- 1、租户信息表 -- ---------------------------- drop table if exists te_tenant; create table te_tenant ( id bigint not null comment '租户Id', strategy_id bigint not null ...
select sum(c_integer) over(), sum(c_integer) over(partition by c_date), c_integer, c_date from j7_v order by sum(c_integer) over(), sum(c_integer) over(partition by c_date) ;
CREATE EXTERNAL TABLE ${0} (id int, str text, num int) using csv location ${table.path};
select 100.00 * sum(case when p_type like 'PROMO%' then l_extendedprice * (1 - l_discount) else 0 end) as numerator, sum(l_extendedprice * (1 - l_discount)) as denominator from lineitem, part where l_partkey = p_partkey and l_shipdate >= '1992-01-01' and l_shipdate < '1998-01-01'
<gh_stars>1-10 ALTER TABLE user_google_mfa_credentials DROP CONSTRAINT user_google_mfa_credentials_pkey; ALTER TABLE user_google_mfa_credentials ADD PRIMARY KEY (user_id,mfa_provider_id);
-- -- BA / Group relations. -- CREATE TABLE mod_bam_bagroup_ba_relation ( id_bgr int NOT NULL, id_ba int NOT NULL, id_ba_group int NOT NULL, PRIMARY KEY (id_bgr), FOREIGN KEY (id_ba) REFERENCES mod_bam (ba_id) ON DELETE CASCADE, FOREIGN KEY (id_ba_group) REFERENCES mod_bam_ba_groups (id_ba_group) O...
<filename>install.sql whenever sqlerror exit begin if user != 'SYS' then raise_application_error(-20000,'You should be SYS for this'); end if; end; / begin if sys_context('USERENV','CON_NAME') != 'CDB$ROOT' then raise_application_error(-20000,'You should be in CDB$ROOT for this'); end if; end; / whenev...
<reponame>InsightsDev-dev/tajo select a.c_custkey, 123::INT8 as const_val, b.min_name from customer a left outer join ( select c_custkey, min(c_name) as min_name from customer group by c_custkey) b on a.c_custkey = b.c_custkey order by a.c_custkey;
<reponame>mdcallag/mysql-tools -- Copyright 2011 Google Inc. -- -- 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 by ...
CREATE TABLE tab, NO LOG, NO FALLBACK ( SOURCE_ID INT, RUN_ID INT, STATUS CHAR, LOAD_START timestamp(0), LOAD_END timestamp(0) ); CREATE TABLE ctl, NO LOG, NO FALLBACK AS ( SELECT EBC.SOURCE_ID, MAX(EBC.RUN_ID) AS RUN_ID, EBC.ST...
SELECT * FROM t0 WHERE c0 > 1 AND c1 IN (1, 2, 3)
--+ holdcas on; SELECT attr12_int_4vals_noidx, attr15_int_50vals_idx, COUNT(*) FROM base_c1 GROUP BY attr12_int_4vals_noidx, attr15_int_50vals_idx ORDER BY attr12_int_4vals_noidx; SELECT attr15_int_50vals_idx FROM virtual_c2 GROUP BY attr15_int_50vals_idx HAVING COUNT(*) > 1; SEL...
<filename>database/database.sql<gh_stars>0 /* Navicat Premium Data Transfer Source Server : MYSQL Source Server Type : MySQL Source Server Version : 100134 Source Host : localhost:3306 Source Schema : website Target Server Type : MySQL Target Server Version : 100134 File Encod...
<reponame>Gerardo02/ExamenP2_Laravel<filename>cine.sql -- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 26-03-2022 a las 00:53:14 -- Versión del servidor: 10.4.18-MariaDB -- Versión de PHP: 8.0.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRAN...
<reponame>kneelnrise/vep ALTER TABLE blog ALTER COLUMN content TYPE TEXT;
ALTER TABLE Project ADD DeploymentScript nvarchar(max) NULL
<filename>03-16-2022/scripts/loopscript.sql DECLARE message varchar(20) := 'Breaks at '; salary NUMBER := 0; type breakpoints IS VARRAY(5) OF INTEGER; breakat breakpoints; BEGIN breakat := breakpoints( DBMS_RANDOM.VALUE(1, 30), DBMS_RANDOM.VALUE(1, 30), DBMS_RAND...
CREATE TABLE entity ( entity_id serial PRIMARY KEY, column1 VARCHAR ( 50 ) NOT NULL, column2 VARCHAR ( 50 ) NOT NULL, column3 VARCHAR ( 50 ) NOT NULL );
-- -- Table structure for table `lkp_roles` -- CREATE TABLE IF NOT EXISTS `lkp_roles` ( `idlkp_roles` int(11) NOT NULL, `name` varchar(45) COLLATE utf8_bin NOT NULL, `role` varchar(45) COLLATE utf8_bin NOT NULL, PRIMARY KEY (`idlkp_roles`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Roles d...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Май 17 2021 г., 14:14 -- Версия сервера: 5.7.26 -- Версия PHP: 7.3.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTE...
<filename>sql/yjbb/600527.sql EXEC [EST].[Proc_yjbb_Ins] @Code = N'600527',@CutoffDate = N'2017-09-30',@EPS = N'0.0432',@EPSDeduct = N'0',@Revenue = N'9.96亿',@RevenueYoy = N'26.29',@RevenueQoq = N'48.59',@Profit = N'3466.84万',@ProfitYoy = N'206.18',@ProfiltQoq = N'38.16',@NAVPerUnit = N'2.0298',@ROE = N'2.13',@CashPerU...
CREATE TABLE emp6(emp_id int PRIMARY KEY,emp_name text);
<gh_stars>0 -- DROP TABLE IF EXISTS Book; -- DROP TABLE IF EXISTS Author; -- DROP TABLE IF EXISTS Users; -- DROP DATABASE IF EXISTS media_db; -- DROP USER IF EXISTS Ulna; -- DROP TYPE IF EXISTS kindOf; -- DROP TYPE IF EXISTS currentOf; -- DROP TYPE IF EXISTS roleOf; CREATE USER Ulna PASSWORD '<PASSWORD>'; CREATE DATAB...
CREATE DATABASE IF NOT EXISTS `dutta` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `dutta`; -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: dutta -- ------------------------------------------------------ -- Server version 5.7.20-log /*!40101 SET @OLD_CHARACTER_SET_CLI...
SET DEFINE OFF; CREATE UNIQUE INDEX AFW_01_MESG_PK ON AFW_01_MESG (SEQNC) LOGGING /
<filename>src/SFA.Apprenticeships.Data.AvmsPlus/dbo/Stored Procedures/uspVacancyGetFilledWithOpenApplicationsCount.sql create PROCEDURE [dbo].[uspVacancyGetFilledWithOpenApplicationsCount] ( @ManagingAreaId int, @numberOfDaysForFilledVacanc...
<reponame>ANMillerIII/Utility-LVSM-Classifier CREATE TABLE SPVAT_maintenance AS SELECT * FROM import_mitigation_results_to_db WHERE maintenance_p = 1;
<filename>src/Testing-SSDT/SimpleSales/Sales/Tables/Orders.sql CREATE TABLE [Sales].[Orders] ( [CustomerID] INT NOT NULL, [OrderID] INT IDENTITY (1, 1) NOT NULL, [OrderDate] DATETIME NOT NULL, [FilledDate] DATETIME NULL, [Status] CHAR (1) NOT NULL, [Amount] INT...
<reponame>MySolSo/nftglee DROP TABLE "public"."collections";
<filename>Current/Procedures With SET ROWCOUNT.sql IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[SQLCop].[test Procedures With SET ROWCOUNT]') AND type in (N'P', N'PC')) DROP PROCEDURE [SQLCop].[test Procedures With SET ROWCOUNT] GO CREATE PROCEDURE [SQLCop].[test Procedures With SET ROWCOUNT] ...
<reponame>debodirno/interviewbit-solutions /* Write a SQL Query to find those lowest duration movies along with the year, director’s name(first and last name combined), actor’s name(first and last name combined) and his/her role in that production. Output Schema: movie_title,movie_year,director_name,actor_name,role ...
<filename>packages/udaru-core/database/migrations/004.do.sql ALTER TABLE user_policies ADD column variables JSONB DEFAULT '{}'; ALTER TABLE team_policies ADD column variables JSONB DEFAULT '{}'; ALTER TABLE organization_policies ADD column variables JSONB DEFAULT '{}'; ALTER TABLE user_policies DROP CONSTRAINT user_p...
/***************************************************************************************/ -- STORED PROCEDURE -- RetrieveDeletedInstance -- -- DESCRIPTION -- Retrieves deleted instances where the cleanupAfter is less than the current date in and the retry count hasn't been exceeded -- -- PARAMETERS -- @coun...
DROP TABLE B_PERF_TEST GO DROP TABLE B_PERF_ERROR GO DROP TABLE B_PERF_CACHE GO DROP TABLE B_PERF_SQL_BACKTRACE GO DROP TABLE B_PERF_SQL GO DROP TABLE B_PERF_COMPONENT GO DROP TABLE B_PERF_HIT GO DROP TABLE B_PERF_CLUSTER GO DROP TABLE B_PERF_HISTORY GO
--! Previous: sha1:00946ba4c85710707a298cec714f0790e169ccc8 --! Hash: sha1:afb700880cd56270d6c4c326bd11d52f1db2f682 -- Enter migration here CREATE INDEX IF NOT EXISTS matter_created_at_on_matter ON matter (created_at); CREATE INDEX IF NOT EXISTS matter_updated_at_on_matter ON matter (updated_at);
<reponame>zyjzheng/cicd -- -------------------------------------------------------- -- 主机: 192.168.3.11 -- 服务器版本: 5.7.9-log - MySQL Community Server (GPL) -- 服务器操作系统: Linux -- HeidiSQL 版本: 9.3.0.4984 -- ------------------------------...
{{ config( materialized = 'table' ) }} with session_product as ( select distinct pv.session_id, pv.product_id, p.product_name from {{ ref('fct_page_views') }} pv left join {{ ref('dim_products') }} p on pv.product_id = p.product_id where 1=1 and pv.produ...
CREATE TABLE habitacion ( id_habitacion SERIAL NOT NULL, numero_habitacion varchar(5) NOT NULL, tipo varchar(100) NOT NULL, no_camas int4 NOT NULL, no_bannos int4 NOT NULL, descripcion varchar(100) NOT NULL, precio numeric(19, 2)DEFAULT 0 NOT NULL, piso varchar(2) NOT NULL, estado varchar(1) NOT NULL, PRIMARY KEY (...
ALTER TABLE users DROP COLUMN address_line_1, DROP COLUMN address_line_2 ;
/****** Object: View [dbo].[V_MyEMSL_Job_Counts_By_Instrument] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE VIEW [dbo].[V_MyEMSL_Job_Counts_By_Instrument] AS SELECT T_Jobs.Instrument, CONVERT(decimal(9, 1), SUM(T_MyEMSL_Uploads.Bytes / 1024.0 / 1024.0 / 1024.0)) AS GB, COUNT...
UPDATE user SET password = <PASSWORD>" WHERE user_id = "dean";
ALTER TABLE analysis_stats ADD COLUMN max_retry_count int(10) DEFAULT 3 NOT NULL AFTER done_job_count; ALTER TABLE analysis_stats ADD COLUMN failed_job_tolerance int(10) DEFAULT 0 NOT NULL AFTER max_retry_count;
/* SQL script to initialize CZIDLO core database for CZIDLO versions 4.4 - 4.6 */ /* Drop Indexes */ DROP INDEX IF EXISTS DIGITALDOCUMENT_ENTITYID; DROP INDEX IF EXISTS DIGITALINSTANCE_DIGDOCID; DROP INDEX IF EXISTS LIBRARY_REGISTRARID; DROP INDEX IF EXISTS IEIDENTIFIER_VALUE; DROP INDEX IF EXISTS URNNBN_REGISTRARC...
<reponame>SKalt/pg_sql_parser_tests IF count(*) > 0 FROM my_table THEN ...
/* SQLyog Ultimate v12.09 (64 bit) MySQL - 10.1.21-MariaDB : Database - vnopening ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN...
<filename>sql/_26_features_920/issue_12111_internal_coercibility_for_HV/cases/test_01.sql<gh_stars>0 set names utf8; prepare stmt from 'select COALESCE(?, ?)'; execute stmt using null, 'OK'; execute stmt using 'OK', 'NOK'; deallocate prepare stmt; prepare stmt from 'select DECODE(?, ?, ?, ?, ?, ?)'; execute stmt usin...
<gh_stars>1-10 BEGIN; create table unfinished_commands ( id serial primary key, command varchar(32) not null, chat_id int not null, created_by int not null, created_at timestamp default current_timestamp not null, unique (chat_id, created_by) ); create table shopping_items ( id serial primary key, name varcha...
Select name FROM songs;
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 20-12-2016 a las 11:38:12 -- Versión del servidor: 5.6.26 -- Versión de PHP: 5.6.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
<reponame>prasertcbs/sql_server<gh_stars>0 select * into TestCategory from Category select * from TestCategory delete TestCategory where CategoryID = 'AP' delete TestCategory -- REFERENCE constraint ระหว่าง OrderHdr กับ OrderMenuDtl select * from OrderHdr where OrderID in (1, 2, 3) select * from...
CREATE TABLE `tblAccountBalanceHistory` ( `AccountBalanceHistoryID` int(11) NOT NULL AUTO_INCREMENT, `AccountID` int(11) NOT NULL DEFAULT '0', `PermanentCredit` decimal(18,6) DEFAULT NULL, `TemporaryCredit` decimal(18,6) DEFAULT NULL, `BalanceThreshold` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0'...
<reponame>deblasis/topcoder-challenge-921801de-073c-40d2-8ee2-33f729fd228b -- The MIT License (MIT) -- -- Copyright (c) 2021 <NAME> <<EMAIL>> -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the So...
insert into estatus (ID_ESTATUS,desc_estatus, tipo_estatus) values(1,"Iniciado", "p"); insert into estatus (ID_ESTATUS,desc_estatus, tipo_estatus) values(2,"Finalizado", "p"); insert into estatus (ID_ESTATUS,desc_estatus, tipo_estatus) values(3,"Cancelado", "p"); insert into estatus (ID_ESTATUS,desc_estatus, tipo_estat...
<filename>src/var/database/schemas/users_table.sql DROP TABLE IF EXISTS users; CREATE TABLE users ( user_id text, first_name text, last_name text, username text unique, password text, avatar text, date_of_birth text, type text, room text, PRIMARY KEY (user_id) );
<gh_stars>0 -- Create new confirmed increase numbers -- First, set percent positive ppositive UPDATE combined SET totaltestresults = null WHERE totaltestresults = 0; /*UPDATE combined SET ppositive = ROUND(positive/totaltestresults,2);*/ DROP TABLE IF EXISTS tt_increase CASCADE; CREATE TABLE tt_increase AS SELECT co...
<gh_stars>0 INSERT INTO Like_entity (source, target) VALUES (0, 5), (1, 6), (2, 7), (3, 8), (4, 8), (5, 8), (8, 5);
/*==============================================================*/ /* dbms name: mysql 5.0 */ /* created on: 8/17/2018 7:33:53 pm */ /*==============================================================*/ drop table if exists barang_hpembelian; drop tabl...
<reponame>mech12/lte<gh_stars>0 -- -- Copyright (c) 1998, 2009, Oracle and/or its affiliates.All rights reserved. -- -- NAME -- hlpbld.sql -- -- DESCRIPTION -- Builds the SQL*Plus HELP table and loads the HELP data from a -- data file. The data file must exist before this script is run. -- -- USAGE -- To run ...
<reponame>unmoo1707/TBot CREATE TABLE AFK (userID INTEGER, Since INTEGER, Reason TEXT); CREATE TABLE Level (userID INTEGER PRIMARY KEY, XP Integer); CREATE TABLE Moderation(warnID BINARY(16) PRIMARY KEY, userID INTEGER, modID INTEGER, reason TEXT); CREATE TABLE TICKETS (userID INTEGER PRIMARY KEY, channelID INTEGER);
<reponame>bezlio/bezlio-apps SELECT emp.EmpID , emp.Name , CASE WHEN lh.LaborHedSeq IS NULL THEN 0 ELSE 1 END AS ClockedIn , lh.LaborHedSeq AS LaborID , a.CurrentActivity , a.LaborType , a.PendingQty , sup.EMailAddress as SupervisorEmail , emp.EMailAddress as EmployeeEmail , emp.Shift , emp.JCDept as Departm...
select * from country", "c CREATE TABLE person ( id INT, name VARCHAR(50), birthday DATE, country_id INT, CONSTRAINT pk_person PRIMARY KEY (id), CONSTRAINT fk_person_country FOREIGN KEY (country_id) REFERENCES country(id)) CREATE TABLE country ( id INT, country_name VARCHAR(50), CONSTRAINT pk_country PRIMARY KEY (id))
ALTER TABLE COUNTRY ADD COLUMN ID_GAME BIGINT; UPDATE COUNTRY SET ID_GAME = 1; ALTER TABLE COUNTRY ADD INDEX FK_COUNTRY_GAME (ID_GAME), ADD CONSTRAINT FK_COUNTRY_GAME FOREIGN KEY (ID_GAME) REFERENCES GAME (ID);
SET spark.sql.variable.substitute = FALSE; SET -v; SET; SET spark.sql.variable.substitute;
USE SqlUtils GO EXEC tSQLt.NewTestClass 'testMaster'; GO CREATE PROCEDURE testMaster.[test basic compare using master to locate current db works] AS BEGIN DECLARE @CRLF CHAR(2) = CHAR(13) + CHAR(10) DECLARE @Message NVARCHAR(MAX) = 'Data differences found between OURS <<< [SqlUtilsTests_A].[dbo].[AddressTypes] a...
<gh_stars>1-10 /********************************************************************************************************************* ** ** Procedure Name : dbo.threeOrganizationUpdate ** Author : <NAME> ** Date Created : 04/10/2007 ** ********************************************...
CREATE TABLE Route ( id int NOT NULL, active int, entry int, exit int, PRIMARY KEY (id) ); CREATE TABLE Region ( id int NOT NULL, PRIMARY KEY (id) ); CREATE TABLE Segment ( id int NOT NULL, length int NOT NULL DEFAULT 1, PRIMARY KEY (id) ); CREATE TABLE Sensor ( id int NOT NULL, region int NO...
<reponame>rashadhndrxx/scratch-project-45 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; ...
<gh_stars>10-100 CREATE TABLE subdivision_EE (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "subdivision_EE" ("id", "name", "level") VALUES (E'EE-37', E'Condado de Harju', E'county'); INSERT INTO "subdivision_EE" ("id", "name", "level") VALUES (E'EE-39', E'Hiiumaa...
-- file:plpgsql.sql ln:1837 expect:false exception when foreign_key_violation then raise notice 'caught foreign_key_violation'
<filename>modules/h2/src/test/java/org/h2/test/scripts/ddl/dropDomain.sql -- Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0, -- and the EPL 1.0 (http://h2database.com/html/license.html). -- Initial Developer: H2 Group -- CREATE DOMAIN E AS ENUM('A', 'B'); > ok CREATE DOMAIN E_NN AS ENUM('A', 'B') N...
INSERT INTO book (id, title) VALUES (11, 'The Pragmatic Programmer'); INSERT INTO member (id, name) VALUES (43, '<NAME>'); INSERT INTO checkout_item (member_id, book_id) VALUES (43, 11); SELECT name FROM member WHERE id IN ( SELECT checkout_item.member_id FROM checkout_item, book WHERE checkout_item.book_id = book.id A...
/* Navicat Premium Data Transfer Source Server : MySQL Source Server Type : MySQL Source Server Version : 100131 Source Host : localhost:3306 Source Schema : store Target Server Type : MySQL Target Server Version : 100131 File Encoding : 65001 Date: 15/05/2018 19:06:...
<reponame>giosil/wcron -- -- Triggers -- CREATE OR REPLACE TRIGGER TRG_JOBS_AUTOINC_ID BEFORE INSERT ON JOBS FOR EACH ROW BEGIN SELECT SEQ_JOBS.NEXTVAL INTO :NEW.ID FROM dual; END TRG_JOBS_AUTOINC_ID; / CREATE OR REPLACE TRIGGER TRG_ACTIVITIES AFTER INSERT ON ACTIVITIES FOR EACH ROW DECLARE vcUser VARCH...
CREATE PROCEDURE [dbo].[CreateSharedSourceSystemIdentifier] @entityTypeId UNIQUEIDENTIFIER, @sourceSystemId UNIQUEIDENTIFIER, @groupNumber INT AS BEGIN INSERT INTO [dbo].[SharedSourceSystemIdentifier] VALUES(@entityTypeId, @sourceSystemId, @groupNumber) END
<reponame>subhamoykarmakar224/GymBuddyCoach CREATE DATABASE IF NOT EXISTS `gymms` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `gymms`; -- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64) -- -- Host: localhost Database: gymms -- -------------------...
<filename>src/resources/sql/drop_aai_test.sql<gh_stars>1-10 DROP VIEW filterhelper DROP VIEW filterhelper_hack DROP TABLE resourcereferences DROP SEQUENCE resourcereferences_id_seq DROP TABLE grants DROP SEQUENCE grants_id_seq DROP TABLE resources CASCADE DROP SEQUENCE resources_id_seq DROP TABLE grantsets DROP SEQUEN...
<filename>src/main/resources/db/migration/daiad-manager/V1_0_8__Add_field_visible_to_scheduled_job_table.sql<gh_stars>1-10 alter table scheduled_job add visible boolean default true;
<filename>webserver/app-moe/sql/Archive/3.6.x/3.6.5/POCOR-3302/commit.sql -- db_patches INSERT INTO `db_patches` (`issue`, `created`) VALUES('POCOR-3302', NOW()); -- institutions ALTER TABLE `institutions` ADD COLUMN `is_academic` INT(1) NOT NULL DEFAULT 1 COMMENT '0 -> Non-academic institution\n1 -> Academic Institut...
<reponame>superkoh/k-framework DROP TABLE IF EXISTS `sns_wx_user`; CREATE TABLE `sns_wx_user` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID', `open_id_for_mp` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '' COMMENT '公众号openid', `open_id_for_open` varchar(64) CHARACTER SET utf8 C...
<reponame>EOussama/movies-library CREATE DATABASE `db_movies`; USE `db_movies`; -- Tables CREATE TABLE `movies`( `movieId` INT(11) NOT NULL AUTO_INCREMENT, `title` VARCHAR(50) NOT NULL, `description` TEXT NOT NULL, `length` SMALLINT(5) NOT NULL, `categories` VARCHAR(50) NOT NULL, `score` FLOAT NOT NULL, `releas...
drop sequence A2_BEPROPERTYVALUE_SEQ; / exit;
<filename>INDEX/IX_GEOGAUTHREC_VALIDCATTERMFG.sql CREATE INDEX "IX_GEOGAUTHREC_VALIDCATTERMFG" ON "GEOG_AUTH_REC" ("VALID_CATALOG_TERM_FG")
<reponame>fangzhi7816218/readingroom /* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50528 Source Host : localhost:3306 Source Database : reading Target Server Type : MYSQL Target Server Version : 50528 File Encoding : 65001 Date: 2015-05-21 21:59:0...
create schema distribute_function; set current_schema = distribute_function; create table function_table_01(f1 int, f2 float, f3 text); insert into function_table_01 values(1,2.0,'abcde'),(2,4.0,'abcde'),(3,5.0,'affde'); insert into function_table_01 values(4,7.0,'aeede'),(5,1.0,'facde'),(6,3.0,'affde'); analyze funct...
CREATE TABLE parent(id INT NOT NULL, PRIMARY KEY(id), name VARCHAR(256) NOT NULL, UNIQUE(name), state CHAR(2)); CREATE TABLE child(id INT NOT NULL, PRIMARY KEY(id), pid INT, GROUPING FOREIGN KEY(pid) REFERENCES parent(id), name VARCHAR(256) NOT NULL); CREATE TABLE customers ( cid int NOT NULL, PRIMARY KEY(cid), ...
<gh_stars>0 -- table: `users` SELECT `user_id`, `username` FROM `user`; -- insert new username into db INSERT INTO `user` (`username`, `screenname`, `original_user`) VALUES (%s, %s, %s); -- fetch the user_id just created SELECT `user_id` FROM `user` WHERE `username`=%s; ...
<filename>lab1/lab1_13.sql SELECT [FirstName] FROM [Person].[Person] WHERE ([Title] = 'Mr.')