sql stringlengths 6 1.05M |
|---|
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
`id_users` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(254) NOT NULL,
`first_name` varchar(45) NOT NULL,
`last_name` varchar(45) NOT NULL,
`pas... |
<gh_stars>1-10
BEGIN;
SELECT * FROM no_plan();
-- Setup an observable table:
CREATE TABLE "public"."foobar" (
"id" SERIAL PRIMARY KEY,
"name" VARCHAR(100)
);
SELECT * FROM observe_table('public', 'foobar', true);
-- Try to insert a single value and observe the changelog table grow in size:
INSERT INTO "public".... |
<filename>SRV/SRV/SRV/srv/Stored Procedures/RunLogBackupDB.sql
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE [srv].[RunLogBackupDB]
@ClearLog BIT = 1 --усека... |
<filename>sql_study_1/page14/exercise6.sql
-- after "FROM purchases" add code to get a maximum of 5 rows
-- in descending order by the "price" column
SELECT *
FROM purchases
ORDER BY price DESC
LIMIT 5; |
<gh_stars>10-100
DROP TABLE IF EXISTS modules; |
CREATE TABLE IF NOT EXISTS "captcha_captchastore" (
"id" integer NOT NULL PRIMARY KEY,
"challenge" varchar(32) NOT NULL,
"response" varchar(32) NOT NULL,
"hashkey" varchar(40) NOT NULL UNIQUE,
"expiration" datetime NOT NULL
);
DROP TABLE IF EXISTS "notifications_usernotification";
CREATE TABLE IF N... |
create procedure ProcWithUsedTableVariable
as
begin
declare @A table (a int) -- @A is unused. This should be flagged as a problem
insert into @A values(1)
end |
CREATE TABLE [dbo].[BusinessUnits](
[Id] [uniqueidentifier] NOT NULL,
[DisplayName] [nvarchar](100) NOT NULL,
[ExternalId] [nvarchar](20) NOT NULL,
[DateActive] [smalldatetime] NOT NULL,
[DateRetired] [smalldatetime] NULL,
[Currency] [char](3) NOT NULL,
[Description] [nvarchar](500) NOT NULL,
[ParentId] [uniqu... |
DROP TABLE IF EXISTS test.using1;
DROP TABLE IF EXISTS test.using2;
CREATE TABLE test.using1(a UInt8, b UInt8) ENGINE=Memory;
CREATE TABLE test.using2(a UInt8, b UInt8) ENGINE=Memory;
INSERT INTO test.using1 VALUES (1, 1) (2, 2) (3, 3);
INSERT INTO test.using2 VALUES (4, 4) (2, 2) (3, 3);
SELECT * FROM test.using1 A... |
<reponame>ghJo-Gaia3D/mago3d<gh_stars>10-100
drop table if exists data_library_converter_job cascade;
drop table if exists data_library_converter_job_file cascade;
drop table if exists data_library_group cascade;
drop table if exists data_library cascade;
drop table if exists data_library_upload cascade;
drop table if ... |
CREATE TABLE order_lines
(
order_line_id int GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
order_id SERIAL REFERENCES orders(order_id) ON DELETE CASCADE,
product_id SERIAL REFERENCES products(product_id) ON DELETE CASCADE,
units SMALLINT NOT NULL
)
|
<reponame>githubsigmod2021/CodecDB
select
plain.value AS plain,
dict.value as dict,
delta.value as delta,
dl.value as dl,
plaingz.value as gz,
plainlz.value as lz,
plainsn.value as sn
from
col_data cd
join
feature plain ON plain.col_id = cd.id
and plain.type = 'EncFileSize'
... |
INSERT INTO `sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1010081297948778498', 'vipUserField', 'member', '[0],[member],', 'VIP用户自定义字段', '', '/vipUserField', '99', '2', '1', NULL, '1', '0');
INSERT INTO `sys_menu` (`id`, `code`, `pcod... |
<filename>tcl/wtk/modules/cor/sql/cor-objects-sequence-create.sql
-- CREATE [ TEMPORARY | TEMP ] SEQUENCE name [ INCREMENT [ BY ] increment ]
-- [ MINVALUE minvalue | NO MINVALUE ] [ MAXVALUE maxvalue | NO MAXVALUE ]
-- [ START [ WITH ] start ] [ CACHE cache ] [ [ NO ] CYCLE ]
-- [ OWNED BY { table.column |... |
<filename>sql/_27_banana_qa/issue_5765_timezone_support/_00_dev_cases/_02_operator/_23_minute_with_tz/cases/minute_005.sql
--marginal values of timestamptz/datetimetz type
--2. marginal values: timestamptz argument
select minute(timestamptz'00:00:00 01/01 Asia/Seoul');
select minute(timestamptz'03:14:07 1/19/2038 As... |
-- @testpoint: opengauss关键字temporary(非保留),作为同义词对象名,部分测试点合理报错
--前置条件
drop table if exists explain_test;
create table explain_test(id int,name varchar(10));
--关键字不带引号-成功
drop synonym if exists temporary;
create synonym temporary for explain_test;
insert into temporary values (1,'ada'),(2, 'bob');
update temporary set ... |
CREATE TABLE #GuidDemo (ID UNIQUEIDENTIFIER, Value VARCHAR(20))
GO
DECLARE @i INT = 0
WHILE @i < 1000000
BEGIN
INSERT INTO #GuidDemo (ID, Value) VALUES (NEWID(), 'SampleValue')
SET @i = @i+1
END |
<gh_stars>0
SELECT title, film_id
FROM film
WHERE title = 'Early Home';
SELECT *
FROM inventory
WHERE film_id = 268;
SELECT i.inventory_id, i.film_id, i.store_id
FROM inventory i
JOIN film f
ON (i.film_id = f.film_id)
WHERE f.title = 'Early Home';
SELECT *
FROM inventory
WHERE film_id IN
(
SELECT film_id
FROM fil... |
<gh_stars>0
INSERT INTO `biochemical_condition_test` (id,condition_id,test_name,created_at,updated_at) VALUES
(1,1,'Fasting Sugar','2017-06-07 00:25:58','2017-06-07 00:25:58'),
(2,1,'PP Sugar','2017-06-07 00:25:58','2017-06-07 00:25:58'),
(3,1,'HbA1C','2017-06-07 00:25:58','2017-06-07 00:25:58'),
(4,1,'Urine Routine (O... |
<filename>Solutions/SQL/Easy/JapaneseCitiesAttributes.sql
/*
Query all attributes of every Japanese city in the CITY table. The COUNTRYCODE for Japan is JPN.
The CITY table is described as follows:
*/
SELECT *
FROM
CITY
WHERE
COUNTRYCODE = 'JPN';
|
<filename>StoredProcedures/dbo.uspxUnpivot.sql
IF EXISTS (SELECT * FROM sys.procedures WHERE [name] = 'uspxUnpivot')
BEGIN
DROP PROCEDURE dbo.uspxUnpivot
PRINT 'DROP PROCEDURE dbo.uspxUnpivot'
END
GO
CREATE PROCEDURE dbo.uspxUnpivot
@TempTableName NVARCHAR(255),
@LastFixedColumnIndex INT = 1,
@MaxWidth INT = 25... |
<filename>tbl_user.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 10, 2020 at 11:51 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
-- Procedure BibleReaderAccess_Del
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE dbo.BibleReaderAccess_Del
(
@Id int
)
AS
SET NOCOUNT ON
IF(@Id > 0)
DELETE FROM BibleReaderAccess
WHERE Id=@Id
RETURN
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
|
delete from eg_feature_action where action = (select id from eg_action where name='Create-Validity' and contextroot='tl');
delete from eg_roleaction where actionid = (select id from eg_action where name='Create-Validity' and contextroot='tl');
delete from eg_action where name='Create-Validity' and contextroot='tl';
u... |
<reponame>pradeepkumarcm-egov/DIGIT-Dev<filename>core-services/egov-user/src/main/resources/db/migration/ddl/V20170423025220__alter_table_eg_user_to_increase_signature_length.sql
ALTER TABLE eg_user ALTER COLUMN signature TYPE CHARACTER VARYING(1000);
ALTER TABLE eg_user ALTER COLUMN photo TYPE CHARACTER VARYING(1000);... |
<filename>res/mysql/files_users.sql
CREATE TABLE IF NOT EXISTS files_users (
`file_id` int(11) NOT NULL
, `user_id` int(11) NOT NULL
, `ip` varchar(15) NOT NULL
, `active` tinyint(1) NOT NULL
, `completed` tinyint(1) NOT NULL
, `announced` int(11) NOT NULL
, `uploaded` bigint unsigned NOT NULL
, `downloaded` bi... |
INSERT INTO math_phds VALUES
(1,'Horton','<NAME>','<NAME>, <NAME>, <NAME>','Ph. D','1916','Functions of limited variation and Lebesgue integrals','',NULL,NULL),
(2,'Wilder','<NAME>','<NAME>','Ph. D','1923','Concerning continuous curves','',NULL,NULL),
(3,'Lubben','<NAME>','<NAME>','Ph. D','1925','The double elliptic ca... |
<filename>src/test/resources/sql/select/8a408394.sql
-- file:tinterval.sql ln:85 expect:true
SELECT '' AS five, t1.f1
FROM TINTERVAL_TBL t1
WHERE not t1.f1 <<
tinterval '["Aug 15 14:23:19 1980" "Sep 16 14:23:19 1990"]'
ORDER BY t1.f1
|
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.1.63-community - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL version: 7.0.0.4053
-- Date/time: 2012-10-14 17:59:19
... |
/*
Enter your query here.
*/
SELECT DISTINCT city FROM station WHERE city REGEXP "^[aeiou].*"; |
CREATE OR REPLACE FUNCTION longest_path(
IN paths_return refcursor
) RETURNS refcursor AS $$
DECLARE
num_growing_path INTEGER;
BEGIN
CREATE TEMPORARY TABLE paths(path text, tail INTEGER, flag boolean) ON COMMIT DROP DISTRIBUTED BY (tail);
INSERT INTO paths
SELECT ''||zero_in_degree.src AS path, edg... |
<filename>database/select_in_chunks.sql
-- Select records from a control table by chunk pieces
select distinct account_id
from (select account_id, row_number() OVER (order by account_id) rn from ria_sg_acct_chk_del_02052020@sep ) v
--where v.rn between 101 and 200
--where v.rn between 201 and 300
--where v.... |
-- Attribute privilege
insert into api_permission(uri,status,method,type,comment,create_date,last_update)
values('^/ws/rs/permission/search-users-by-perms$',0,'POST',1,'',now(),now());
|
<gh_stars>100-1000
/***********************************************************************
xplan-display.sql -- Oracle Explain Plan Display
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Purpose:
This script serves to demonstrate how to generate an explain plan for
the standard output. A... |
ALTER TABLE `blapps` ADD COLUMN `blplugin_id` int(11) unsigned DEFAULT NULL;
ALTER TABLE `blapps` ADD CONSTRAINT `blplugin_id_apps` FOREIGN KEY (`blplugin_id`) REFERENCES `blplugins` (`id`);
ALTER TABLE `blapps` MODIFY `blitem_id` int(11) unsigned DEFAULT NULL;
|
<filename>pgwatch2/sql/metric_store/00_schema_base.sql<gh_stars>1000+
/*
"admin" schema - stores schema type, partition templates and data cleanup functions
"public" schema - top level metric tables
"subpartitions" schema - subpartitions of "public" schema top level metric tables (if using time / dbname-time partiti... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 20 Nov 2019 pada 03.44
-- Versi server: 10.3.16-MariaDB
-- Versi PHP: 7.1.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Waktu pembuatan: 09 Jan 2020 pada 15.11
-- Versi server: 10.4.8-MariaDB
-- Versi PHP: 7.1.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
<filename>api/prisma/migrations/20211115212834_initial/migration.sql
-- CreateTable
CREATE TABLE "User" (
"id" TEXT NOT NULL PRIMARY KEY,
"authId" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
"name" TEXT NOT NULL,
"email" TEXT NOT NULL
);... |
<reponame>zsvoboda/olympics
with distinct_medals as (
select distinct
coalesce("Medal"::varchar(10), 'None') as medal_name
from "olympics_stage"."athlete_events"
)
select
row_number() over (order by "medal_name" asc) as medal_id,
medal_name
from distinct_medals |
-- MySQL Script handcrafted
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='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema CodyMaze
-- --------... |
<reponame>Soumya-Dey/PL-SQL-programs<filename>syntax-loop/1-continue.sql
set serveroutput on
DECLARE
no NUMBER := 0;
BEGIN
FOR i IN 1 .. 5 LOOP
IF i = 4 THEN
CONTINUE;
END IF;
DBMS_OUTPUT.PUT_LINE('Iteration : ' || i);
END LOOP;
END;
/ |
<filename>sql_queries/insert_groupMembership.sql
INSERT INTO public."usersGroupsMembership" ("userId", "groupId")
VALUES ('Rwh6pbBFCZYWTud0C2GqUDppV7m1' , 1) |
<gh_stars>1-10
SET DEFINE OFF;
ALTER TABLE AFW_12_LIEN_GROUP_UTILS ADD (
CONSTRAINT AFW_12_LIEN_GROUP_UTILS_FK2
FOREIGN KEY (REF_UTILS)
REFERENCES AFW_12_UTILS (SEQNC)
ON DELETE CASCADE
ENABLE VALIDATE)
/
|
CREATE PROCEDURE [dbo].[dnn_CoreMessaging_GetSubscriptionsByUser]
@PortalId int,
@UserId int,
@SubscriptionTypeID int
AS
BEGIN
SELECT *
FROM dbo.[dnn_CoreMessaging_Subscriptions]
WHERE
(( @PortalId is null and PortalId is null) or (PortalId = @PortalId))
AND UserId = @UserId
AND (@SubscriptionTypeID IS... |
<reponame>mode/blog
# Deal Count and Round Size
SELECT DATE_TRUNC('quarter',c.first_funding_at) AS quarter,
COUNT(DISTINCT c.permalink) AS companies,
COUNT(DISTINCT CASE WHEN i.vc_company = 1 THEN c.permalink ELSE NULL END) AS vc_companies,
COUNT(DISTINCT CASE WHEN i.vc_company = 0 THEN c.permalin... |
<reponame>colearendt/tidyblocks
create table colors(name text, red integer, green integer, blue integer);
insert into colors values('black', 0, 0, 0);
insert into colors values('red', 255, 0, 0);
insert into colors values('maroon', 128, 0, 0);
insert into colors values('lime', 0, 255, 0);
in... |
<filename>src/test/sql/mysql/example/dml/insert-salgrade-table.sql
INSERT INTO test.SALGRADE (GRADE,LOSAL,HISAL) VALUES
(1.0,700.0,1200.0)
,(2.0,1201.0,1400.0)
,(3.0,1401.0,2000.0)
,(4.0,2001.0,3000.0)
,(5.0,3001.0,9999.0)
; |
<gh_stars>0
/*Factura de Credito*/
EXEC dbo.Interfaz_VentasInsertar @Empresa = 'TUN', -- char(5)
@Mov = 'CFDI SIN VIAJE GRAV', -- char(20)
@FechaEmision = '2018-11-13T16:07:00', -- smalldatetime
... |
-- +migrate Up
CREATE TABLE IF NOT EXISTS "stripe_customers" (
"id" integer primary key autoincrement,
"user_id" integer unsigned NOT NULL,
"customer_id" varchar(191) NOT NULL,
"created_at" datetime NOT NULL,
"updated_at" ... |
-- Sep 21, 2016
-- Adding active column to the software and software command table to be able
-- to disallow plugins and/or individual software commands
ALTER TABLE qiita.software ADD active bool DEFAULT 'False' NOT NULL;
ALTER TABLE qiita.software_command ADD active bool DEFAULT 'True' NOT NULL;
-- Add function to ... |
-- @testpoint:opengauss关键字than非保留),作为序列名
--关键字不带引号-成功
drop sequence if exists than;
create sequence than start 100 cache 50;
drop sequence than;
--关键字带双引号-成功
drop sequence if exists "than";
create sequence "than" start 100 cache 50;
drop sequence "than";
--关键字带单引号-合理报错
drop sequence if exists 'than';
create sequen... |
INSERT INTO "testdrive" VALUES
(default,37,40),
(default,13,28),
(default,26,27),
(default,29,5),
(default,43,38),
(default,39,60),
(default,21,5),
(default,11,34),
(default,54,29),
(default,59,26),
(default,26,17),
(default,38,41),
(default,12,10),
(default,45,40... |
/*
SQLyog Ultimate v9.50
MySQL - 5.5.5-10.4.14-MariaDB : Database - ahp_crisp_laravel
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FO... |
<filename>surgas-server/sql/proc_pedidoxproducto_eliminar.sql
DELIMITER $$
CREATE OR REPLACE PROCEDURE proc_pedidoxproducto_eliminar (
IN producto_codigo TYPE OF pedidoxproducto.producto,
IN pedido_fecha TYPE OF pedidoxproducto.fecha_pedido,
IN pedido_numero TYPE OF pedidoxproducto.numero_pedido
)
MODIFIES SQ... |
-- Generated: 2018-01-14 23:55
-- Model: New Model
-- Version: 1.0
-- Project: Name of the project
-- Author: <NAME>
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='TRADITIONAL,ALLOW_INVALID_DATES'... |
<reponame>samhay2u/EMP<gh_stars>0
--
use EMPLOYEES;
drop table if exists `employees`;
drop table if exists `users`;
----------------------------------------------------------
--
-- Table structure for table `patients`
--
CREATE TABLE `employees` (
`emp_no` varchar(10) NOT NULL PRIMARY KEY,
`birth_date` DATE NOT N... |
create table hardware(
hardware_id INT AUTO_INCREMENT PRIMARY KEY,
created_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
cpu_temp INT,
cpu_usage INT,
memory INT
); |
<gh_stars>1-10
# Time: O(n * mlogm)
# Space: O(n * m)
SELECT post_id,
IFNULL(GROUP_CONCAT(DISTINCT topic_id ORDER BY topic_id ASC SEPARATOR ','), "Ambiguous!") AS topic
FROM posts a
LEFT JOIN keywords b
ON CONCAT(' ', LOWER(a.content), ' ') LIKE CONCAT('% ', LOWER(b.word), ' %')
GROUP BY post_id
ORDER BY NULL... |
<filename>data/open-source/extracted_sql/oharaandrew314_TinkerTime.sql
CREATE TABLE `mods` (`id` INTEGER AUTO_INCREMENT , `updatedOn` TIMESTAMP , `name` VARCHAR(255) , `creator` VARCHAR(255) , `modVersion` VARCHAR(255) , `kspVersion` VARCHAR(255) , `url` VARCHAR(255) NOT NULL , `updateAvailable` TINYINT(1) , `builtIn` ... |
<reponame>PhilippeBinggeli/Hands-On-Data-Science-with-SQL-Server-2017
select count(*)
from SourceData.Contracts
where PhoneId is null
select count(*)
from SourceData.Actions
where RecordId is null
select count(*)
from SourceData.Actions
where Units is null |
<reponame>PacktPublishing/An-18-Hour-SQL-SQL-Server-2014-Visual-Studio-2017-Course<filename>lesson52nestingfunctionsanpivotingrecors/lesson52code.sql
--1. pivoting tables
--2. taking a column and turning it into a row
--3. 1
--4. 2
--5. 3
--6. 1 2 3
use AdventureWorks2014
go
select 'TitleCount' as 'Title Count', [Mr.... |
<reponame>geophile/sql-layer
SELECT * FROM customers |
<gh_stars>1-10
DROP TABLE `type_categories` |
/*
.PURPOSE
Get list of dependencies found during discovery scanning that are not managed
*/
SELECT
comp.ComputerId
,cd.AccountName
,cd.DependencyName
,comp.ComputerName
,comp.ComputerId
,comp.LastErrorMessage
,comp.DistinguishedName
FROM tbComputer comp
JOIN tbComputerDependency cd ON comp.... |
-- file:errors.sql ln:209 expect:true
drop operator === (int4, int4)
|
-- file:arrays.sql ln:56 expect:true
SELECT array_ndims(a) AS a,array_ndims(b) AS b,array_ndims(c) AS c
FROM arrtest
|
<filename>src/test/resources/sql/select/f7b4a7b9.sql
-- file:horology.sql ln:373 expect:true
SELECT '' AS "65", d1 AS european_iso FROM TIMESTAMP_TBL
|
<reponame>developma/sql-study
CREATE TABLE Address (
name VARCHAR(32) NOT NULL,
phone VARCHAR(32),
address VARCHAR(32) NOT NULL,
sex CHAR(4) NOT NULL,
age INTEGER NOT NULL,
PRIMARY KEY (name)
);
INSERT INTO Address VALUES ('田中', '090-1111-XXXX', '東京都', '男', 30);
INSERT INTO Address VALUES ('斎藤', '090-0000-... |
<reponame>mbruty/COMP2003-2020-O<gh_stars>0
DROP TABLE IF EXISTS `Review`;
DROP TABLE IF EXISTS `Visit`;
DROP TABLE IF EXISTS `RestaurantOpinion`;
DROP TABLE IF EXISTS `LinkMenuFood`;
DROP TABLE IF EXISTS `FoodItemTags`;
DROP TABLE IF EXISTS `SwipeData`;
DROP TABLE IF EXISTS `LinkCategoryFood`;
DROP TABLE IF EXISTS `Fo... |
-- database: presto; groups: insert; mutable_tables: datatype|created
-- delimiter: |; ignoreOrder: true;
--!
insert into ${mutableTables.hive.datatype} values(1,2.34567,'a',cast('2014-01-01' as date), cast ('2015-01-01 03:15:16 UTC' as timestamp), TRUE);
select * from ${mutableTables.hive.datatype}
--!
1|2.34567|a|20... |
<reponame>nmbazima/SQL-Scripts
/*
SELECT * FROM SQLINDICESUNUSED
WHERE TABLENAME NOT LIKE '%_CT'
AND DBNAME NOT IN ('DX_PA', 'DXPRD')
ORDER BY TABLENAME, INDEXNAME, DBNAME
*/
--USE Status
--GO
--SET NOCOUNT ON
---------------------------------------------------------------------------
DECLARE @DBList NVARCHAR(MAX)
DE... |
<reponame>Arda1/brisk
--
-- HIVE-417 Implement Indexing in Hive
--
CREATE TABLE "IDXS" (
"INDEX_ID" BIGINT NOT NULL,
"CREATE_TIME" INTEGER NOT NULL,
"DEFERRED_REBUILD" CHAR(1) NOT NULL,
"INDEX_HANDLER_CLASS" VARCHAR(256),
"INDEX_NAME" VARCHAR(128),
"INDEX_TBL_ID" BIGINT,
"LAST_ACCESS_TIME" INTEGER NOT NU... |
CREATE VIEW VIEW4 (C1) AS SELECT 1 FROM TABLE50 UNION SELECT 1 FROM TABLE114 UNION SELECT 1 FROM TABLE402 UNION SELECT 1 FROM VIEW48 UNION SELECT 1 FROM VIEW66 UNION SELECT 1 FROM VIEW85
GO |
SELECT `acct_id`, `alloc_yr`, `alloc_mo`, `memo`, `target_amnt_inc_vat`, `date_begin`, `date_end`, `closed`
FROM `budget`
WHERE `id` = %s AND `brand_id` = %s |
-- @testpoint:opengauss关键字login非保留),作为序列名
--关键字不带引号-成功
drop sequence if exists login;
create sequence login start 100 cache 50;
drop sequence login;
--关键字带双引号-成功
drop sequence if exists "login";
create sequence "login" start 100 cache 50;
drop sequence "login";
--关键字带单引号-合理报错
drop sequence if exists 'login';
creat... |
-- @testpoint: md5函数入参给bool类型,合理报错
SELECT md5(TRUE); |
<reponame>opengauss-mirror/Yat
-- @testpoint:opengauss关键字bit(非保留),作为表空间名
--关键字不带引号,创建成功
drop tablespace if exists bit;
CREATE TABLESPACE bit RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1';
--清理环境
drop tablespace bit;
--关键字带双引号,创建成功
drop tablespace if exists "bit";
CREATE TABLESPACE "bit" RELATIVE LOCATION 'hdf... |
/*
---------------------------------------------------------------------
@author <NAME> <<EMAIL>>
*/
SELECT mb.nome,
mb.cognome,
mb.sesso,
utente.avatar_filename,
a.denominazione as ambulatorio,
a.indirizzo,
c.nome as citta,
p.nome as provincia,
... |
-- new field get added to allow for Image_Text pairs in the DB
ALTER TABLE data_tuple
MODIFY COLUMN type
ENUM ('TEXT_TEXT','AUDIO_AUDIO','TEXT_AUDIO','AUDIO_TEXT','IMAGE_AUDIO','RECORDING','IMAGE_TEXT');
|
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Värd: 127.0.0.1
-- Tid vid skapande: 11 jan 2016 kl 18:19
-- Serverversion: 5.6.21
-- PHP-version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4... |
INSERT INTO `Airline` VALUES (1,'SkyTeam'),(2,'oneworld'),(3,'Star Alliance');
INSERT INTO `Airplane` VALUES (1,519,'A380','12345'),(2,416,'747','54321'),(3,519,'A380','23451'),(4,416,'747','43215'),(5,519,'A380','34512'),(6,416,'747','32154');
INSERT INTO `Airport` VALUES (1,'AMS','Amsterdam','The Netherlands','Schiph... |
<reponame>hnwarid/DQLabAcademy
SELECT * FROM tabel_A
WHERE kode_pelanggan = 'dqlabcust03'
UNION
SELECT * FROM tabel_B
WHERE kode_pelanggan = 'dqlabcust03'; |
<reponame>lambdamusic/wittgensteiniana
# ************************************************************
# Sequel Ace SQL dump
# Version 20016
#
# https://sequel-ace.com/
# https://github.com/Sequel-Ace/Sequel-Ace
#
# Host: 127.0.0.1 (MySQL 8.0.27)
# Database: hacks-legacy
# Generation Time: 2021-12-23 12:54:05 +0000
# **... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 16, 2019 at 07:57 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
select g1.id, g1.textual_id, g1.deleted
from gov_item g1;
|
-- file:regproc.sql ln:14 expect:true
SELECT regprocedure('abs(numeric)')
|
<reponame>flexsocialbox/una<filename>modules/boonex/spaces/updates/12.0.1_12.0.2/install/sql/enable.sql
-- SETTINGS
SET @iCategId = (SELECT `id` FROM `sys_options_categories` WHERE `name`='bx_spaces' LIMIT 1);
DELETE FROM `sys_options` WHERE `name`='bx_spaces_per_page_for_favorites_lists';
INSERT INTO `sys_options... |
DROP TABLE movies;
|
<gh_stars>0
drop table palabras;
drop table user_permissions;
drop table users;
drop table Country ;
drop table DbTypes;
drop table UserTypes;
|
<filename>src/main/resources/database.sql
CREATE TABLE patient(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
имя VARCHAR(15) NOT NULL,
фамилия VARCHAR(15) NOT NULL,
отчество VARCHAR(15) NOT NULL,
телефон INT NOT NULL
)
ENGINE = InnoDB;
CREATE TABLE doctor(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
имя VARCH... |
<filename>persistent/schema.sql
drop table danan.Address cascade constraints;
drop table danan.auditLogDetail cascade constraints;
drop table danan.User_Address cascade constraints;
drop table danan.UserAuditLog cascade constraints;
drop table danan.Users cascade constraints;
drop sequence danan.hibernate_sequence;
cre... |
# i3albo database creation script.
# Author: giuliobosco
# Version: 1.0.1
CREATE DATABASE i3albo;
CREATE TABLE i3albo.group (
id INT PRIMARY KEY AUTO_INCREMENT,
group_name VARCHAR(50) NOT NULL,
admin_id VARCHAR(50) NOT NULL,
description VARCHAR(200) NOT NULL,
img_path VARCHAR(255) NOT NULL,
F... |
/*
*
* GO 20091112: indexes added
*
* PhG 20010-01-06:
* LMF_LASER_COLORS_DEF -> LMF_LASER_COLOR_DEF + column changes.
* Err. on norm. factor
*
* GO 20010109: new indexes added - removed SEQ_ID from
* LMF_PRIM_DATASET_DAT - partitioned tables
*
* GO 20100323: sequences redefined with NOCACHE
*
* ... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 28-04-2018 a las 06:14:34
-- Versión del servidor: 10.1.21-MariaDB
-- Versión de PHP: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
<gh_stars>0
insert into lokacija (id, ime, vodja) values (1, 'Ullrich Inc', 202);
insert into lokacija (id, ime, vodja) values (2, 'Harber-Marvin', 12);
insert into lokacija (id, ime, vodja) values (3, 'Brown-Strosin', 245);
insert into lokacija (id, ime, vodja) values (4, 'Lehner-Feeney', 115);
insert into lokacija (i... |
<reponame>anbya/contohUploadKeGit
INSERT INTO pos_itemtemp VALUES("IATT190004602","193077","191001","192001","30000","1","30000","0","30000","1","1","1","IAT3112190954","NHO2018000007","PAID","","193077"),
("IATT190004602","193052","191002","192010","20000","1","20000","0","20000","1","1","1","IAT3112190954","NHO201800... |
<reponame>Honderdors/Analysis-Services-Load-Balancing
CREATE PROCEDURE [app].[performancecounters_pivot]
AS
BEGIN
DECLARE @cols AS NVARCHAR(MAX),
@colssum NVARCHAR(MAX),
@query AS NVARCHAR(MAX);
SELECT [p].[performancecounters_id],
[p].[collection_id],
[p].[collection_time],
[p].[categoryname]... |
/*
Query the two cities in STATION with the shortest and longest CITY names, as well as their respective lengths (i.e.: number of characters in the name).
If there is more than one smallest or largest city, choose the one that comes first when ordered alphabetically.
Input Format
The STATION table is described as fol... |
-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64)
--
-- Host: localhost Database: actasunicordoba
-- ------------------------------------------------------
-- Server version 8.0.26
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.