text stringlengths 1 1.05M |
|---|
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
0 1 1 1 1 0 1 1 0 0 0 1
0 0 1 1 1 0 1 1 0 0 0 1
0 1 0 1 1 0 1 1 0 0 0 1
1 0 0 0 0 1 0 1 0 0 0 1
0 1 1 1 1 0 1 1 0 0 0 1
1 0 0 0 0 1 0 1 0 0 0 1
0 1 1 1 1 0 1 1 0 0 0 1
0 1 1 1 1 0 1 1 0 0 0 1
0 1 1 1 1 1 1 1 0 0 0... |
drop procedure if exists sp_removeToken;
delimiter #
CREATE PROCEDURE sp_removeToken(
IN paramToken VARCHAR(255)
)
BEGIN
DELETE FROM
tbl_user_token
WHERE token = paramToken;
END#
|
/* Table for holding the GISAID virusname and Isolate templates */
SET @table_name = "virusnames";
CALL create_dict_table(@table_name);
CALL upsert_dict_table(@table_name, 0, "gisaid",
"hCoV-19/{{continent}}/{{country}}_{{submitting_lab_symbol}}_{{sample_name}}/{{collection_year}}");
CALL upsert_dict_table(@table_... |
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 03-10-2017 a las 17:34:56
-- Versión del servidor: 5.7.9
-- Versión de PHP: 5.6.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
-- SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... |
SELECT
lead(l_shipmode, 1, 'default') over (PARTITION BY L_ORDERKEY order by l_shipmode ) as shipmode_lead,
lead(l_linenumber, 1, 100) over (PARTITION BY L_ORDERKEY order by l_shipmode ) as linenumber_lead,
lead(l_suppkey_t, 1, 1000::int8) over (PARTITION BY L_ORDERKEY order by l_shipmode ) as suppkey_lead,
lea... |
select stampede.clean_up();
|
/**************************************************************************
* Copyright 2016 Observational Health Data Sciences and Informatics (OHDSI)
*
* 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 Li... |
--
-- CzechIdM 11 Flyway script
-- BCV solutions s.r.o.
--
-- Script fixing wrong V8_02_003__role-guarantee-by-role.sql where was used public schema. That script was removed and replaced by this one.
--
-- Role guarantee by role
CREATE TABLE IF NOT EXISTS idm_role_guarantee_role (
id bytea NOT NULL,
created timestam... |
-- randexpr1.test
--
-- db eval {SELECT (t1.e)+t1.c-coalesce((select max((abs(coalesce((select case when f>=(abs(coalesce((select max(a) from t1 where 11*(t1.f)*a*t1.d=11),t1.b))/abs(t1.d))+t1.b then c when not exists(select 1 from t1 where t1.c<>b) then 13 else 11 end from t1 where (13 not in (f,t1.c,13))),b)+t1.d)/a... |
--------------------------------------------------------
-- DDL for Table SOK_SEX_TYPE_LU
--------------------------------------------------------
CREATE TABLE "SOK_SEX_TYPE_LU"
( "SEX_CODE" VARCHAR2(30 BYTE),
"SEX_NAME" VARCHAR2(30 BYTE),
"CREATED_DATE" DATE,
"CREATED_BY" VARCHAR2(80 BYTE),
"UPDATED_BY... |
// Create constraints will automatically create indexes
CREATE CONSTRAINT ON (d:Dataset)
ASSERT d.datasetName IS UNIQUE;
CREATE CONSTRAINT ON (ds:Datasource)
ASSERT ds.datasourceName IS UNIQUE;
CREATE CONSTRAINT ON (c:Category)
ASSERT c.categoryName IS UNIQUE;
// Create categories
LOAD CSV WITH HEADERS FROM "file:///c... |
# $Id$
#
# Copyright © 2008 Bruce Frederiksen
#
# 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 Software without restriction, including without limitation the rights
# to use, copy, modify, merge, pub... |
MATCH (r:Recipe)
WHERE r.id = {rid}
CREATE (i:Ingredient {
id: {id}
, created: {now}
, last_modified: {now}
, name: {name}
, amount: {amount}
, amountunit: {amountunit}
, url: {url}
})
CREATE (i)-[rel:INGREDIENT_OF]->(r)
RETURN i.id AS id
, i.name AS name
, i.amount AS amount
, i.amountun... |
-- Sakila Sample Database Schema
-- Version 1.0
-- Copyright (c) 2006, 2015, Oracle and/or its affiliates.
-- All rights reserved.
-- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-- * Redistributions of source code mu... |
/*
CREATE OR REPLACE VIEW mat_stats AS (
SELECT * FROM ((SELECT m.id, m.departement, dp.nom as nom_dept, m.description, m.classe, c.nom as nom_clas, m.nom, m.semester,
count(d.nom) as documents
FROM matieres m, documents d, departements dp, classes c
WHERE m.id = d.matiere and m.departement=dp.id and m.classe=c.id
... |
CREATE TABLE IF NOT EXISTS UserRoles (
id SERIAL NOT NULL PRIMARY KEY,
user_id INT NOT NULL,
role_id INT NOT NULL,
is_active BOOLEAN NOT NULL DEFAULT TRUE,
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
modified TIMESTAMP NOT NULL DEFAULT CURRENT... |
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='AuthorizationCode' and xtype='U')
BEGIN
CREATE TABLE AuthorizationCode (
CodeId NVARCHAR(100) PRIMARY KEY
, ApplicationId UNIQUEIDENTIFIER NOT NULL
, AccountId UNIQUEIDENTIFIER NOT NULL
, Status NVARCHAR(20) NOT NULL
, ExpiryTime ... |
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
Drop table if exists st_uao_oids_del ;
CREATE TABLE st_uao_oids_del(
text_col text,
bigint_col bigint,
char_vary_col character varying(30),
numeric_col numeric,
int_col int4,
float_col float4,
int_array_col int[],
drop_col numeric,
befor... |
-- boundary2.test
--
-- db eval {
-- SELECT * FROM t1 WHERE r=-8388608
-- }
SELECT * FROM t1 WHERE r=-8388608 |
ALTER TABLE users DROP constraint IF EXISTS warriors_email_key;
ALTER TABLE users DROP constraint IF EXISTS warriors_email_key1;
ALTER TABLE users DROP constraint IF EXISTS warriors_email_key2;
ALTER TABLE users DROP constraint IF EXISTS warriors_email_key3;
ALTER TABLE users DROP constraint IF EXISTS warriors_email_ke... |
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SU... |
-- This SQL code was generated by sklearn2sql (development version).
-- Copyright 2018
-- Model : KerasClassifier_Dense
-- Dataset : iris
-- Database : monetdb
-- This SQL code can contain one or more statements, to be executed in the order they appear in this file.
-- Model deployment code
WITH keras_input AS
... |
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 03, 2020 at 03:27 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
# --- !Ups
ALTER TABLE posting ADD COLUMN updated_by_author_id bigint;
# --- !Downs
ALTER TABLE posting DROP COLUMN updated_by_author_id;
|
CREATE TABLE `tb_kvzhyqqpam`
(
`col_lyptirnsfn` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8mb4 NOT NULL,
`col_cqxknjvdgb` blob,
`col_xavhqavxqo` set('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET latin1 NOT NULL DEFAULT 'enum_or_set_0',
`col_lmxzibarzh` mediu... |
library AbdominalLipectomyDecision version '1.0.0'
using FHIR version '4.0.0'
include FHIRHelpers version '4.0.0' called FHIRHelpers
include AbdominalLipectomy version '1.0.0' called AL
codesystem "ICD-10-CM": 'http://hl7.org/fhir/sid/icd-10-cm'
codesystem "LOINC": 'http://loinc.org'
codesystem "HCPCS": 'https://hcp... |
CREATE SEQUENCE SEQ_IACUC_PROTO_CORRESP_TEMPL INCREMENT BY 1 START WITH 1 NOCACHE
/
|
SELECT N, CASE WHEN P IS NULL THEN 'Root'
WHEN(SELECT COUNT(*) FROM BST WHERE P = A.N) > 0 THEN 'Inner'
ELSE 'Leaf'
END
FROM BST A
ORDER BY N; |
-- security_functions
DROP TABLE IF EXISTS `security_functions`;
RENAME TABLE `z_3955_security_functions` TO `security_functions`;
-- db_patches
DELETE FROM `system_patches` WHERE `issue`='POCOR-3955';
|
/*
* File: 23_urine_table.sql
* File Created: Tuesday, 12th May 2020 6:06:32 pm
* Author: Dyesse YUMBA
* Last Modified: Tuesday, 12th May 2020 6:06:55 pm
* Modified By: Dyesse YUMBA
* -----
* (c) 2020, WHO/AFRO/UCN/ESPEN
*/
/*
* Variable to rename <%v_ab_cde_fgh_4_urine%>
*/
SELECT * FROM <%v_ab_cde_fgh_4_... |
prompt --application/shared_components/user_interface/templates/region/collapsible
begin
-- Manifest
-- REGION TEMPLATE: COLLAPSIBLE
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2020.10.01'
,p_release=>'20.2.0.00.20'
,p_default_workspace_id=>2601326064169245
,p_default_application_id=>... |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 22-06-2017 a las 23:25:42
-- Versión del servidor: 5.7.14
-- Versión de PHP: 7.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... |
-- phpMyAdmin SQL Dump
-- version 3.4.10.1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 20-08-2019 a las 23:59:05
-- Versión del servidor: 5.5.20
-- Versión de PHP: 5.3.10
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... |
CREATE PROCEDURE SP240(OUT MYCOUNT INTEGER) SPECIFIC SP240_44135 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE410;SELECT COUNT(*)INTO MYCOUNT FROM TABLE25;SELECT COUNT(*)INTO MYCOUNT FROM TABLE407;SELECT COUNT(*)INTO MYCOUNT FROM ... |
CREATE OR REPLACE FUNCTION public."StringToTimeStamp"(inputText character varying(512)
, defaultToReturn TIMESTAMP default null
, defaultFormat varchar(30) default 'YYYY-MM-DD hh24:mi:ss')
RETURNS TIMESTAMP AS $$
DECLARE retVal TIMESTAMP DEFAULT NULL;
BEGIN
IF LENGTH(TRIM(inputText)) = 0 THEN
inputText := n... |
use payroll
execute p_add_time_entry @employee_id=45, @entry_date='2018-10-15 00:00:00', @hours_worked=6
execute p_add_time_entry @employee_id=27, @entry_date='2018-10-15 00:00:00', @hours_worked=6
execute p_add_time_entry @employee_id=46, @entry_date='2018-10-15 00:00:00', @hours_worked=6
execute p_add_time_entry @e... |
CREATE TABLE `schema_event_state` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`position` text NOT NULL,
`status` varchar(20) NOT NULL DEFAULT 'Pending',
`query` text NOT NULL,
`create_table_statement` text NOT NULL,
`cluster_name` varchar(255) NOT NULL,
`database_name` varchar(255) NOT NULL,
`table_name` va... |
-- Sample script to create foreign key constraints in target PostgreSQL database
ALTER TABLE ONLY dms_sample.player
ADD CONSTRAINT sport_team_fk_741577680 FOREIGN KEY (sport_team_id) REFERENCES dms_sample.sport_team(id) NOT VALID;
ALTER TABLE ONLY dms_sample.seat
ADD CONSTRAINT seat_type_fk_677577452 FOREIGN K... |
-- TODO: How do we make this work nicely on Snowflake too?
{% if target.type == 'snowflake' %}
{% set column_values = ['RED', 'BLUE', "BLUE'S"] %}
{% set cmp = 'ilike' %}
{% else %}
{% set column_values = ['red', 'blue', "blue's"] %}
{% set cmp = '=' %}
{% endif %}
select
size,
{{ dbt_utils.p... |
{{ config(
cluster_by = "_airbyte_emitted_at",
partition_by = {"field": "_airbyte_emitted_at", "data_type": "timestamp", "granularity": "day"},
unique_key = '_airbyte_ab_id',
schema = "_airbyte_test_normalization",
tags = [ "top-level-intermediate" ]
) }}
-- SQL model to parse JSON blob stored in a ... |
USE map16_sus_live_sensor_db;
CREATE TABLE 4g_flood_sensor_data_store (
app_id VARCHAR (100),
imei VARCHAR (100),
iccid VARCHAR (100),
packet_number INTEGER,
data_send_time DATETIME,
date_id TIMESTAMP,
measure FLOAT,
voltage FLOAT,
rssi VARCHAR (100),
network VARCHAR (100)
);
C... |
DROP TABLE IF EXISTS loads;
CREATE TABLE loads
(
load_id SERIAL PRIMARY KEY,
name CHARACTER VARYING(255),
loading_date timestamp with time zone,
loading_city CHARACTER VARYING(255),
loading_postcode CHARACTER VARYING(10),
unloading_date timestamp with time zone,
unloading_city CHARACTER VARYING(255),
unloading... |
-- phpMyAdmin SQL Dump
-- version 4.0.10.10
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 07-01-2016 a las 17:00:54
-- Versión del servidor: 5.1.73
-- Versión de PHP: 5.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHA... |
-- This script links each loop to the nearest hectopunten, using a datset provided by CSResearch, rws_raw.utrecht_rws_loops
-- add columns to dataset provided by CS Research for road direction and dvk_letter
alter table rws_raw.utrecht_rws_loops
add column "road_dir" varchar,
add column "dvk_or_dir" varchar,
add colu... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 05, 2019 at 06:22 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- Insert data into the table (if empty)
INSERT INTO customer
(first_name, last_name, gender, age, address, city, state, zip_code)
VALUES
('Michael', 'Meyer', 'Male', 24, '1021 Eddie Knolls Apt. 087', 'South Geraldton', 'RI', 43709),
('Cindy', 'Stephens', 'Female', 23, '838 Brown Street', 'East Christina', 'MT', 07829)... |
INSERT INTO COMTECOPSEQ ( TABLE_NAME, NEXT_ID ) VALUES ('ADBKUSER_ID', 1);
INSERT INTO COMTECOPSEQ ( TABLE_NAME, NEXT_ID ) VALUES ('ADBK_ID', 1);
INSERT INTO COMTECOPSEQ ( TABLE_NAME, NEXT_ID ) VALUES ('ADMINIST_WORD_ID', 1);
INSERT INTO COMTECOPSEQ ( TABLE_NAME, NEXT_ID ) VALUES ('ADMIN_CODE_OPERT', 1);
INSERT INTO... |
--[er]test = operator with MONETARY and time type
create class tb (
id int auto_increment primary key,
col1 MONETARY
);
insert into tb (col1) values(-32768);
insert into tb (col1) values(-10);
insert into tb (col1) values(10);
select * from tb where col1 = TO_TIME('10:30:20 AM');
drop table tb;
|
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.5
-- Dumped by pg_dump version 10.5
-- Started on 2019-08-17 20:16: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_catalo... |
-- file:inet.sql ln:63 expect:true
SELECT '' AS ten, set_masklen(inet(text(i)), 24) FROM INET_TBL
|
-- MySQL dump 10.13 Distrib 8.0.13, for Linux (x86_64)
--
-- Host: localhost Database: studentinfo
-- ------------------------------------------------------
-- Server version 8.0.13
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;... |
USE [VipunenTK_DW]
GO
/****** Object: StoredProcedure [dbo].[p_lataa_OTV_f_2_9] Script Date: 5.3.2019 12:43:37 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[p_lataa_OTV_f_2_9] AS
--Lisätty välitaulu 16.1.2015 / CSC Jarmo
--EXECUTE [VipunenTK_DW].[dbo].[p_lataa_OTV_f_2_9]
DEC... |
BEGIN TRANSACTION;
ALTER TABLE "public"."post" DROP CONSTRAINT "post_pkey";
ALTER TABLE "public"."post"
ADD CONSTRAINT "post_pkey" PRIMARY KEY ("uuid");
COMMIT TRANSACTION;
|
-- name: get-list
select title,
revealed
from items
where flag = :flag
order by revealed desc;
-- name: get_list_alt
select title,
revealed
from items
where flag = :flag
order by revealed desc;
-- name: create_item>
insert into items (
title,
revealed,
flag
) values (
:titl... |
USE friendlyforks_db;
INSERT INTO users (
type, password, firstName, lastName, thumbnail, userEmail, userLocation, userAddress, userNotes)
VALUES ('local','$2b$10$nBRGgpKbMgUqjic2TZleuugOl4VGvWJMI9L/wxhPvXBbk9eL/e.rG','John','Doe','uploads/bf34b8d5c54f7a22a14157de1f9c50df.jpg', 'john.doe@gmail.com', 'Toronto', '111 Y... |
SELECT * FROM StarWarsCharacters ORDER BY Id ASC
DECLARE @page AS INT = 1;
DECLARE @rowsPerBatch AS INT = 8;
SELECT TOP((@page + 1)*@rowsPerBatch) ROW_NUMBER() OVER (ORDER BY Id ASC) AS [RowNumber], [Id], [Name] FROM [StarWarsCharacters] ORDER BY Id ASC;
--Modeled from RepoDB's BatchQuery logic (query builder)
WITH ... |
drop table if exists users ;
drop table if exists product ;
create table users (
id int,
name varchar(20),
city varchar(20),
state char(20)
);
create table product (
id int auto_increment primary key ,
name varchar(20)
);
insert into users (id, name, city, state) values(1, ' User1', ' Carmel ', ' ... |
CREATE DATABASE IF NOT EXISTS `travel` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `travel`;
-- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86)
--
-- Host: 127.0.0.1 Database: travel
-- ------------------------------------------------------
-- Server version 5.5.41-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
-- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64)
--
-- Host: localhost Database: aja
-- ------------------------------------------------------
-- Server version 8.0.13
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... |
DROP DATABASE IF EXISTS employeeDB;
CREATE DATABASE employeeDB;
-- Create DATABASE for employee
USE employeeDB;
CREATE TABLE employees (
id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
first_name VARCHAR(30) NULL,
last_name VARCHAR(30) NULL,
role_id INT NOT NULL,
manager INT NULL
);
SELECT * from employees;
-- CREATE ... |
USE [DBA]
GO
CREATE OR ALTER PROCEDURE [dbo].[sp_DBA_StartCDCCaptureJobs]
AS
/*********************************************************************************************************
Author: Reut Almog Talmi @Madeira Data Solutions
Created Date: 2020-04-04
Description: Procedure at a manager database level that ha... |
create table schema2.test (
id int
); |
INSERT INTO tweb_apbd(`rangkuman`,`berkas_id`,`lembaga_id`, `lembaga_kode`,`pemda_kode`, `wilayah_kode`,`tahun`, `rekening_kode`,`rekening`, `uraian`, `nominal`,`nominal_sebelum`, `nominal_sesudah`, `nominal_perubahan`, `nominal_persen`, `keterangan`, `created_by`, `updated_by`) VALUES
('0','354','165','1.22','1.22','... |
DROP INDEX tokenbalance_uri;
|
prompt Create log table
--drop table, if it exists
begin
for i in (select table_name from user_tables where table_name = 'TEST_OM_TAPIGEN_LOG') loop
execute immediate 'drop table ' || i.table_name;
end loop;
end;
/
--create table
create table test_om_tapigen_log (
id integer generat... |
CREATE TABLE messages
(
id int(11) NOT NULL AUTO_INCREMENT primary key,
hashcode varchar(255),
state varchar(50),
delay datetime,
payload varchar(4000),
agent varchar(100),
consumer varchar(512),
message varchar(400... |
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: oa_sys
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... |
INSERT INTO profession (profession) VALUES ('Программист');
INSERT INTO profession (profession) VALUES ('Тракторист');
INSERT INTO profession (profession) VALUES ('Дворник');
INSERT INTO profession (profession) VALUES ('Киллер');
INSERT INTO zip_code (city, state) VALUES ('Энергодар','Запорожская');
INSERT INTO zip_co... |
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Jorge Gutiérrez Cordero
-- Create date: 2020/5/30
-- Description: Delete an element from DB1P_PropertyOwners.
-- =============================================
CREATE OR ALTER PROCEDURE dbo.SP_deletePropertyOwn... |
select c1.concept_id as concept_id,
c2.concept_name as category,
ard1.min_value as min_value,
ard1.p10_value as P10_value,
ard1.p25_value as P25_value,
ard1.median_value as median_value,
ard1.p75_value as P75_value,
ard1.p90_value as P90_value,
ard1.max_value as max_value
from @results_database_schema.ACHILLES_... |
# --- !Ups
CREATE INDEX m8_users_first_name_idx ON social.m8_users USING BTREE (lower(first_name));
CREATE TYPE advertiser_status AS ENUM ('registered', 'confirmed', 'active', 'suspended');
CREATE TYPE bill_status AS ENUM ('issued', 'canceled', 'expired', 'paid');
CREATE TYPE plan_name AS ENUM ('bronze', 'silver', 'g... |
--
-- 表的结构 `ts_appstore_document`
--
DROP TABLE IF EXISTS `ts_appstore_document`;
CREATE TABLE IF NOT EXISTS `ts_appstore_document` (
`document_id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`content` text,
`author_id` int(11) DEFAULT NULL,
`last_editor_id` int(11) DEFAULT NULL... |
use sql_circular_references
go
if object_id('BillProductAttribute', 'U') is not null
drop table BillProductAttribute
if object_id('BillProduct', 'U') is not null
drop table BillProduct
if object_id('Bill', 'U') is not null
drop table Bill
if object_id('ProductInHouseHold', 'U') is not null
drop table ProductInHous... |
select f_name, l_name
from employee
where dept = 'Sales'; |
SET MODE PostgreSQL;
CREATE TABLE IF NOT EXISTS heroes (
id int PRIMARY KEY auto_increment,
name VARCHAR,
age int,
power VARCHAR,
weakness VARCHAR,
squadId int
);
CREATE TABLE IF NOT EXISTS squads (
id int PRIMARY KEY auto_increment,
name VARCHAR,
maxSize int,
cause VARCHAR
);
|
/*
Navicat Premium Data Transfer
Source Server : MySQL
Source Server Type : MySQL
Source Server Version : 50622
Source Host : localhost
Source Database : survey
Target Server Type : MySQL
Target Server Version : 50622
File Encoding : utf-8
Date: 05/27/2015 03:14:17 AM
... |
-- $Id$
-- Multiset related regression tests
--FIXME: reenable the following five queries once
-- multisets work again
--select*from unnest(multiset[1,2,3]);
--select*from unnest(multiset[1.34,1.563,2.0]);
--select*from unnest(multiset[1.23e1, -23.e0]);
--select*from unnest(multiset[1+2,3-4,5*6,7/8,9+10*11*... |
drop table if exists MB_BATCH_DRW_DETAILS;
/*==============================================================*/
/* Table: MB_BATCH_DRW_DETAILS */
/*==============================================================*/
create table MB_BATCH_DRW_DETAILS
(
BATCH_NO varchar(50) commen... |
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type = 'IF' AND object_id = object_id('dbo.udf_ParseFilePath'))
EXEC ('CREATE FUNCTION dbo.udf_ParseFilePath() RETURNS TABLE AS RETURN SELECT Result = ''This is a stub'';' )
GO
ALTER FUNCTION dbo.udf_ParseFilePath (@FilePath nvarchar(300))
RETURNS TABLE
/*****... |
drop table if exists select_rocksdb;
create table if not exists select_rocksdb (
id int primary key,
name text
) with(storage_engine=rocksdb);
insert into select_rocksdb values (10, 'simon');
insert into select_rocksdb values (20, 'luccy');
insert into select_rocksdb values (17, 'lio');
insert into select_rock... |
create proc [dbo].[usp_process_sql_server_project_response]
@ResponseId AS UNIQUEIDENTIFIER,
@SurveyId AS UNIQUEIDENTIFIER,
@ResponseXML AS XML,
@IsSQLProject AS bit,
@IsDraftMode AS BIT,
@StatusId as int,
@IsSQLResponse AS BIT,
@FirstSaveLogonName AS VARCHAR (10)
AS BEGIN
... |
-- script that lists all records with a score >= 10 in the table second_table of the database hbtn_0c_0 in your MySQL server.
SELECT score, name FROM second_table WHERE score >= 10 ORDER BY score DESC; |
BEGIN;
DROP TABLE IF EXISTS /*_*/protected_titles_tmp;
CREATE TABLE /*_*/protected_titles_tmp (
pt_namespace int NOT NULL,
pt_title varchar(255) binary NOT NULL,
pt_user int unsigned NOT NULL,
pt_reason varbinary(767) default '',
pt_reason_id bigint unsigned NOT NULL DEFAULT 0,
pt_timestamp binary(14) NOT ... |
-- name: CreateTeamMember :one
INSERT INTO team_member (team_id, user_id, addedDate, role_code) VALUES ($1, $2, $3, $4)
RETURNING *;
-- name: GetTeamMembersForTeamID :many
SELECT * FROM team_member WHERE team_id = $1;
-- name: DeleteTeamMember :exec
DELETE FROM team_member WHERE user_id = $1 AND team_id = $2;
-- n... |
select * from user where email="null@void.com";
select * from user where id in (1,2,3,4,5,6,7,8);
insert into user (id, name) values(2, "bob");
|
/****** Object: View [dbo].[V_Pipeline_Mac_Job_Request_Detail_Report] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW dbo.V_Pipeline_Mac_Job_Request_Detail_Report
AS
SELECT ID, Description, Request_Type AS [Request Type], Requestor, Data_Package_ID AS [Data Package ID], MT_Database A... |
alter table "public"."orgs" add column "link_financials" text
null;
|
-- These cols will replace "previous_vizier_status" and "previous_vizier_status_time"
ALTER TABLE vizier_cluster_info
ADD COLUMN prev_status vizier_status;
ALTER TABLE vizier_cluster_info
ADD COLUMN prev_status_time TIMESTAMP;
ALTER TABLE vizier_cluster_info
ADD COLUMN prev_status_message TEXT;
CREATE OR REPLA... |
-- =====================
-- Drop User template
-- =====================
USE <database_name, sysname, AdventureWorks>
GO
DROP USER <user_name, sysname, user_name>
GO |
INSERT INTO dbo.Disease
([Code], [Name], [Description], [Overview])
VALUES
( N'Q1416773', N'granuloma inguinale', N'sexually transmitted bacterial disease', N''),
( N'Q1417240', N'benign neoplasm', N'disease of cellular proliferation that results in abnormal growths in the body which lack the ability to metastasize', N... |
/*
table artifact:
id SERIAL PRIMARY KEY NOT NULL,
type varchar(255) NOT NULL,
media_type varchar(255) NOT NULL,
manifest_media_type varchar(255) NOT NULL,
project_id int NOT NULL,
repository_id int NOT NULL,
repository_name varchar(255) NOT NULL,
digest varchar(255) NOT... |
select pg_sleep(0.1); -- make sure this transaction starts after the first transaction.
begin;
SET lock_timeout TO 1000;
select 'sql 3', * from t_currency where id = 1 for update;
select 'sql 3: commit';
commit;
|
/*
================================================================================
Author: Adam Catalfano
Created: 10/12/2021
Create the gender table
And populate with 'M' and 'F' initially
N.B. Since gender identity is a tricky subject,
it's fair to assume we would want to expand
the definition beyond merely the "M... |
create table t_aeev_events (
id number generated always as identity,
event_time timestamp DEFAULT current_timestamp,
aggregate_id varchar2(60)not null,
version integer not null,
typecode varchar2(30) not null,
payload blob,
primary key(aggregate_id,version)
);
create table t_aepb_publish (... |
/*
-- Flows for APEX - flow_api_pkg.pkb
--
-- (c) Copyright Oracle Corporation and / or its affiliates, 2020-2022.
--
-- Created 2020 Moritz Klein - MT AG
--
*/
create or replace package body flow_api_pkg
as
function get_dgrm_name
(
p_prcs_id in flow_processes.prcs_id%type
) return var... |
CREATE FUNCTION migrate() RETURNS void AS $$
DECLARE
next_version int ;
BEGIN
SELECT stage_three + 1 INTO next_version FROM schema_version ;
IF next_version <= 5 THEN
-- Adding Indexes to Columns that reference other tables
-- https://www.postgresql.org/message-id/20040430163539.74079.qmail@web13805.mail... |
#------------------------------------------------------------------------------
# I. Colonne pour le coût des compétences
#------------------------------------------------------------------------------
ALTER TABLE game_skill_skill
ADD cost int(11) not null DEFAULT -1 ;
#------------------------------------------... |
-- TABLE: entries
CREATE TABLE IF NOT EXISTS `bx_photos_entries` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`author` int(10) unsigned NOT NULL default '0',
`added` int(11) NOT NULL default '0',
`changed` int(11) NOT NULL default '0',
`thumb` int(11) NOT NULL default '0',
`title` varchar(255) NOT NULL,... |
print 'EDITVIEWS_FIELDS ModuleBuilder';
set nocount on;
GO
-- delete from EDITVIEWS_FIELDS where EDIT_NAME = 'ModuleBuilder.WizardView';
if not exists(select * from EDITVIEWS_FIELDS where EDIT_NAME = 'ModuleBuilder.WizardView' and DELETED = 0) begin -- then
print 'EDITVIEWS_FIELDS ModuleBuilder.WizardView... |
\set ON_ERROR_STOP 1
BEGIN;
-- Drop old indexes where they exist.
DROP INDEX IF EXISTS track_idx_medium;
DROP INDEX IF EXISTS track_idx_uniq_medium_position;
DROP INDEX IF EXISTS medium_idx_release;
DROP INDEX IF EXISTS medium_idx_uniq;
-- Drop new indexes in the case of very new slave databases
DROP INDEX IF EXISTS ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.