sql stringlengths 6 1.05M |
|---|
IF OBJECT_ID(N'[__EFMigrationsHistory]') IS NULL
BEGIN
CREATE TABLE [__EFMigrationsHistory] (
[MigrationId] nvarchar(150) NOT NULL,
[ProductVersion] nvarchar(32) NOT NULL,
CONSTRAINT [PK___EFMigrationsHistory] PRIMARY KEY ([MigrationId])
);
END;
GO
IF NOT EXISTS(SELECT * FROM [__EFMig... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 29, 2017 at 06:15 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
<filename>dbv-1/data/schema/tblVendorBlocking.sql
CREATE TABLE `tblVendorBlocking` (
`VendorBlockingId` int(11) NOT NULL AUTO_INCREMENT,
`AccountId` int(11) NOT NULL,
`CountryId` int(11) DEFAULT NULL,
`RateId` int(11) DEFAULT NULL,
`TrunkID` int(11) NOT NULL,
`BlockedBy` varchar(100) COLLATE utf8_unicode_ci... |
<reponame>MikAoJk/docker-kotlin-gradle-ktor-postgres
CREATE TABLE validdata
(
data VARCHAR(64) PRIMARY KEY
);
|
INSERT INTO comics (title, comic_url, description, notes, cat_url, favorite_count, progress) VALUES ('ThunderCat', 'https://en.wikipedia.org/wiki/ThunderCats_(comics)#/media/File:Thundercats_no_1.png', 'The first mini-series, Reclaiming Thundera (written by <NAME> with various artists contributing), published between 2... |
CREATE TABLE prefixes (
guild_id BIGINT NOT NULL,
prefix TEXT NOT NULL,
PRIMARY KEY (guild_id, prefix),
CONSTRAINT guild_id_foreign FOREIGN KEY (guild_id)
REFERENCES public.guild_configs (guild_id) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE CASCADE
NOT VALID
);
CREATE T... |
<filename>src/main/resources/db/auth_sqlserver/V3_20__user_remove_mobile_fields.sql<gh_stars>1-10
DECLARE @ConstraintName nvarchar(200);
SELECT @ConstraintName = Name FROM SYS.DEFAULT_CONSTRAINTS
WHERE PARENT_OBJECT_ID = OBJECT_ID('users')
AND PARENT_COLUMN_ID = (SELECT column_id FROM sys.columns
WHERE NAME = N'mo... |
TRUNCATE TABLE ptcore.exercise_type_has_exercise;
INSERT INTO ptcore.exercise_type_has_exercise (exercise_type_id, exercise_id) VALUES
(1, 6),
(1, 7),
(1, 8),
(1, 9),
(1, 10),
(1, 12),
(1, 13),
(1, 14),
(1, 16),
(1, 17),
(1, 18),
(1, 20),
(1, 21),
(1, 24),
(1, 26),
(1, 29),
(1, 32),
(1, 33),
(1, 34),
(1, 35),
(1, 37),
... |
-- AlterTable
ALTER TABLE "Users" ALTER COLUMN "avatarUrl" DROP NOT NULL;
|
START TRANSACTION;
INSERT INTO `options` (`foreign_id`, `key`, `tab_id`, `value`, `label`, `type`, `order`, `is_visible`, `style`) VALUES
(1, 'o_pending_time', 1, '30', NULL, 'int', 6, 1, NULL);
INSERT INTO `plugin_base_fields` VALUES (NULL, 'opt_o_pending_time', 'backend', 'Options / Booking pending time', 'script'... |
<reponame>Datasilk/Saber-Collector
BEGIN TRY
CREATE INDEX [IndexDownloadUrl] ON [dbo].[Downloads] ([url])
END TRY BEGIN CATCH END CATCH
GO |
CREATE DATABASE shopping_list;
\c shopping_list
CREATE TABLE items (id SERIAL PRIMARY KEY, name VARCHAR(255), quantity INTEGER );
CREATE TABLE accounts (id SERIAL PRIMARY KEY, user_name VARCHAR(255), user_email VARCHAR(255), password_digest VARCHAR(255), is_admin BOOLEAN);
\dt
|
<filename>lib/yagen-generator-lib/src/main/resources/com/github/gekoh/yagen/ddl/AuditTriggerSingleTimestampSingleOperation.vm.pl.sql
create trigger ${triggerName}
before #if(${operation} == 'I') insert #elseif (${operation} == 'U') update #else delete #end on ${liveTableName}
referencing #if( ${operation} != 'D' ) new ... |
SET FOREIGN_KEY_CHECKS=0;
DELETE FROM s_user;
DELETE FROM s_user_addresses;
DELETE FROM s_order;
INSERT INTO `s_user` (`id`, `customernumber`, `default_billing_address_id`, `default_shipping_address_id`, `salutation`, `password`, `encoder`, `email`, `active`, `accountmode`, `confirmationkey`, `paymentID`, `firstlogin`... |
<gh_stars>1-10
DROP TABLE IF EXISTS roles;
CREATE TABLE roles (
role_id VARCHAR(45) PRIMARY KEY
,role_note VARCHAR(128)
);
alter table user_roles add constraint userrole_to_role foreign key (role) references roles(role_id) on update cascade;
-- DB medic
CREATE TABLE doctype (
doctype_id INTEGER PRIMARY KEY AUTO_INC... |
INSERT INTO public.concept (concept_id, concept_name, domain_id, vocabulary_id, concept_class_id, standard_concept, concept_code, valid_start_date, valid_end_date, invalid_reason) VALUES (-9900000, 'Potential drug interactions of natural product drug interactions', 'Metadata', 'Domain', 'Domain', '', 'OMOP generated', ... |
--DROP FUNCTION IF EXISTS sortByChineseAndEnglish;
CREATE FUNCTION `sortByChineseAndEnglish`(P_NAME VARCHAR(255)) RETURNS VARCHAR(255) CHARSET utf8mb4 DETERMINISTIC BEGIN
DECLARE
V_RETURN VARCHAR(255); DECLARE V_BOOL INT DEFAULT 0; DECLARE FIRST_VARCHAR VARCHAR(1);
SET
FIRST_VARCHAR = LEFT(CONV... |
<reponame>AnthonyMolinaro/ETL-LambdaBuilder
{Source_to_Source}
SELECT DISTINCT SOURCE_CODE, TARGET_CONCEPT_ID
FROM CTE_VOCAB_MAP
WHERE lower(SOURCE_VOCABULARY_ID) IN ('revenue code')
AND lower(TARGET_VOCABULARY_ID) IN ('revenue code')
|
<filename>ddl/000022_drop_parade.up.sql
BEGIN;
DROP FUNCTION IF EXISTS delete_tasks;
DROP TYPE IF EXISTS tasks_recurse_value;
DROP FUNCTION IF EXISTS remove_task_dependencies;
DROP FUNCTION IF EXISTS return_task;
DROP FUNCTION IF EXISTS no_more_tries;
DROP FUNCTION IF EXISTS extend_task_deadline;
DROP FUNCTION IF EXIS... |
-- Name: UpdateEquivalenceClassProcessingStatus
-- Schema: posda_files
-- Columns: []
-- Args: ['processing_status', 'image_equivalence_class_id']
-- Tags: ['consistency', 'find_series', 'equivalence_classes', 'NotInteractive']
-- Description: For building series equivalence classes
update image_equivalence_class
set ... |
<reponame>rage/secret-project-331
-- Add down migration script here
ALTER TABLE exercise_tasks DROP COLUMN model_solution_spec;
|
<gh_stars>0
-- Convert schema '/home/melmoth/amw/AmuseWikiFarm/dbicdh/_source/deploy/41/001-auto.yml' to '/home/melmoth/amw/AmuseWikiFarm/dbicdh/_source/deploy/42/001-auto.yml':;
;
BEGIN;
;
ALTER TABLE site_link ADD COLUMN menu varchar(32) NOT NULL DEFAULT 'specials';
;
COMMIT;
|
<gh_stars>1-10
drop if exists t;
CREATE TABLE t(a INT, b VARCHAR , c VARCHAR);
INSERT INTO t VALUES(1, '1', '1');
INSERT INTO t VALUES(2, '2', '2');
INSERT INTO t VALUES(3, '3', '3');
INSERT INTO t VALUES(4, 'null', 'NULL');
select if(benchmark(10,sum(a))>0, 'OK', 'NOK') from t;
select if(benchmark(10,avg(a))>0, 'OK', ... |
<gh_stars>1-10
--marginal values of timestampltz/datetimeltz type
--1. marginal values: timestampltz argument
select dayofyear(timestampltz'00:00:00 01/01');
select dayofyear(timestampltz'03:14:07 1/19/2038');
select dayofyear(timestampltz'0:0:0 PM 1970-01-01');
select dayofyear(timestampltz'1/19/2038 03:14:07 pm')... |
--TEST: [Analytic Functions] ROWNUM result is not correct when used with ROW_NUMBER() function
drop table if exists z1;
create table z1 (a int, b int);
insert into z1 values (1,1);
insert into z1 values (1,2);
--rownum with columns
select rownum, a,b from z1;
--test: rownum with analytic functions
select rownum, a,... |
<filename>openGaussBase/testcase/KEYWORDS/Comment/Opengauss_Function_Keyword_Comment_Case0031.sql
-- @testpoint:opengauss关键字comment(非保留),作为字段数据类型(合理报错)
--前置条件
drop table if exists comment_test cascade;
--关键字不带引号-合理报错
create table comment_test(id int,name comment);
--关键字带双引号-合理报错
create table comment_test(id int,nam... |
SELECT * FROM employee_trackerdb.employee;
INSERT INTO employee (first_name, last_name, role_id) VALUES ("Jack", "Johnson", "1");
INSERT INTO employee (first_name, last_name, role_id) VALUES ("Sally", "Smith", "2");
INSERT INTO employee (first_name, last_name, role_id) VALUES ("Bobby", "Lee", "3");
INSERT INTO employe... |
DROP TABLE devices;
|
<gh_stars>0
-- migrate:up
CREATE TABLE specialisms_students(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
student_id INT,
specialism_id INT,
FOREIGN KEY(student_id) REFERENCES students ( id ) ON DELETE CASCADE,
FOREIGN KEY(specialism_id) REFERENCES specialisms ( id ) ON DELETE CASCADE
);
-- migrate:down
DROP ... |
\unset ECHO
\i test/setup.sql
SELECT plan(884);
--SELECT * FROM no_plan();
-- This will be rolled back. :-)
SET client_min_messages = warning;
CREATE TABLE public.sometab(
id INT NOT NULL PRIMARY KEY,
name TEXT DEFAULT '',
numb NUMERIC(10, 2),
"myInt" NUMERIC(8)
);
-- Create a partition.
C... |
<gh_stars>0
-- Database: nertz_core
-- DROP DATABASE "nertz_core";
CREATE DATABASE nertz_core
WITH OWNER = postgres
ENCODING = 'UTF8'
TABLESPACE = pg_default
LC_COLLATE = 'en_US.UTF-8'
LC_CTYPE = 'en_US.UTF-8'
CONNECTION LIMIT = -1;
COMMENT ON DATABASE nertz_core
IS 'This is th... |
CREATE DEFINER=`root`@`localhost` PROCEDURE `prc_getDisputes`(IN `p_CompanyID` INT, IN `p_InvoiceType` INT, IN `p_AccountID` INT, IN `p_InvoiceNumber` VARCHAR(100), IN `p_Status` INT, IN `p_StartDate` DATETIME, IN `p_EndDate` DATETIME, IN `p_PageNumber` INT, IN `p_RowspPage` INT, IN `p_lSortCol` VARCHAR(50), IN `p_Sort... |
SELECT * FROM Cidades c INNER JOIN Prefeitos p ON c.id = p.cidade_id
-- "INNER JOIN" retorna somente as linhas que estão relacionadas entre as 2 tabelas
SELECT * FROM Cidades c LEFT JOIN Prefeitos p ON c.id = p.cidade_id
-- "LEFT JOIN" retorna todas as linhas da tabela À ESQUERDA, independentemente se elas est... |
<gh_stars>0
CREATE TEMP TABLE c (
customer_id int,
username text NOT NULL,
password text NOT NULL,
PRIMARY KEY (customer_id)
);
COPY c FROM '/home/zhuzilin/Documents/w4111/project1/origin_data/user_new.csv' DELIMITERS ',' CSV HEADER;
UPDATE customer
SET username = c.username
FROM c
WHERE c.c... |
<filename>DatabaseProject/DatabaseProject/dbo/Tables/Movie_Category.sql
CREATE TABLE [dbo].[Movie_Category] (
[MovieId] INT NOT NULL,
[CategoryId] INT NOT NULL,
CONSTRAINT [PK_Movie_Category_1] PRIMARY KEY CLUSTERED ([MovieId] ASC, [CategoryId] ASC),
CONSTRAINT [FK_Movie_Category_Category] FOREIGN K... |
<gh_stars>0
CREATE DATABASE IF NOT EXISTS sui;
USE sui;
CREATE TABLE IF NOT EXISTS users (
id INT NOT NULL AUTO_INCREMENT,
registered_by NVARCHAR(255) NOT NULL,
paycheck_name NVARCHAR(255) NOT NULL,
... |
/*
CONSULTA MULTITABLA:
Son consultas que sirven para consultar varias tablas en una sola sentencia
*/
#Mostrar los entradas con el nombre del autor y el nombre de la categoria#
SELECT p.id, p.titulo, u.nombre AS 'Autor', c.nombre AS 'Categoria'
FROM posts p, users u, categories c
WHERE p.user_id = u.id AND p.cate... |
<filename>experiments/confiscations/insert_into_consignment.sql<gh_stars>1-10
INSERT INTO consignment VALUES
(1,"d57c70a0-1d3a-11e9-b6bb-bbf6628ee45f",21933,"1",21914,"1",NULL,"19","D.R.","1771-01-04","Lubert, veuve","veuve",NULL,"Rouen",NULL,"Barrois, jeune",NULL,1,NULL,"Possibly Lubers or Luber. Orders: return to boo... |
<gh_stars>1-10
USE Gringotts
SELECT COUNT(*)
FROM WizzardDeposits |
<filename>buildmimic/postgres/postgres_create_tables_pg10.sql
-- -------------------------------------------------------------------------------
--
-- Create the MIMIC-III tables
--
-- -------------------------------------------------------------------------------
------------------------------------------------------... |
-- 2021-02-01T13:43:48.691Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (1000000,1... |
-- 2017-11-20T19:20:25.953
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,540376,'',TO_TIMESTAMP('2017-11-20 19:20:25','YYYY-MM-DD HH24:MI:SS'),100,'D','Y... |
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/current_mysql/5.0/constraints/KC_FK_COMM_SCHEDULE_MINUTES_FK4.sql
DELIMITER /
-- remove the constraint, so this table can be shared by irb & iacuc
ALTER TABLE COMM_SCHEDULE_MINUTES
drop FOREIGN KEY FK_COMM_SCHEDULE_MINUTES_FK4
/
DELIMITER ;
|
<reponame>pir8aye/conduit
SELECT * FROM
"conduit_db"."TEAMS"; |
-- Boilerplate IEM schema_manager_version, the version gets incremented each
-- time we make an upgrade script
CREATE TABLE iem_schema_manager_version(
version int,
updated timestamptz);
INSERT into iem_schema_manager_version values (-1, now());
-- Storage of Tower Metadata
CREATE TABLE towers(
id smallint UNIQUE ... |
<gh_stars>0
insert into markets (id,
base_token_symbol, base_token_name, base_token_decimals,
quote_token_symbol, quote_token_name, quote_token_decimals,
min_order_size, price_decimals, amount_decimals,
maker_fee_rate, taker_fee_rate, i... |
CREATE DATABASE rokku_scanner CHARACTER SET utf8 COLLATE utf8_general_ci;
USE rokku_scanner;
CREATE TABLE scan_results(
id bigint NOT NULL PRIMARY KEY AUTO_INCREMENT,
object VARCHAR(512) NOT NULL,
username VARCHAR(512) NOT NULL,
result VARCHAR(20) NOT NULL,
moved_to VARCHAR(512) NOT NULL,
etag... |
with customers as (
select * from {{var('customers_table')}}
),
orders as (
select * from {{ref('orders_xf')}}
where order_seq_number = 1
),
joined as (
{% set days =
var('days')
%}
select
customers.*,
orders.first_order_date,
orders.first_comp... |
-- $Id$
-- Test casts between string types
--
-- test basic integer conversions
--
values cast('1' as smallint);
values cast('1' as integer);
values cast('1' as bigint);
values cast('-1' as smallint);
values cast('-1' as integer);
values cast('-1' as bigint);
values cast('0' as smallint);
values cast('0' as integer)... |
<reponame>DikangGu/hive<filename>metastore/scripts/upgrade/derby/upgrade-0.9.0-to-0.10.0.derby.sql
-- Upgrade MetaStore schema from 0.9.0 to 0.10.0
RUN '010-HIVE-2612.derby.sql';
|
<filename>src/main/resources/database-setup/patches/MARCCAT_DB/1.4/install-patch.sql
\echo - MARCCAT DB
\echo - Ver. 1.4
\echo - @Cult s.r.l.
\echo - Date: 06/05/2020
\echo - PostgreSQL compatibility: 9.6+
\echo
\echo MARCCAT DB 1.4 - Start -------------------------------------------------------------
\echo
\ir UXPROD-... |
<reponame>scrappyCoco/Painless-Transaact-SQL<filename>painless-transact-sql/testData/codeInsight/inspection/columnList/target/select.sql
DECLARE @target TABLE
(
Id INT NOT NULL
PRIMARY KEY,
Name VARCHAR(100)
);
DECLARE @s... |
<reponame>GEDS1990/szyoa
-------------------------------------------------------------------------------
-- plm project
-------------------------------------------------------------------------------
CREATE TABLE PLM_PROJECT(
ID BIGINT NOT NULL,
CODE VARCHAR(50),
NAME VARCHAR(200),
LOGO VARCHAR(200),
SUM... |
CREATE TYPE [dbo].[AccountNumber] FROM [nvarchar](15) NULL
GO
|
<filename>migrations/20150319224701_dumped_migration_94/up.sql
DROP INDEX index_crates_name;
CREATE UNIQUE INDEX index_crates_name ON crates (canon_crate_name(name)); |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 23, 2020 at 10:32 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 @OLD_CHARACTER_SET_CLIEN... |
<filename>sql/heist.sql<gh_stars>0
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.5.64-MariaDB)
# Database: heist
# Generation Time: 2019-10-11 13:33:50 +0000
# ******... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.127.12
-- Creato il: Lug 16, 2020 alle 03:48
-- Versione del server: 10.5.4-MariaDB
-- Versione PHP: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 26, 2020 at 08:46 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<filename>docs/sqlfiles/08 MovieCrew.sql
USE [MovieShop]
GO
INSERT INTO [MovieCrew] ([MovieId], [CrewId], [Department], [Job]) VALUES (1, 1, 'Production', 'Producer')
INSERT INTO [MovieCrew] ([MovieId], [CrewId], [Department], [Job]) VALUES (1, 2, 'Production', 'Producer')
INSERT INTO [MovieCrew] ([MovieId], [CrewId], ... |
<reponame>fahmiffa/air-project<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 05, 2021 at 02:03 AM
-- Server version: 5.7.24
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET ti... |
<filename>06. Database Basics - MS SQL/17. Additional Exercises/08. Peaks and Mountains.sql
SELECT
p.PeakName AS [PeakName],
m.MountainRange AS [Mountain],
p.Elevation AS [Elevation]
FROM Peaks AS p
JOIN Mountains AS m
ON p.MountainId = m.Id
ORDER BY Elevation DESC, PeakName ASC |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 13-11-2021 a las 06:13:50
-- Versión del servidor: 10.4.21-MariaDB
-- Versión de PHP: 8.0.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
UPDATE dbo.DataSet SET Stub = 'Usage' WHERE Id = 1
UPDATE dbo.DataSet SET Stub = 'Crimes' WHERE Id = 2
UPDATE dbo.DataSet SET Stub = 'PrisonPopulation' WHERE Id = 3
UPDATE dbo.DataSet SET Stub = 'Worried' WHERE Id = 4
UPDATE dbo.DataSet SET Stub = 'Traffic' WHERE Id = 5
UPDATE dbo.DataSet SET Stub = 'Collisions' WHERE ... |
<reponame>postgresqlacademy/pwaf
--
DO
$body$
BEGIN
IF NOT pwaf.build_utils_check_view_exists('pwaf', 'v_applications') THEN
CREATE OR REPLACE VIEW pwaf.v_applications AS
SELECT DISTINCT n.nspname as name,
(SELECT r2.path FROM pwaf.http_request_routes r2, pg_class c2, pg_namespace n2 WHERE r2.tableoid = c2.... |
drop table observation_attributes cascade;
drop table simplified_lateness_observations cascade;
begin;
-- These are similar to the datamining table which is
-- created as an output of the datamining query
-- found in the postprocessing directory.
-- It basically contains lateness observations along
-- with their attr... |
select work.name,
work_type.name
from work
inner join (
select max(length(work.name)) as max_length,
work.type as type
from work
group by work.type
) as newtable on newtable.max_length = length(work.name)
and work.type = newtable.type
inner join work_type on work.... |
<filename>cmd/migrations/000027_addition_transactions.up.sql
CREATE TABLE "addition_transactions"
(
id SERIAL PRIMARY KEY NOT NULL,
ref_id TEXT NOT NULL,
txhash TEXT NOT NULL,
data bytea,
nonce INT NOT NULL,
value TEXT ... |
Create table If Not Exists Relations (user_id int, follower_id int);
Truncate table Relations;
insert into Relations (user_id, follower_id) values ('1', '3');
insert into Relations (user_id, follower_id) values ('2', '3');
insert into Relations (user_id, follower_id) values ('7', '3');
insert into Relations (user_id, f... |
<filename>db_create_tables.sql
-- MariaDB dump 10.19 Distrib 10.6.3-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: vanus_enlightenment
-- ------------------------------------------------------
-- Server version 10.6.3-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 S... |
<filename>core/store/migrate/migrations/0048_add_ocr_bootstrap_node_to_feeds_manager.sql
-- +goose Up
ALTER TABLE feeds_managers
ADD COLUMN is_ocr_bootstrap_peer boolean NOT NULL DEFAULT false;
-- +goose Down
ALTER TABLE feeds_managers
DROP COLUMN is_ocr_bootstrap_peer;
|
<reponame>madeso/hopper<filename>devel/tools/init_input_actions_with_names.sql
insert into input values ( 0, 0, "Escape", 'false', 1, 0, 0, 1, 0, 'false', 0 ); -- Esc : released key 1
insert into input values ( 0, 1, "Pause" , 1, 0, 0, 197, 0, 'false', 0 ); -- pause : released key pause
insert into input values ( 0, ... |
ALTER TABLE login_history MODIFY login_agent VARCHAR(256) NOT NULL;
ALTER TABLE access_log MODIFY user_agent VARCHAR(256) NOT NULL;
|
<gh_stars>0
SELECT fn_db_change_column_type('gluster_georep_config', 'config_value', 'varchar', 'text'); |
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE general_params ( "name" text, "value" text );
INSERT INTO "general_params" VALUES('list_report_data_table','V_Organism_List_Report');
INSERT INTO "general_params" VALUES('list_report_data_sort_dir','DESC');
INSERT INTO "general_params" VALUES('detail_report... |
insert into team values(1, now(), "India"), (2, now(), "Australia"), (3, now(), "Pakistan"), (4, now(), "South africa");
insert into player values(1, now(),0, "<NAME>",1), (2, now(),0, "<NAME>", 1), (3, now(),0, "<NAME>",1), (4, now(),0, "<NAME>",1), (5, now(),0,"<NAME>",1), (6, now(),0, "<NAME>",2), (7, now(),0, "<N... |
/* Intel */
/* https://cloud.google.com/compute/docs/cpu-platforms#intel_cpu_processors */
/* Intel Xeon E5 (Sandy Bridge) */
UPDATE instances SET cpuBaseClock = '2.6', cpuTurboClock = '3.2', cpuSingleMaxTurboClock = '3.6' WHERE availableCpuPlatform LIKE "%Sandy%" AND series LIKE "n1";
/* Intel Xeon E5 v2 (Ivy Brid... |
INSERT INTO role (role_name) VALUES ('admin');
INSERT INTO role (role_name) VALUES ('user');
INSERT INTO rules (rule_name) VALUES ('write');
INSERT INTO rules (rule_name) VALUES ('read');
INSERT INTO role_to_rules (role_id, rule_id) VALUES ('1', '1');
INSERT INTO role_to_rules (role_id, rule_id) VALUES ('1', '2');... |
CREATE TABLE CHANGE_VERSION (
CHANGE_VERSION_ID NUMBER NOT NULL,
VERSION NUMBER NOT NULL,
TOPIC VARCHAR(255) NOT NULL
);
ALTER TABLE CHANGE_VERSION ADD CONSTRAINT CHANGE_VERSION_PK PRIMARY KEY (CHANGE_VERSION_ID);
CREATE UNIQUE INDEX UNIQUE_CHANGE_VERSION ON CHANGE_VERSION (TOPIC);
|
BEGIN;
ALTER TABLE operations DROP COLUMN reschedule;
ALTER TABLE operations DROP COLUMN deletion_scheduled;
COMMIT; |
//// CHANGE name=change0
CREATE MEMORY TABLE TABLE200(ID INTEGER NOT NULL PRIMARY KEY,FIELD1 VARCHAR(30),USERTYPE8FIELD USERTYPE8,USERTYPE5FIELD USERTYPE5,USERTYPE9FIELD USERTYPE9)
GO
|
<gh_stars>0
/*
add_whsmith.sql is a MySQL script intended to add
<NAME> as "Other Sites" options.
Version: $Revision$
Date: $Date$
(C) COPYRIGHT 2016 Ahasuerus
ALL RIGHTS RESERVED
The copyright notice above does not evidence any actual or
intended publication of such source co... |
/*
SQLyog Community v12.2.1 (64 bit)
MySQL - 10.4.11-MariaDB : Database - laravel7
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIG... |
<filename>servico/src/main/resources/db/migration/V0.1.0_005__ddl-tipo-baixa.sql
CREATE TABLE TIPO_BAIXA (
ID BIGINT Not Null,
UID UUID Not Null,
VERSION INTEGER Not Null,
NOME CHARACTER VARYING(30),
CO... |
<filename>ClimateChangeAnalysis/sql/Scripts/Transportation_Percent_View.sql
-- View: public.cities_transportation_percent
-- DROP VIEW public.cities_transportation_percent;
CREATE OR REPLACE VIEW public.cities_transportation_percent
AS
SELECT c.account_number AS city_id,
2018 AS year,
taxis.taxis,
rail.rail,
buses... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: 11. Apr, 2019 18:15 PM
-- Tjener-versjon: 5.7.25-0ubuntu0.18.04.2
-- PHP Version: 7.2.15-0ubuntu0.18.04.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = ... |
Delimiter $$
CREATE procedure `new`()
BEGIN
declare ide int default 0;
declare count int default 0;
declare n varchar(100);
declare i int;
declare var varchar(100);
declare stat3 varchar(100);
declare c1 cursor for select id,country_name from country;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET ide = 1;
open c1;
mainL... |
DROP DATABASE technologydivision_test;
DROP DATABASE technologydivision; |
<gh_stars>10-100
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50535
Source Host : localhost:3306
Source Database : lv
Target Server Type : MYSQL
Target Server Version : 50535
File Encoding : 65001
Date: 2015-01-30 20:59:55
*/
SET FOREIGN_KEY_CHE... |
DECLARE @logit_model VARBINARY(MAX) =
(SELECT TOP 1 [Model]
FROM [dbo].[NYCTaxiModel]
WHERE [IsRealTimeScoring] = 1
ORDER BY [CreatedOn] DESC);
EXEC dbo.sp_rxPredict
@model = @logit_model,
@inputData = N'SELECT
2 AS passenger_count,
10 AS trip_distance,
1950 AS trip_time_in_se... |
<filename>src/test/resources/sql/select/a1ffb244.sql
-- file:timestamptz.sql ln:297 expect:true
SELECT make_timestamptz(1973, 07, 15, 08, 15, 55.33, '2')
|
drop table departments;
CREATE TABLE departments(
dept_no VARCHAR(255) not NULL,
dept_name VARCHAR(255) not null
);
drop table dept_emp;
CREATE TABLE dept_emp(
emp_no INT not NULL,
dept_no VARCHAR(255) not NULL,
from_date VARCHAR(255) not null,
to_date VARCHAR(255) not null
);
drop table dept_manager;
CREA... |
create database if not exists redis_manager_new;
use redis_manager_new;
|
<gh_stars>0
CREATE TABLE `est_db`.`USER` (
`ID` INT NOT NULL AUTO_INCREMENT,
`EMAIL` VARCHAR(45) NOT NULL,
`USERNAME` VARCHAR(45) NOT NULL,
`PHONE` VARCHAR(50) NOT NULL,
`NAME` VARCHAR(100) NOT NULL,
`SURNAME` VARCHAR(100) NOT NULL,
`SINCE` DATETIME NOT NULL,
`LAST_UPDATED` DATETIME NOT NULL,
`ACTIVE`... |
<reponame>gbiffrance/ala-install
INSERT INTO log_source_type (id, name) VALUES
(0, "ALA"),
(1, "OZCAM"),
(2, "AVH"),
(3, "OBIS"),
(4, "ASBP"),
(5, "AMRIN"),
(6, "BVP"),
(7, "TEPAPA"),
(2001, "ALA4R"),
(2002, "BCCVL"),
(10000, "Spatial Portal"),
(10001, "List Tool");
|
<reponame>jatanpatel92/Airline-Reservation-System
use ARS;
INSERT INTO flight_instance (FLIGHT_NUMBER, FLIGHT_DATE, no_avl_seats, AIRPLANE_ID, D_TIME, A_TIME) VALUES
(162, '2015-05-31', 10, 1929, '17:35:00', '20:27:00'),
(199, '2015-05-31', 8, 2010, '07:52:00', '10:36:00'),
(281, '2015-05-31', 16, 3964, '06:04:00', '0... |
DROP TABLE ACTIVITY_DERIVED IF EXISTS;
-- Changes to this view should be mirrored in data-access\...\import.sql and scout-api\api\...\migrations.xml -->
CREATE VIEW ACTIVITY_DERIVED AS
SELECT
A.ID ACTIVITY_ID,
SUM(CAST(AUR.FAVOURITE AS INT)) FAVOURITES_COUNT,
SUM(AUR.RATING) ... |
<reponame>mitring/cuba
create table SYS_REFRESH_TOKEN (
ID uniqueidentifier not null,
CREATE_TS datetime,
--
TOKEN_VALUE varchar(255),
TOKEN_BYTES image,
AUTHENTICATION_BYTES image,
EXPIRY datetime,
USER_LOGIN varchar(50),
--
primary key (ID)
)^ |
<gh_stars>1000+
DROP EXTENSION IF EXISTS pg_stat_statements;
|
<gh_stars>0
--
-- update-sequences.sql
--
-- Version: $Revision$
--
-- Date: $Date$
--
-- Copyright (c) 2002-2009, The DSpace Foundation. All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are
-- met:
-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.