sql stringlengths 6 1.05M |
|---|
<filename>graphql_compiler/tests/complex_nested_optionals_output.sql<gh_stars>0
SELECT
EXPAND($result)
LET
$optional__0 = (
SELECT
Animal___1.name AS `animal_name`
FROM (
MATCH {{
class: Animal,
where: ((((out_Animal_ParentOf IS null) OR (o... |
----------------------------------------------------------------
-- [snapshots] Table
--
CREATE OR REPLACE FUNCTION InsertSnapshot (
v_snapshot_id UUID,
v_vm_id UUID,
v_snapshot_type VARCHAR(32),
v_status VARCHAR(32),
v_description VARCHAR(4000),
v_creation_date TIMESTAMP WITH TIME ZONE,
v... |
<gh_stars>1-10
CREATE TABLE HDB_TRANS_HIST (
BLOCK VARCHAR(20) NOT NULL,
STREET_NAME VARCHAR(100) NOT NULL,
FLOOR_LEVEL_RANGE VARCHAR(20) NOT NULL,
FLOOR_AERA_FLAT_MODEL VARCHAR(30) NOT NULL,
LEASE_DATE INT NOT NULL,
REMAIN_LEASE ... |
<filename>maximo-asset-monitor/db-scripts/EntityType_Dimension.ddl
-- BLUADMIN.CLIENTS04_DIMENSION definition
CREATE TABLE "BLUADMIN"."CLIENTS04_DIMENSION" (
"DEVICEID" VARCHAR(50 OCTETS) ,
"CLIENT" VARCHAR(50 OCTETS) ,
"ORG" VARCHAR(50 OCTETS) ,
"FUNCTION" VARCHAR(50 OCTETS) ,
"DEVICETYPE" VARCHA... |
<gh_stars>1-10
--liquibase formatted sql
--changeset Padma:23
CREATE TABLE song_text
(
id serial NOT NULL,
refrain_original varchar (500),
refrain_english_translation varchar(500),
refrain_english_transliteration varchar(500),
CONSTRAINT song_text_pkey PRIMARY KEY (id)
);
--rollback: drop table song_text; |
<reponame>lchx1010/pxf
DROP TABLE cclodbctest;
|
autocommit off;
create class seqstr (i int, s sequence of string);
insert into seqstr values(1, sequence{'abc', 'def'});
insert into seqstr values(2, sequence{'xyz', '123'});
select s into p1 from seqstr where i = 1;
select * from seqstr where s = p1;
select * from seqstr where p1 = s;
rollback;
|
-- MySQL dump 10.13 Distrib 5.6.30, for debian-linux-gnu (x86_64)
--
-- RaiBlocks Telegram bot
-- @RaiWalletBot https://t.me/RaiWalletBot
--
-- Source code:
-- https://github.com/SergiySW/RaiWalletBot
--
-- Released under the BSD 3-Clause License
--
--
-- MySQL database structure dump
--
/*!40101 SET @OLD_CHARACTER... |
ALTER TABLE "chat"."Reaction" ALTER COLUMN "messageId" SET NOT NULL;
|
CREATE TABLE [dbo].[Cinema]
(
[Id] INT IDENTITY(1, 1) NOT NULL PRIMARY KEY,
[Name] NVARCHAR(255) NOT NULL,
[Address] NVARCHAR(255) NOT NULL
)
|
CREATE SCHEMA cars;
USE `cars`;
CREATE TABLE manufacturers (
`manufacturer_id` INT PRIMARY KEY AUTO_INCREMENT NOT NULL UNIQUE,
`name` VARCHAR(60) NOT NULL,
`established_on` DATE NOT NULL
);
INSERT INTO `manufacturers`(`name`, `established_on`)
VALUES('BMW', '1916-03-01'),
('Tesla', '2003-01-01'),
('Lada', '1966-05-0... |
<reponame>vdergachev/old-school-stuff<gh_stars>0
alter table GKLIENTS_GK_NEWS add column IMAGE varchar(255) ;
|
-- AlterTable
ALTER TABLE "Character" ADD COLUMN "background" TEXT;
|
<filename>db/seeds.sql
INSERT INTO departments (department_name)
VALUES
("Human Resources"),
("Finance"),
("Inorganic"),
("Organic"),
("Sales"),
("Engineering"),
("Maintenance"),
("Shipping & Recieving");
INSERT INTO roles (title, department_id, salary)
VALUES
("Human Resource Manager", 1, 60000),
... |
<reponame>bablulawrence/starter-react-dotnetcore-mvc
CREATE USER [web-app-name] FROM EXTERNAL PROVIDER;
ALTER ROLE db_datareader ADD MEMBER [web-app-name];
ALTER ROLE db_datawriter ADD MEMBER [web-app-name];
ALTER ROLE db_ddladmin ADD MEMBER [web-app-name]; |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.31.10
-- Generation Time: Feb 04, 2019 at 02:16 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... |
<reponame>adrieledgard/PHS<gh_stars>0
delimiter //
create trigger trgupdatecustorder after update on cust_order_header
for each row
begin
declare done int(2);
declare done2 int(2);
declare qty_temp int(11);
declare stock_atc_awal int(11);
declare stock_awal int(11);
declare Var_Id_detail_order int(11);
decla... |
<reponame>sorshion/joyadmin
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50553
Source Host : localhost:3306
Source Database : admintest
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-05-20 22... |
<gh_stars>0
# -- Users for testing -- #
INSERT INTO `controlroom`.`user`
(
`user_id`,
`email`,
`first_name`,
`last_name`,
`latitude`,
`longitude`,
`password`,
`username`,
`authority_id`,
`last_new_incident`)
VALUES
(1,
"<EMAIL>",
"Giannis",
"Katsaros",
0.0,
0.0,
"$2a$10$YHVRGOscVYeMbIjkf5qRg.lYqB43jrIh1baf2SyeI5K3DfL8M... |
--declare @Field table (
-- FieldID int
--)
--insert into @Field values
--(1),
--(2)
--declare @Survey table (
-- SurveyID int,
-- FK_FieldID int
--)
--insert into @Survey values
--(1, 1),
--(1, 2),
--(2, 3),
--(2, 4)
--declare @FieldGroup table (
-- FieldGroupID int
--)
--insert into @FieldGroup values
--(1),
--(2)... |
<reponame>DanielHeath/activefacts-compositions
CREATE TABLE Attendance (
-- Attendance involves Attendee and Person has given-Name
AttendeeGivenName VARCHAR(48) NOT NULL,
-- Attendance involves Attendee and maybe Person is called family-Name
AttendeeFamilyName VARCHAR(48) ... |
create table translation_units_metadata
(
translation_unit_id bigint unsigned not null,
metadata_id bigint unsigned not null,
constraint unique_metadata_id
unique (metadata_id),
constraint translation_units_metadata_translation_unit_fk
foreign key (translation_unit_id) references... |
<filename>Model/lib/sql/migration_user_b21.sql<gh_stars>0
DELETE FROM userlogins5.categories;
DELETE FROM userlogins5.favorites;
DELETE FROM userlogins5.user_baskets;
DELETE FROM userlogins5.strategies;
DELETE FROM userlogins5.steps;
DELETE FROM userlogins5.dataset_values;
DELETE FROM userlogins5.datasets;
DELE... |
<filename>net.solarnetwork.node.dao.jdbc/src/net/solarnetwork/node/dao/jdbc/derby-init-update-2.sql
ALTER TABLE solarnode.sn_settings
ADD COLUMN tkey VARCHAR(255) WITH DEFAULT '';
UPDATE solarnode.sn_settings SET tkey = '';
ALTER TABLE solarnode.sn_settings
ALTER COLUMN tkey NOT NULL;
ALTER TABLE solarnode.sn_settin... |
<reponame>jiandanshenghuo18956/ipjson<gh_stars>0
/*
Navicat Premium Data Transfer
Source Server : 127.0.0.1
Source Server Type : MySQL
Source Server Version : 50722
Source Host : 127.0.0.1:3306
Source Schema : zuihou_base_0000
Target Server Type : MySQL
Target Server Version : ... |
{{
config(
materialized='view'
)
}}
with t as (
select * from {{ ref('view') }}
)
select date_trunc('year', updated_at) as year,
count(*)
from t
group by 1
|
ALTER TABLE resource DROP INDEX unique_issuer_client_resource_id;
ALTER TABLE resource DROP COLUMN resource_id;
ALTER TABLE subject DROP INDEX unique_issuer_client_subject_id;
ALTER TABLE subject DROP COLUMN subject_id;
|
<gh_stars>1-10
rem usage notes:
rem sqlplus sys/change_on_install@orcl @db/grant-any-job.sql
set long 10000 lines 140 pages 50 timing on echo off
set serveroutput on size 1000000
grant create any job to LUCENE;
grant execute on dbms_lock to LUCENE;
exit
|
<reponame>mapofzones/database-hasura<filename>hasura/migrations/1639789632744_create_table_public_nodes_rpc_addrs/down.sql
DROP TABLE "public"."nodes_rpc_addrs";
|
DROP TABLE IF EXISTS user;
CREATE TABLE user
(
id BIGINT(20) NOT NULL COMMENT '主键ID',
name VARCHAR(30) NULL DEFAULT NULL COMMENT '姓名',
age INT(11) NULL DEFAULT NULL COMMENT '年龄',
email VARCHAR(50) NULL DEFAULT NULL COMMENT '邮箱',
PRIMARY KEY (id)
);
INSERT INTO user (id, name, age, email) VALUES
(1, '伽罗', 18, '<... |
<gh_stars>1-10
--Script to export table with summary performance data for Beta-Hairpin system for:
-- V4 SPI, group_id = 226
-- V5 SPI, group_id = 245
export to hairpin_table.del of del
with spi_mesh (trace_set_id, p_x, p_y, p_z) as (select trace_set_id, int(p_x), int(p_y), int(p_z) from proc_mesh
where trace_set_id... |
<filename>data/data_simple.sql
--
-- add type fields
--
INSERT INTO `core_form_field` (`Field_ID`, `type`, `label`, `fieldkey`, `tab`, `form`, `class`, `url_view`, `url_list`, `show_widget_left`, `allow_clear`, `readonly`, `tbl_cached_name`, `tbl_class`, `tbl_permission`) VALUES
(NULL, 'select', 'Type', 'type_idfs', 'h... |
CREATE SCHEMA sp;
CREATE TABLE sp.waypoints (
id serial primary key
, way_id bigint
, node_id bigint
, sequence_id integer
, distance double precision
);
INSERT INTO sp.waypoints (way_id, node_id, sequence_id, distance) (
SELECT way_id
, node_id
, sequence_id
, NULL AS distance
FR... |
drop if exists s;
create table s(i CHARACTER(2) NOT NULL ,j INTEGER NOT NULL,s NUMERIC(6,2));
insert into s values('11',2,66.00);
insert into s values('11',2,66.00);
insert into s values('08',2,49.00);
insert into s values('07',2,68.00);
insert into s values('06',2,68.00);
insert into s values('05',2,68.00);
insert in... |
--alter class attribute,create unique index and retrieve information from db_index
CREATE CLASS ddl_0001(
col1 smallint,
col2 smallint,
col3 smallint NOT NULL,
col4 smallint DEFAULT 2 NOT NULL,
col5 smallint DEFAULT 2 Not Null,
col6 smallint UNIQUE,
col7 ... |
<gh_stars>0
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.5
-- Dumped by pg_dump version 9.5.5
-- Started on 2017-03-09 10:42:03 WAT
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET clie... |
INSERT INTO logged (time, string) VALUES (clock_timestamp(), 'string_123')
|
CREATE TABLE IF NOT EXISTS `#__rsform_config` (
`SettingName` varchar(64) NOT NULL default '',
`SettingValue` text NOT NULL,
PRIMARY KEY (`SettingName`)
) DEFAULT CHARSET=utf8; |
--
-- Copyright (2018) SoCal Bioinformatics Inc. All rights reserved.
-- This script is the confidential and proprietary product
-- of SoCal Bioinformatics Inc. Any Unauthorized reproduction or
-- transfer of the contents herein is strictly prohibited.
--
-- AUTH: <NAME> | SoCal Bioinformatics Inc
-- DATE: 201... |
-- On se connecte à la database shows
\c shows
-- On récupère dans un fichier CSV toutes la table users pour créer un backup
COPY (SELECT * FROM users) TO '/mnt/c/Workspace/csv/backup_users.csv' DELIMITER ',' HEADER CSV; |
<filename>hadifa.sql<gh_stars>0
<<<<<<< HEAD
=======
CREATE DATABASE IF NOT EXISTS `hadifa` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `hadifa`;
>>>>>>> 085a02efcbc766507453f5079999f8e87080f1ce
-- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64)
--
-- Host: localhost Database: hadifa
-- ------------------------... |
DELETE FROM employees
WHERE
employees.id NOT IN (SELECT
employee_id
FROM
employees_clients) |
<reponame>tanzirbd/e-commerce<filename>e-commerce.sql
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 23, 2017 at 04:13 PM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 7.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!4... |
<reponame>truthly/uniphant
CREATE OR REPLACE FUNCTION api.sign_up(username text, device_name text)
RETURNS jsonb
LANGUAGE plpgsql
SECURITY DEFINER
SET search_path TO public, pg_temp
AS $$
DECLARE
_user_id bigint;
BEGIN
_user_id := api.create_user(username);
--
-- The first user who signs-up
-- automatically gets the ... |
<reponame>EFTEC/SecurityOneMysql<filename>lib/sql/SecUser.sql
-- version Generated by Table(20170604) 2018-09-27 17:48:27
-- SET FOREIGN_KEY_CHECKS=0;
drop table IF EXISTS `sec_users`;
CREATE TABLE `sec_users`(
`iduser` INT NOT NULL AUTO_INCREMENT,
`user` VARCHAR(50) NOT NULL DEFAULT '',
`password` VARCHAR(64) N... |
<filename>src/SFA.Apprenticeships.Data.AvmsPlus/dbo/Stored Procedures/uspEmployerContactUpdate.sql
CREATE PROCEDURE [dbo].[uspEmployerContactUpdate]
-- Add the parameters for the stored procedure here
@employerContactId int,
@AddressLine1 nvarchar(50) ,
@AddressLine2 nvarchar(50) ,
@AddressLin... |
--RULE TABLE
CREATE TABLE EDCR_RULE(
id bigint NOT NULL,
name character varying(128) NOT NULL,
clause character varying(256) NOT NULL,
active boolean DEFAULT true NOT NULL,
version numeric DEFAULT 0,
createdBy bigint NOT NULL,
createdDate timestamp without time zone NOT NULL,
lastModifiedBy bigint,
lastModifie... |
-- file:identity.sql ln:47 expect:true
INSERT INTO itest3 DEFAULT VALUES
|
-- original: sqllog.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
CREATE TABLE t1(x, y);
INSERT INTO t1 VALUES(1, 2);
INSERT INTO t1 VALUES(sub_a, sub_b);
SELECT * FROM t1
;INSERT INTO t1 VALUES(4, 5);
SELECT * FROM t1
;INSERT INTO t1 VALUES(6, 7);
SELECT * FROM t1; |
<reponame>iColabora/pixie
DROP TABLE user_settings;
CREATE TABLE user_settings (
user_id UUID,
analytics_optout boolean DEFAULT false,
PRIMARY KEY(user_id),
FOREIGN KEY (user_id) REFERENCES users(id)
);
INSERT INTO user_settings (user_id)
SELECT id FROM users; |
DROP TABLE IF EXISTS `base_video`;
CREATE TABLE IF NOT EXISTS `base_video` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`cate_id` int(11) unsigned NOT NULL COMMENT '分类id',
`author_id` int(11) unsigned NOT NULL default 0 COMMENT '作者id',
`title` varchar(60) NOT NULL COMMENT '标题',
`pic` varchar(128) NOT NULL COMMENT '... |
<reponame>LolHens/play2-auth
CREATE TABLE users (
id serial PRIMARY KEY,
name VARCHAR(100) NOT NULL,
avatar_url VARCHAR(1000) NOT NULL
);
CREATE TABLE github_users (
user_id INTEGER NOT NULL UNIQUE REFERENCES users(id),
id bigint PRIMARY KEY,
login VARCHAR(100) NOT NULL,
avatar_url VARCHAR(1000) NOT NULL... |
#standardSQL
# page wpt_bodies metrics grouped by device and rel attributes
# Note: this query only reports if a rel attribute value was ever used on a page. It is not a per anchor report.
# helper to create percent fields
CREATE TEMP FUNCTION AS_PERCENT (freq FLOAT64, total FLOAT64) RETURNS FLOAT64 AS (
ROUND(SAFE_... |
SET search_path = pg_catalog;
DROP TABLE defval.t1;
DROP FUNCTION defval.f();
CREATE TABLE defval.t1 (
c2 integer,
c1 text DEFAULT USER
);
ALTER TABLE defval.t1 OWNER TO levsha_aa; |
<filename>src/test/isolation2/sql/resgroup/resgroup_alter_memory_spill_ratio.sql
-- start_ignore
DROP RESOURCE GROUP rg_spill_test;
-- end_ignore
CREATE RESOURCE GROUP rg_spill_test WITH
(concurrency=10, cpu_rate_limit=20, memory_limit=20, memory_shared_quota=20, memory_spill_ratio=10);
CREATE OR REPLACE VIEW rg_spill... |
<filename>fixtures/doctests/ecpg/125/input.sql<gh_stars>0
int
main(void)
{
EXEC SQL BEGIN DECLARE SECTION;
char *dbname = "testdb"; /* database name */
char *user = "testuser"; /* connection user name */
char *connection = "tcp:postgresql://localhost:5432/testdb";
... |
<filename>sql/u115752684_asesores.sql
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 20-09-2019 a las 17:27:13
-- Versión del servidor: 5.6.21
-- Versión de PHP: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 ... |
<filename>MVC_CRUD_DB/dbo/Tables/Office.sql<gh_stars>0
CREATE TABLE [dbo].[Office]
(
[Id] INT NOT NULL PRIMARY KEY IDENTITY,
[Country] NVARCHAR(50) NULL,
[City] NVARCHAR(50) NULL,
[Street] NVARCHAR(50) NULL,
[StreetNumber] TINYINT NULL,
[isHQ] BIT NULL,
[Company] INT NULL FOREIGN KEY REF... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th10 08, 2018 lúc 06:03 AM
-- Phiên bản máy phục vụ: 10.1.29-MariaDB
-- Phiên bản PHP: 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... |
-- name:save-message!
-- Creates a new message
INSERT INTO receipts
(name, message, timestamp)
VALUES (:name, :message, :timestamp)
-- name:get-messages
-- Selects all available messages
SELECT * from receipts
-- name:store-file!
-- Creates a new file
INSERT INTO files
(email, fname, type, comment, store, date, times... |
DROP TABLE [Audit];
CREATE TABLE [Audit](
[AuditId] [uniqueidentifier] NOT NULL CONSTRAINT [DF_Audit_AuditId] DEFAULT (newid()),
[TableName] [VARCHAR](150) NULL,
[FieldName] [VARCHAR](150) NULL,
[OldValue] [VARCHAR](1000) NULL,
[NewValue] [VARCHAR](1000) NULL,
[UpdateDate] [datetime] NOT NULL CONSTRAINT [DF_Aud... |
<gh_stars>0
-- Verify database-message-store:views/category_type_summary on pg
BEGIN;
SELECT
category,
type,
message_count,
percent
FROM message_store.category_type_summary
WHERE FALSE;
ROLLBACK;
|
/******************************************************************************
** Description: Separated login table to esnure the SR-Principal.
**
**
**
** Author: <NAME>
** Date: 09.03.2017
**
**
*******************************************************************************
** Change History
******************... |
<filename>CMP/Cmp_Db/dbo/Tables/OpRequests.sql
CREATE TABLE [dbo].[OpRequests] (
[Id] INT NOT NULL,
[RequestName] VARCHAR (512) NULL,
[RequestDescription] VARCHAR (1024) NULL,
[RequestType] VARCHAR (50) NULL,
[C... |
<reponame>ts-cset/sql-injection-demo
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS products;
CREATE TABLE users (
id serial PRIMARY KEY,
username text UNIQUE NOT NULL,
password text NOT NULL,
type text NOT NULL
);
CREATE TABLE products (
id serial PRIMARY KEY,
name text UNIQUE NOT NULL,
price text NO... |
SELECT 'data-source' AS __data_source, ad_id AS ad_id, sum(impressions) AS impressions
FROM (SELECT db_schema_metric_table_hourly_0f32eb13951cfe30.ad_id AS ad_id, db_schema_metric_table_hourly_0f32eb13951cfe30.impressions AS impressions
FROM db.schema.metric_table_hourly AS db_schema_metric_table_hourly_0f32eb13951cf... |
DROP TABLE IF EXISTS `developers`;
DROP TABLE IF EXISTS `applications`;
DROP TABLE IF EXISTS `credentials`;
CREATE TABLE `developers` (
`dev_id` VARCHAR(64) NOT NULL,
`user_id` VARCHAR(64) NOT NULL,
`organization_name` varchar(320) NOT NULL,
`contact_email` varchar(255) NOT NULL,
`agree_to_tos` BIT NOT NULL,
`cr... |
<filename>SQL/master/popup/p006/SPC_P006_LST3.sql
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SPC_P006_LST3]') AND type IN (N'P', N'PC'))
/****** Object: StoredProcedure [dbo].[SPC_M001L_FND1] Script Date: 2017/11/23 16:46:46 ******/
DROP PROCEDURE [dbo].[SPC_P006_LST3]
GO
/****... |
-- 13. Which client(s) do not currently have a Job in the job table?
-- Hint: this query requires the use of a non-correlated sub-query.
SELECT
ClientName
FROM
Client
WHERE
ClientID not in (
SELECT
ClientID
FROM
JOB
)
ORDER BY
ClientName;
|
<reponame>timshadel/subdivision-list
CREATE TABLE subdivision_UA (id VARCHAR(6) NOT NULL, name VARCHAR(255) NOT NULL, level VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
INSERT INTO `subdivision_UA` (`id`, `name`, `level`) VALUES ('UA-71', 'Oblast de Tcherka... |
<reponame>Long292/fuv-qna-forum-
USE QnAForum;
CREATE TABLE user (
Uid Int NOT NULL auto_increment,
Email Char(100) NOT NULL,
Username Char(100) NOT NULL,
Password Char(100) NOT NULL,
CONSTRAINT USERS_PK PRI... |
-- 2017-10-04T21:56:32.407
-- M_Forecast_Process
DELETE FROM AD_Process_Trl WHERE AD_Process_ID=540433
;
DELETE FROM AD_Process WHERE AD_Process_ID=540433
;
|
DROP TABLE USER_CREDENTIALS;
CREATE TABLE user_credentials (
user_name VARCHAR(50),
mobile_number VARCHAR(15),
active_status CHAR(1) DEFAULT 'Y',
password VARCHAR(20) NOT NULL,
created_datetime TIMESTAMP(6) DEFAULT SYSTIMESTAMP,
modified_datetime TIMESTAMP(6... |
<reponame>droidsumeet/steady
--1) vulndep for application where lib is not well known digests and affected true
---- first half of the UNION query retrieves vulndeps using the library_id to determine whether affected is true
----(the Java implementation enforces that the affected stored is done via the library_id e... |
-- 3D City Database Utilities Package
--
-- August 2017
--
-- 3D City Database: http://www.3dcitydb.org
--
--
-- Copyright 2017
-- Austrian Institute of Technology G.m.b.H., Austria
-- Center for Energy - Smart Cities and Regions Research Field
-- http://www.ait.ac.at/en/resea... |
-- <Cleaning>
ALTER TABLE sht.payout
RENAME TO payout_old;
ALTER TYPE sht.PAYOUTSTATUS
RENAME TO PAYOUTSTATUS_OLD;
-- </Cleaning>
CREATE TYPE sht.PAYOUT_STATUS AS ENUM ('UNPAID', 'PAID', 'CONFIRMED', 'CANCELED');
CREATE TYPE sht.PAYOUT_TYPE AS ENUM ('CardPayout', 'AccountPayout');
CREATE SEQUENCE payout_id_sequ... |
IF OBJECT_ID('hrm.employee_type_scrud_view') IS NOT NULL
DROP VIEW hrm.employee_type_scrud_view;
GO
CREATE VIEW hrm.employee_type_scrud_view
AS
SELECT
employee_type_id,
employee_type_code,
employee_type_name
FROM hrm.employee_types
WHERE hrm.employee_types.deleted = 0;
GO
|
-- Revert grow_json_columns
BEGIN;
ALTER TABLE cookbook_versions
MODIFY metadata blob,
MODIFY definitions blob,
MODIFY libraries blob,
MODIFY attributes blob,
MODIFY recipes blob,
MODIFY providers blob,
MODIFY resources blob,
MODIFY templates blob,
MODIFY root_files blob,
MODIFY files blob;
ALTER TABLE da... |
<gh_stars>1-10
CREATE TABLE cotahist_header (
id int8 NOT NULL,
cod_ori varchar(255) NULL,
dat_ger date NULL,
nom_arq varchar(255) NULL,
tip_reg int4 NULL,
CONSTRAINT cotahist_header_pkey PRIMARY KEY (id)
);
CREATE TABLE cotahist_line (
id int8 NOT NULL,
cod_neg varchar(255) NULL,
bdi int4 NULL,
dt_preg date... |
<reponame>pdv-ru/ClickHouse
-- Tags: no-parallel
-- Create dictionary, since dictGet*() uses DB::Context in executeImpl()
-- (To cover scope of the Context in DB::PushingToViewsBlockOutputStream::process)
set insert_distributed_sync=1;
DROP TABLE IF EXISTS mv;
DROP DATABASE IF EXISTS dict_in_01023;
CREATE DATABASE d... |
<gh_stars>1-10
/*** Remember to remove filters **/
--DELETE FROM [Profile.Module].[GenericRDF.Data] WHERE [Name] = 'Twitter';
declare @wNodeID bigint, @orngwNodeID bigint
select @wNodeID = NodeID from [RDF.].[Node] where value in ('http://profiles.catalyst.harvard.edu/ontology/plugins#Twitter')
select @orngwNodeID ... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 08, 2021 at 10:51 AM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
DROP PROCEDURE IF EXISTS `add_customs_declaration`;
DELIMITER $$
CREATE PROCEDURE `add_customs_declaration` (`ext_id_val` VARCHAR(255))
BEGIN
DECLARE lines_count INT DEFAULT 0;
SET lines_count = (SELECT count(*) FROM customs_declarations WHERE ext_id = ext_id_val);
IF (lines_count > 0)
THEN
UPDAT... |
<reponame>caspanh/prueba3
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EX... |
USE [EZDiscuss]
GO
/****** Object: StoredProcedure [dbo].[GroupMemberDelete] Script Date: 09/16/2014 22:15:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <NAME>
-- Create date: January 25, 2014
-- Description: Deletes (soft delete) a Grou... |
INSERT INTO vin(cru,annee,degre,created_at,updated_at) VALUES('Mercurey',1980,11.500000,NOW(),NOW());
INSERT INTO producteur(nom,prenom,region,created_at,updated_at) VALUES('Prebost','Gaston','Provence',NOW(),NOW());
INSERT INTO producteur(nom,prenom,region,created_at,updated_at) VALUES('Bordonado','Raymond','Provence... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 17, 2021 at 11:51 AM
-- Server version: 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 *... |
-- date_math.sql
-- date math examples
-- how to get the minutes between to dates of the same day
drop table date_math;
create table date_math ( start_date date, end_date date );
insert into date_math values( to_date('06/15/1999 06:00:00', 'mm/dd/yyyy hh24:mi:ss'), to_date('06/15/1999 06:45:32', 'mm/dd/yyyy hh24:m... |
<reponame>tgaffey/slate
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `courses` (
`ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Class` enum('Slate\\Courses\\Course') NOT NULL,
`Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`CreatorID` int(11) DEFAULT N... |
SELECT * FROM Estilos;
SELECT * FROM Artistas;
SELECT A.IdArtista, A.Nome, A.IdEstilo, E.Nome AS NomeEstilo FROM Artistas A INNER JOIN Estilos E ON A.IdEstilo = E.IdEstilo;
select * from Estilos for json auto
|
<reponame>OSMadeIT/kenya-counties-and-their-codes
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 04, 2019 at 06:49 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSAC... |
--
CREATE TABLE IF NOT EXISTS designerTreeItemConnection (
designerTreeItemConnectionId BIGINT NOT NULL AUTO_INCREMENT UNIQUE
, designerTreeId BIGINT NOT NULL DEFAULT 0
, businessId BIGINT NOT NULL DEFAULT 0
, idx ... |
<filename>DevsNest/b_eLearnings/PostgresQL/Prisma/learning_prisma/prisma/migrations/20220514110851_two/migration.sql
/*
Warnings:
- A unique constraint covering the columns `[email]` on the table `Seller` will be added. If there are existing duplicate values, this will fail.
- Added the required column `email` t... |
<reponame>iuri/tutortronics<filename>packages/acs-events/sql/postgresql/test/acs-events-test.sql<gh_stars>0
-- packages/acs-events/sql/postgres/test/acs-events-test.sql
--
-- Regression tests for ACS Events
--
-- @author <EMAIL>
-- @creation-date 2001-06-26
--
-- $Id: acs-events-test.sql,v 1.4 2015/12/04 13:50:03 cvs E... |
<filename>postgis-3.1.1/regress/core/snaptogrid.sql<gh_stars>0
-- postgis-users/2006-January/010870.html
CREATE TEMP TABLE tmp (orig geometry);
INSERT INTO tmp (orig) VALUES ('01020000207D18000007000000D7A3701D641B3FC18B6CE7FB5A721841FA7E6A9C5E1B3FC191ED7C3F9872184139B4C816591B3FC1E3A59BC4D472184104560E4D891A3FC177BE9... |
<filename>db/liquibase/2014-07-01.0_ips_schema.sql
-- liquibase formatted SQL
-- changeset andy:10
ALTER TABLE `users` ADD COLUMN `esdp_provider` VARCHAR(255) NULL;
UPDATE `users` SET `esdp_provider` = 'ips'; |
ALTER TABLE accessibility_requests ADD COLUMN deleted_at TIMESTAMP;
|
CREATE TABLE students (
id TEXT PRIMARY KEY,
fprint TEXT NOT NULL,
emoji TEXT NOT NULL,
text TEXT NOT NULL,
nick TEXT,
course TEXT NOT NULL,
section INTEGER NOT NULL
);
|
# --- !Ups
ALTER TABLE user ADD INDEX user_index_1 (email);
ALTER TABLE user ADD INDEX user_index_2 (email,password,active);
ALTER TABLE user ADD INDEX user_index_3 (type_id);
ALTER TABLE user ADD INDEX user_index_4 (details_id);
ALTER TABLE keyword ADD INDEX keyword_index_1 (keyword);
ALTER TABLE user_keyword ADD INDE... |
CREATE OR REPLACE TABLE testdataset.DerivedTable8 AS
WITH
Table36 AS (
SELECT
CASE
WHEN STARTS_WITH(DerivedTable4.CustomerCDJF,SourceB.FieldC) THEN
IF(
'Fee-ZQ4B' = 'Address-MDAq', DerivedTable4.CCYY6No,
DerivedTable4.CodelvtV)
WHEN STARTS_WITH(DerivedTable3... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.