sql stringlengths 6 1.05M |
|---|
<filename>modules/core/db/update/postgres/15/151228-sendingMessagesExtendFields.sql<gh_stars>1-10
--$Id$
alter table SYS_SENDING_MESSAGE alter column ADDRESS_TO type text^
alter table SYS_SENDING_MESSAGE alter column ATTACHMENTS_NAME type text^
|
<gh_stars>1-10
-- insert all
insert all
into ap_cust values (customer_id, program_id, delivered_date)
into ap_orders values (order_date, program_id)
select program_id, delivered_date, customer_id, order_date
from airplanes
|
/*
Copyright 2016 Disney Connected and Advanced Technologies
Licensed under the Apache License, Version 2.0 (the "Apache License")
with the following modification; you may not use this file except in
compliance with the Apache License and the following modification to it:
Section 6. Trademarks. is deleted and replace... |
CREATE PROCEDURE [generateIndexCreateScript]
@schemaName SYSNAME,
@tableName SYSNAME,
@idxName SYSNAME
AS
DECLARE
@TableSchema sysname,
@IndexName sysname,
@IndexType nvarchar(60),
@IndexIsUnique bit,
@IndexIgnoreDupKey bit,
@IndexIsPrimaryKey bit,
@IndexIsUniqueConstraint bit,
@IndexFillFactor t... |
-- More indexes for DB load of regenerated content and used FK
UPDATE INDEXES SET KEY_VALUE = ' ' WHERE KEY_VALUE IS NULL; |
<reponame>disqus/pg_partman
/*
* Function to re-apply ownership & privileges on all child tables in a partition set using parent table as reference
*/
CREATE FUNCTION reapply_privileges(p_parent_table text) RETURNS void
LANGUAGE plpgsql SECURITY DEFINER
AS $$
DECLARE
v_all text[] := ARRAY['SELE... |
517,66,2160
517,450,2160
539,124,4426
539,180,4600
562,35986,308
562,1,28311
562,140199,271
562,1500,451
562,126090,323
562,1500,463
562,142599,271
562,1,20235
575,2497,117
575,25000,99
575,20000,99
590,735,316
13104,1500,120
628,4705,3287
638,101449,148
650,57,2878
664,1104,97
664,3000,97
681,8626,165
681,10000,195
68... |
/* r930 Reinstall recentitems plugin */
DELETE FROM `cot_plugins` WHERE `pl_code` = 'recentitems';
DELETE FROM `cot_config` WHERE `config_cat` = 'recentitems';
INSERT INTO `cot_plugins` (pl_hook, pl_code, pl_part, pl_title, pl_file, pl_order, pl_active) VALUES
('index.tags', 'recentitems', 'recent.index', 'Recent it... |
<reponame>Zhaojia2019/cubrid-testcases
--[er]compare two bit data type value by wrong comparison operators '=<'
create class func_01 ( a bit(8), b bit(8), c bit(1), d bit varying(8));
insert into func_01 values ( B'11111111', B'11111111', B'1', B'11111111');
insert into func_01 values ( B'1111', B'11111111', B'1', B'0... |
-- @testpoint: PostGIS功能覆盖,合并geogA和geogB区域,ST_Union;
--step1:创建表 expect:成功
drop table if exists t_postgis_0026_01;
drop table if exists t_postgis_0026_02;
drop table if exists t_postgis_0026_03;
create table t_postgis_0026_01 (smgeometry1 geometry(MultiLineString,4490),
smgeometry2 g... |
-- @testpoint:opengauss关键字nullable(非保留),作为用户组名
--关键字不带引号-成功
drop group if exists nullable;
create group nullable with password '<PASSWORD>';
drop group nullable;
--关键字带双引号-成功
drop group if exists "nullable";
create group "nullable" with password '<PASSWORD>';
drop group "nullable";
--关键字带单引号-合理报错
drop group if exi... |
<reponame>PaulAnthonyReitz/topaz<filename>sql/linkshells.sql
-- phpMyAdmin SQL Dump
-- version 3.3.8
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Ven 09 Mars 2012 à 09:27
-- Version du serveur: 6.0.0
-- Version de PHP: 5.2.9-2
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_... |
CREATE DATABASE IF NOT EXISTS `sistventas` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `sistventas`;
-- MySQL dump 10.13 Distrib 5.6.17, for Win32 (x86)
--
-- Host: localhost Database: sistventas
-- ------------------------------------------------------
-- Server version 5.6.17
/*!40101 SET @OLD_CHARACTER_SET_C... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 30, 2020 at 07:53 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
/*
Autor: <NAME>;
Banco: DeliciArt
Descrição: Banco do site DeliciArt
*/
DROP DATABASE IF EXISTS db_deliciart;
CREATE DATABASE db_deliciart;
USE db_deliciart;
CREATE TABLE tb_clientes (
idCliente INT AUTO_INCREMENT PRIMARY KEY,
nome VARCHAR(200) NOT NULL,
email VARCHAR(200) UNIQUE,
senha VARCHAR(50) NOT NULL,
estado... |
<filename>SQL/Working_LastProcedureRan.sql
SELECT o.name,
ps.last_execution_time
FROM sys.dm_exec_procedure_stats ps
INNER JOIN
sys.objects o
ON ps.object_id = o.object_id
WHERE DB_NAME(ps.database_id) = 'databaseName'
ORDER BY
ps.last_execution_time DESC
|
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 05, 2017 at 10:28 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 5.6.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
<reponame>Foxpips/LayeredArchitecture
CREATE PROC [dbo].[h3giGetUpgradePin]
@customerType INT
AS
BEGIN
-- customerPrepay uses the same value as the orderType (2=contractUpgrade, 3=prepayUpgrade)
DECLARE @ban VARCHAR(20)
SELECT TOP 1 @ban = BillingAccountNumber
FROM h3giUpgrade
WHERE customerPrepay ... |
create table products.product (
id bigserial primary key,
product_identifier varchar not null,
nome varchar(100) not null,
descricao varchar not null,
preco float not null,
category_id bigint references products.category(id)
); |
<filename>data/en/postgres/subdivisions_GM.postgres.sql
CREATE TABLE subdivision_GM (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision_GM" ("id", "name", "level") VALUES (E'GM-B', E'Banjul', E'city');
INSERT INTO "subdivision_GM" ("id", "name", "level") V... |
<filename>Jahr 1/DB/SQL/IT/Aufgabe13.sql
SELECT artikelname FROM artikel a ; |
-- file:insert_conflict.sql ln:149 expect:true
insert into insertconflicttest values (15, 'Cranberry') on conflict (key) do update set fruit = excluded.fruit
|
<reponame>Shuttl-Tech/antlr_psql
-- file:json.sql ln:37 expect:true
SELECT '{"abc",1}'::json
|
<filename>sql2019workshop/sql2019wks/08_DataVirtualization/sqldatahub/azuredb/createazuredbtable.sql
-- Database created in Azure is called wwiazure
-- This is not managed instance so you can't execute a USE database
-- Create a new database called wwiazure (server tier doesn't matter for this demo)
--
-- This tabl... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.1
-- Dumped by pg_dump version 9.6.1
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min... |
<gh_stars>0
INSERT INTO environment (id, code, label, version, active) VALUES(1 ,'DEV', 'Development', 1, 1);
INSERT INTO environment (id, code, label, version, active) VALUES(2 ,'STAG', 'Staging', 1, 1);
INSERT INTO environment (id, code, label, version, active) VALUES(3 ,'PRD', 'Production', 1, 1);
INSERT INTO softw... |
<reponame>viswaratha12/dbwarden
/****** Object: StoredProcedure [dbo].[UpdateJobState] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[UpdateJobState]
/****************************************************
**
** Desc: Based on step state, look for jobs that have been comple... |
<filename>src/it/migration-plugin-command-script/itcase-rep/scripts/20100425200646_terzo_migration.sql
--// First migration.
-- Migration SQL that makes the change goes here.
CREATE TABLE test3 (
ID NUMERIC(20,0) NOT NULL,
);
--//@UNDO
DROP TABLE test3;
|
<reponame>CJinL/taskcookie<gh_stars>0
CREATE TABLE `admin_role_menu` (
`role_id` int(11) NOT NULL,
`menu_id` int(11) NOT NULL,
KEY `role_menu_role_id_menu_id_index` (`role_id`,`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
<reponame>pepzer/rest-jpa-spring-boot-test<gh_stars>1-10
INSERT INTO authors VALUES(1, 'Name1', 'Surname1');
INSERT INTO authors VALUES(2, 'Name2', 'Surname2');
INSERT INTO authors VALUES(3, 'Name3', 'Surname3');
INSERT INTO authors VALUES(4, 'Name4', 'Surname4');
INSERT INTO books VALUES(1, '0123456789012', 'Title1');... |
<filename>persistence/sql/migrations/sql/20210913095309000001_identity_recovery_tokens.postgres.down.sql
ALTER TABLE "identity_recovery_tokens" DROP CONSTRAINT "identity_recovery_tokens_identity_id_fk_idx"; |
-- Changes for differential expression.
-- default value null
ALTER TABLE ANALYSIS_RESULT_SET
ADD COLUMN QVALUE_THRESHOLD_FOR_STORAGE DOUBLE;
-- add new table supporting pvalue distributions
CREATE TABLE PVALUE_DISTRIBUTION (
ID BIGINT NOT NULL AUTO_INCREMENT,
NUM_BINS INTEGER NOT NULL,
BIN_COUNTS... |
select
ps_partkey,
sum(ps_supplycost * ps_availqty) as value
from
partsupp,
supplier,
nation
where
ps_suppkey = s_suppkey
and s_nationkey = n_nationkey
and n_name = 'GERMANY'
group by
ps_partkey having
sum(ps_supplycost * ps_availqty) > (
select
sum(ps_supplycost * ps_availqty) * 0.0001
from
partsupp,... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2016-06-02 04:18:04
-- 服务器版本: 10.1.9-MariaDB
-- PHP Version: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!401... |
<filename>src/resources/database/patches/version1/migrateMessagesToVersion1.sql
PRAGMA foreign_keys=off;
ALTER TABLE messages RENAME TO _messages_old;
CREATE TABLE messages (
id TEXT NOT NULL PRIMARY KEY,
recipientId TEXT NOT NULL,
senderId TEXT NOT NULL,
chatId TEXT NOT NULL,
createdAt INT NOT NU... |
<reponame>developerPagpug/pags
-- MySQL Script generated by MySQL Workbench
-- 01/12/17 16:01:50
-- 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=... |
<filename>trunk/src/db/fields/tables/reservation.sql
create table reservation (
id bigint auto_increment,
seasonId bigint not NULL,
fieldId bigint not NULL,
teamId bigint not NULL,
startTime time not NULL,
endTime time not NULL,
daysOfWeek char(8),
... |
<reponame>Rmecan/SQLLoader
SET HEADING OFF;
SET NEWPAGE NONE;
SET FEEDBACK OFF;
SET PAGESIZE 0;
SET VERIFY OFF;
SET TAB OFF;
SET TRIMSPOOL ON;
SET LINESIZE 32767;
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
SELECT view_name
FROM user_views
ORDER BY 1;
EXIT;
|
<reponame>thomromano/burger<filename>db/seeds.sql
-- source C:/Users/DeGri/Desktop/burger/db/seeds.sql
INSERT INTO burgers (burger_name, devoured) VALUES ('Hamburger', FALSE);
INSERT INTO burgers (burger_name, devoured) VALUES ('Juicy Lucy', FALSE);
INSERT INTO burgers (burger_name, devoured) VALUES ('Bison Burger', FA... |
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 06, 2020 at 10:25 AM
-- Server version: 5.7.24
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
CREATE TABLE IF NOT EXISTS kinds (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL UNIQUE
); |
<reponame>VickyJFoster/my_sql_octopus_poc
CREATE TABLE [dbo].[SearchAnalyzerConfig]
(
[Word] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Group] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SearchAnalyzerConfig] ADD CONSTRAINT [PK_SearchAnalyzerConfig] PRIMARY KEY CLUSTERED ([Word]) ON [PRIMA... |
--
-- fill table data.todo (6)
\echo # filling table data.todo (6)
COPY data.todo (id,todo,private,owner_id) FROM STDIN (FREEZE ON);
1 item_1 FALSE 1
2 foo TRUE 1
3 bar FALSE 1
4 item_4 TRUE 2
5 item_5 TRUE 2
6 item_6 FALSE 2
\.
--
-- restart sequences
ALTER SEQUENCE data.todo_id_seq RESTART WITH 7;
--
-- analyze m... |
-- Opportunity Finder data
CREATE TABLE [StandardSummary](
[StandardCode] INT NULL,
[StandardReference] [nvarchar](10) NULL,
[StandardName] [nvarchar](500) NOT NULL,
[StandardLevel] INT NULL,
[Sector] [nvarchar](250) NOT NULL,
[Region] [nvarchar](50) NOT NULL,
[Ordering] INT NULL,
[L... |
<filename>SQL Scripts/Procedures/spMODULES_Update.2.sql
if exists (select * from INFORMATION_SCHEMA.ROUTINES where ROUTINE_NAME = 'spMODULES_Update' and ROUTINE_TYPE = 'PROCEDURE')
Drop Procedure dbo.spMODULES_Update;
GO
/*******************************************************************************************... |
-- wal2.test
--
-- execsql {
-- INSERT INTO t2 VALUES('goodbye');
-- INSERT INTO t3 SELECT randomblob(900) FROM t3;
-- INSERT INTO t3 SELECT randomblob(900) FROM t3;
-- }
INSERT INTO t2 VALUES('goodbye');
INSERT INTO t3 SELECT randomblob(900) FROM t3;
INSERT INTO t3 SELECT randomblob(900) FROM t3; |
<reponame>dael-victoria-reyes/data-act-broker-backend
-- When provided, CorrectionDeleteIndicator must contain one of the following values: ""C"", ""D"".
SELECT
row_number,
correction_delete_indicatr
FROM detached_award_financial_assistance
WHERE submission_id = {0}
AND COALESCE(UPPER(correction_delete_indi... |
<gh_stars>0
INSERT INTO ADDRESS (STREET_NUMBER, STREET_NAME, STREET_TYPE, SUBURB, CITY, COUNTRY )
VALUES
('2/34', 'BIG STREET', 'AVENUE', 'NEW MARKET', 'AUCKLAND', 'NEW ZEALAND'),
('5', 'SINGLEVIEW', 'STREET', 'TAKAPUNA', 'AUCKLAND', 'NEW ZEALAND'),
('65b', 'QUEEN', 'STREET', 'ELLERSLIE', 'AUCKLAND', 'NEW ZEALAND'... |
<filename>_/po/sql/create_customers_table.sql
CREATE TABLE CUSTOMERS
(
CUSTOMER_ID VARCHAR2(10) NOT NULL PRIMARY KEY,
CUSTOMER_NAME VARCHAR2(255) NOT NULL,
LAST_ORDER_NUMBER VARCHAR2(4000),
LAST_ORDER_AMOUNT NUMBER(10,2)
);
INSERT INTO CUSTOMERS VALUES ('1111', 'Test Customer', NULL, NULL);
COM... |
INSERT INTO bodystyle (name) VALUES ('седан'),('универсал'),('хэтчбэк'),('внедорожник'),('пикап'),('фургон'),('микроавтобус'),('кабриолет'),('купе'),('минивэн');
INSERT INTO engine_type (name) VALUES ('Бензин'),('Дизель'),('Гибрид');
INSERT INTO drive_unit (name) VALUES ('Задний'),('Передний'),('Полный');
INSERT INTO t... |
<filename>snprc_ehr/resources/source_queries/create_v_animal_group_members.sql<gh_stars>1-10
/*
* Copyright (c) 2015-2019 LabKey Corporation
*
* 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 ... |
BEGIN;
CREATE INDEX IF NOT EXISTS
gitserver_repos_last_error_idx ON gitserver_repos(last_error) WHERE last_error IS NOT NULL;
COMMIT;
|
/*
----------------------------------------------------
-- Maintenance-Funktionen zum Aufraeumen der Datenbank
----------------------------------------------------
adding cascade on delete constraints for all tables
loesche alle Daten von Systemen, die zu einem Management gehören,
das mit do_not_import=true und hide_... |
<gh_stars>1-10
--create table with TIMESTAMPLTZ columns with constraints
--test: default
drop table if exists ltz;
create table ltz(c_tsltz timestamp with local time zone default sys_timestamp);
desc ltz;
drop table ltz;
--test: shared
create table ltz(c_tsltz timestamp with local time zone shared '2000-12-12 12:00:... |
<reponame>opengauss-mirror/Yat
-- @testpoint:opengauss关键字foreign(保留),作为数据库名
--关键字不带引号-失败
create database foreign;
--关键字带双引号-成功
create database "foreign";
drop database if exists "foreign";
--关键字带单引号-合理报错
create database 'foreign';
--关键字带反引号-合理报错
drop database if exists `foreign`;
create database `foreign`;
|
<filename>openGaussBase/testcase/KEYWORDS/symmetric/Opengauss_Function_Keyword_Symmetric_Case0022.sql
-- @testpoint:opengauss关键字symmetric(保留),作为用户组名
--关键字不带引号-失败
drop group if exists symmetric;
create group symmetric with password '<PASSWORD>';
--关键字带双引号-成功
drop group if exists "symmetric";
create group "symmetric"... |
insert into osm_adr
with
tab as (
select miejscowosc, cz_msc, ulica, type as nr_porzadkowy, kod_pna, kod_ulic, kod_simc, ST_Centroid(geometry) geom
from osm_addr_polygon
where
-- make sure given bounding box is valid
ST_Transform(ST_MakeEnvelope(14.0, 49.0, 24.03, 54.86, 4326), 3857) && ST_MakeE... |
CREATE TABLE IF NOT EXISTS erc20.tokens (
contract_address bytea UNIQUE,
symbol text,
decimals integer
);
BEGIN;
DELETE FROM erc20.tokens *;
COPY erc20.tokens (contract_address, symbol, decimals) FROM stdin;
\\x2791bca1f2de4661ed88a30c99a7a9449aa84174 USDC 6
\\x8505b9d2254a7ae468c0e9dd10ccea3a837aef5c COMP 18
\\x... |
-- phpMyAdmin SQL Dump
-- version 4.4.15.7
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1:3306
-- Время создания: Июл 03 2018 г., 07:12
-- Версия сервера: 5.5.50-log
-- Версия PHP: 5.6.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... |
<filename>db/employees.sql
CREATE DATABASE employees_db;
USE employees_db;
CREATE TABLE department(
id INT AUTO_INCREMENT,
name VARCHAR(30) NOT NULL,
PRIMARY KEY(id)
);
CREATE TABLE role(
id INT AUTO_INCREMENT,
title VARCHAR(30),
salary DECIMAL(10,2),
department_id INT NOT NULL,
PRIMARY KEY(id),
FOREIGN KEY(depart... |
<reponame>fabioturazzi/DatabaseDesign
CREATE TABLE CUSTOMER(
CustomerID INT,
FName VARCHAR(35) NOT NULL,
LName VARCHAR(35) NOT NULL,
DoB DATE NOT NULL,
CStreetAdd VARCHAR(100),
CCity VARCHAR(20),
CProvince VARCHAR(20),
CZIPCode VARCHAR(9),
RegistrationDate DATE NOT NULL,
... |
<reponame>siyoutechweb/s2c-PROD
id,image_url,product_item_id,is_selected,created_at,updated_at,image_name
1,https://storage.googleapis.com/siyou-b2s.appspot.com/products/6yWFbnYM0nKmOSj7mIYpTGy4zuTVTqRgvmbyn1kD.png,NULL,0,"2020-04-13 08:35:26","2020-04-13 08:35:26",6yWFbnYM0nKmOSj7mIYpTGy4zuTVTqRgvmbyn1kD.png
2,https:/... |
<filename>pkg/database/migrations/postgres/18_fingerprint_user.up.sql
DO $$
BEGIN
IF current_setting('is_superuser') = 'on' THEN
CREATE EXTENSION IF NOT EXISTS pgcrypto;
END IF;
END$$;
ALTER TABLE "scene_fingerprints" ADD COLUMN user_id uuid references "users"("id") ON DELETE CASCADE;
-- if there are existing... |
create or alter procedure Role.[test that when role name is null then should fail insert]
as
begin
declare @RoleName nvarchar(10) = null;
exec tSQLt.ExpectException @Message = N'Cannot insert the value NULL into column ''Name'', table ''AuthDB.auth.Role''; column does not allow nulls. INSERT fails.'
,@Expe... |
<reponame>dssonego/Siga<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 02-Maio-2016 às 22:44
-- Versão do servidor: 10.1.10-MariaDB
-- PHP Version: 7.0.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
insert into Users values
(default, '<NAME>', '<EMAIL>', default, 'pw123'),
(default, '<NAME>', '<EMAIL>', 1, 'pw123'),
(default, '<NAME>', '<EMAIL>', 1, 'pw123'),
(default, '<NAME>', '<EMAIL>', 1, 'pw123'),
(default, '<NAME>', '<EMAIL>', 1, 'pw123'),
(default, '<NAME>', '<EMAIL>', default, 'pw123'),
(default, '<NAME>'... |
<gh_stars>0
SET NAMES UTF8;
DROP DATABASE IF EXISTS fs;
CREATE DATABASE fs CHARSET=UTF8;
USE fs;
/**用户信息**/
CREATE TABLE fs_user(
uid INT PRIMARY KEY AUTO_INCREMENT,
uname VARCHAR(32),
upwd VARCHAR(32),
email VARCHAR(64),
phone VARCHAR(16),
avatar VARCHAR(128), #头像图片路径
user_name VARCHAR(32), ... |
<reponame>Tibelian/votation
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 10.4.8-MariaDB - mariadb.org binary distribution
-- SO del servidor: Win64
-- HeidiSQL Versión: 10.2.0.5599
-- --------------------... |
Create Table tot_people_in_KC as (
SELECT SUM(PWGTP)
FROM pums_2017
WHERE (puma Between '11601' AND '11616')
) |
<filename>Template_Tests/tSQLt/Functions/Private_GetCleanObjectName.sql
CREATE FUNCTION [tSQLt].[Private_GetCleanObjectName](@ObjectName NVARCHAR(MAX))
RETURNS NVARCHAR(MAX)
AS
BEGIN
RETURN (SELECT OBJECT_NAME(OBJECT_ID(@ObjectName)));
END; |
<reponame>uk-gov-mirror/SkillsFundingAgency.das-assessor-service
CREATE TABLE [dbo].[EMailTemplates](
[Id] [uniqueidentifier] NOT NULL DEFAULT NEWID(),
[TemplateName] [nvarchar](100) NOT NULL,
[TemplateId] [nvarchar](100) NOT NULL,
CONSTRAINT [PK_EMailTemplates] PRIMARY KEY ([Id]),
) ON [PRIMARY] TEXTIMAGE_ON ... |
<reponame>Shuttl-Tech/antlr_psql
-- file:plpgsql.sql ln:919 expect:false
if rec.slotlink != blname then
update HSlot set slotlink = blname where slotname = myname
|
<reponame>chengwenxin/sqlite-parser<filename>test/sql/official-suite/tkt-fa7bf5ec-1.sql
-- original: tkt-fa7bf5ec.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
CREATE TABLE t1(x);
INSERT INTO t1 VALUES ('a');
INSERT INTO t1 VALUES ('A');
INSERT INTO t1 VALUES ('A');
SELECT count(C... |
<filename>backend/schema/gitexercises.sql<gh_stars>100-1000
-- 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='TRADITIONAL,ALLOW_INVALID_DATES';
-- -------------... |
ALTER TYPE workflow_execution ADD last_first_event_id bigint; |
/* WATERLINES */
drop type if exists vectiles.type_waterline cascade;
create type vectiles.type_waterline
as enum (
'1m', --etak: "1-2m"
'3m', --etak: "2-4m"
'6m', --etak: "4-6m"
'8m', --etak: "6-8m"
'12m', --etak: laius=='Telg' and telje_tyyp in (10, 20)
'50m',
... |
-----------------------------------------------------
-----------------------------------------------------
--- MODALIDAD_DELITO DUMP_FISCALIA YPANTALLA DE SIGIPPEM ---
-----------------------------------------------------
-----------------------------------------------------
Insert into MO... |
CREATE TYPE enabled_enum AS ENUM('N', 'Y');
CREATE TABLE enc_keys (
"uuidb64" CHARACTER(22) NOT NULL PRIMARY KEY,
"ext_id" VARCHAR(128) NOT NULL UNIQUE,
"u_encrypt" enabled_enum NOT NULL,
"u_sign" enabled_enum NOT NULL,
"u_derive" enabled_enum NOT NULL,
"u_shared" enabled_enum NOT NULL,
"u... |
<reponame>SocialGouv/enfants-du-spectacle
-- AlterTable
ALTER TABLE "Dossier" ADD COLUMN "cdc" INTEGER;
|
<gh_stars>0
CREATE TABLE [dbo].[TTrainType]
(
--From MergedXSDs XSD
--From 'genericRailML' Namespace
[TTrainTypeId] TINYINT NOT NULL,
[Value] NVARCHAR(11) NOT NULL,
CONSTRAINT [PK_TTrainTypeId] PRIMARY KEY CLUSTERED ([TTrainTypeId] ASC)
);
|
<reponame>scala-steward/stakenet-orderbook<filename>server/src/main/resources/evolutions/default/49.sql
-- !Ups
UPDATE channel_extension_requests SET fee = (fee * 10000000000)::SATOSHIS_TYPE;
UPDATE channel_fee_payments SET capacity = (capacity * 10000000000)::SATOSHIS_TYPE;
UPDATE channel_fee_payments SET fee = (fee ... |
<reponame>vlddev/linguisto
CREATE USER 'appuser'@'localhost' IDENTIFIED BY 'appuser';
GRANT SELECT, INSERT, UPDATE, DELETE ON linguistodb.* TO 'appuser'@'localhost';
|
-- @description query01 for PXF Hive Collection Types
SELECT * FROM pxf_hive_collections ORDER BY t1;
|
-- Copyright (c) Microsoft Corporation. All rights reserved.
-- Licensed under the PostgreSQL License.
CREATE EXTENSION pgautofailover VERSION '1.0';
\dx pgautofailover
ALTER EXTENSION pgautofailover UPDATE TO '1.1';
\dx pgautofailover
ALTER EXTENSION pgautofailover UPDATE TO '1.2';
\dx pgautofailover
ALTER EXTENSI... |
<reponame>cbdevnet/cmail<filename>sql-update/install_master.sql
.bail on
.echo on
BEGIN TRANSACTION;
-- The users table stores information on cmail users
-- user_name User handle
-- user_authdata Password salt and hash in the format
-- <salt>:<sha256(salt + password)>
-- user_database Path to a user da... |
<reponame>jcoppieters/cody-samples<gh_stars>10-100
-- MySQL dump 10.13 Distrib 5.5.3-m3, for apple-darwin10.2.0 (i386)
--
-- Host: localhost Database: jsconf
-- ------------------------------------------------------
-- Server version 5.5.3-m3
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!401... |
<gh_stars>0
select 1;
select 'x';
select 1 / 0;
select 1 from x;
select a.b.c from d.e;
select x from y;
select "x" from "y";
select x, y from z;
select f(x, 2) from y;
select x as y from z;
select x and y;
select not z;
select * from t as t(c);
select x from y join z;
select x from y join z on 1;
select x from y where... |
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 16, 2016 at 06:34 PM
-- Server version: 5.7.9
-- PHP Version: 5.6.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... |
<filename>laravel_admin.sql
-- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Окт 21 2015 г., 14:58
-- Версия сервера: 5.6.16
-- Версия PHP: 5.5.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
<reponame>FrankNgo/Hair-Salon<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Mar 06, 2018 at 02:47 PM
-- Server version: 5.6.34-log
-- PHP Version: 7.1.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET ... |
CREATE TABLE [dbo].[Presenca]
(
[Id] INT NOT NULL PRIMARY KEY IDENTITY(1,1),
[Diario] INT NOT NULL,
[Aluno] INT NOT NULL,
CONSTRAINT [FK_Presenca_Diarios]
FOREIGN KEY ([Diario])
REFERENCES [Diarios]([Id]),
CONSTRAINT [FK_Presenca_Aluno]
FOREIGN KEY ([Aluno])
REFERENCES [Alunos]([Id])
)
|
CREATE TABLE phrases (
id SERIAL NOT NULL,
lang VARCHAR(2) NOT NULL,
text VARCHAR NOT NULL,
machine_translation bool NOT NULL default false,
PRIMARY KEY(id, lang)
);
CREATE TABLE users (
id SERIAL PRIMARY KEY,
user_uuid UUID NOT NULL,
hash BYTEA NOT NULL,
salt VARCHAR(255) NOT NULL,... |
<reponame>Nifori/NifoBot
CREATE TABLE IF NOT EXISTS DATAMODEL_CHECKPOINT_T01 (
ScriptOID VARCHAR(50),
OID BIGINT PRIMARY KEY,
ExecutionTime TIMESTAMP
);
CREATE SEQUENCE IF NOT EXISTS DATAMODEL_CHECKPOINT_Q01; |
<filename>Core/4ever20.SqlServerDatabase/dbo/Stored Procedures/sp_GetGuestPhoto.sql
-- =============================================
-- Author: <NAME>
-- Create date: 2019-12-08
-- Description:
-- =============================================
CREATE PROCEDURE [dbo].[sp_GetGuestPhoto]
-- Add the parameters for the ... |
INSERT INTO Patient (ID, Name, BirthDate, LastUpdated)
VALUES (1, "<NAME>", datetime('1900-10-23'), datetime('now'));
INSERT INTO Ailment (ID, Name, LastUpdated)
VALUES (1, "<NAME>", datetime('now'));
INSERT INTO Symptom (ID, Name, LastUpdated)
VALUES (1, "Weakness to fire, strengthened regeneration",... |
create table Adresse(
ID int primary key,
Strasse varchar(64) not null,
Hausnummer varchar(64) not null,
Zusatz varchar(64),
PLZ varchar(64) not null,
Ort varchar(64) not null
);
-- TO DO Profilbild
create table Benutzer(
ID int ... |
<filename>sql/iot_platform_with_procedure.sql
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS `iot_aligenie_device_catalogs`;
CREATE TABLE `iot_aligenie_device_catalogs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) DEFAULT NULL,
`value` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyI... |
-- Database: flight-booking-db
-- DROP DATABASE "flight-booking-db";
-- CREATE DATABASE "flight-booking-db"
-- WITH
-- OWNER = postgres
-- ENCODING = 'UTF8'
-- LC_COLLATE = 'en_US.UTF-8'
-- LC_CTYPE = 'en_US.UTF-8'
-- TABLESPACE = pg_default
-- CONNECTION LIMIT = -1;
-- Schema: public
-- ... |
DROP TABLE IF EXISTS curated;
DROP TABLE IF EXISTS curated_pages;
DROP TABLE IF EXISTS page CASCADE;
CREATE TABLE page
( page text NOT NULL
, timestamp timestamptz NOT NULL
, stable_version text NOT NULL
, homepage text NOT NULL
);
CREATE INDEX page_page ON page (page, timestamp);
CREATE VIEW upd... |
ALTER TABLE metadata ADD edited BOOLEAN;
UPDATE metadata SET edited = false;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.