sql stringlengths 6 1.05M |
|---|
ALTER TABLE `skill` ADD COLUMN `flag` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
|
SELECT E.empid AS MaNv,
E.empname AS TenNv,
E.salary AS Luong,
E.sex AS GioiTing,
D.departmentname AS TenPhong
FROM Employee E
JOIN Department D ON E.DepartmentId = D.DepartmentId
SELECT *
FROM Employee
WHERE Employee.EmpName LIKE '%g'
SELECT CON... |
CREATE DATABASE [ENode]
GO
USE [ENode]
GO
CREATE TABLE [dbo].[Command] (
[Sequence] BIGINT IDENTITY (1, 1) NOT NULL,
[CommandId] NVARCHAR (36) NOT NULL,
[CreatedOn] DATETIME NOT NULL,
[AggregateRootId] NVARCHAR (36) NULL,... |
<gh_stars>1-10
delete from eg_appconfig_values where key_id in(select id from eg_appconfig where key_name='DemandReasonGlcodeMap');
INSERT INTO eg_appconfig_values ( ID, KEY_ID, EFFECTIVE_FROM, VALUE, VERSION )
VALUES (nextval('SEQ_EG_APPCONFIG_VALUES'),
(SELECT id FROM EG_APPCONFIG WHERE KEY_NAME='DemandReasonGlc... |
<reponame>delux-internal/gameservers
CREATE TABLE sm_admins (
id int(10) unsigned NOT NULL auto_increment,
authtype enum('steam','name','ip') NOT NULL,
identity varchar(65) NOT NULL,
password varchar(65),
flags varchar(30) NOT NULL,
name varchar(65) NOT NULL,
immunity int(10) unsigned NOT NULL,
PRIMARY... |
<filename>eicu_vli/analysis/sql/intake72hrs_full.sql
-- this query extracts all intake fluids from intakeoutput
With
t1 AS (
SELECT
distinct patientunitstayid
FROM
`physionet-data.eicu_crd.intakeoutput`
WHERE
intakeoutputoffset BETWEEN 36*60 AND 84*60
AND LOWER (cellpath) LIKE '%intake%'
AND... |
-- file:interval.sql ln:202 expect:true
SELECT interval '1 -2:03' minute to second
|
<filename>MySql/DML/Central-GetTier1Configuration.sql
USE Central;
DROP PROCEDURE IF EXISTS GetTier1Configuration;
DELIMITER //
CREATE PROCEDURE GetTier1Configuration
(
IN HostName VARCHAR(255),
IN ServiceName VARCHAR(255)
)
BEGIN
DECLARE Environment VARCHAR(3);
SELECT hosts.Environment into E... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.1
-- Dumped by pg_dump version 12.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;
SELECT pg_catalog.set_config('search_path', '', fal... |
<filename>R for data analysis/5/SQLQuery4.sql
SELECT * FROM Customer C
INNER JOIN Organization O
ON O.CustomerID= C.CustomerID |
insert into security_group
(security_group_id, created_on_date, last_updated_date, description, group_name)
select 10, current_timestamp, current_timestamp, 'Role for creating passcodes', 'REMOTE_PROCTOR'
where not exists (select 1 from security_group where security_group_id=10);
insert into security_group_security_pe... |
DROP DATABASE IF EXISTS test_show_tables;
CREATE DATABASE test_show_tables;
CREATE TABLE test_show_tables.A (A UInt8) ENGINE = TinyLog;
CREATE TABLE test_show_tables.B (A UInt8) ENGINE = TinyLog;
SHOW TABLES from test_show_tables;
SHOW TABLES in system where engine like '%System%' and name in ('numbers', 'one');
SE... |
select count(*) from
movie_info AS mi
join info_type AS it1 on (it1.info = 'release dates' AND it1.id = mi.info_type_id and mi.note LIKE '%internet%' AND mi.info IS NOT NULL AND (mi.info LIKE 'USA:% 199%' OR mi.info LIKE 'USA:% 200%'))
join title AS t on (t.production_year > 2000 AND t.id = mi.movie_id)
join kind_typ... |
-- Tasks
INSERT INTO tasks
(id, assignee_id, closer_id, creation_time, creator_id, description, modification_time, modifier_id, resolution, status, title, version)
VALUES
(1, 1, 1, now(), 1, 'This example contains end-to-end tests', now(), 1, 'DONE', 'CLOSED', 'Write example application', 0);
INSERT INTO tasks
(id,... |
-- Copyright 2018 <NAME>. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
SELECT
TRUNC(sample_time,'MI') minute
, sql_plan_hash_value
, COUNT(*)/60 avg_act_ses
FROM
v$active_session_history
-- dba_hist_acti... |
<gh_stars>1-10
CREATE INDEX IDX_USER_RID ON IDN_UMA_RESOURCE (RESOURCE_ID, RESOURCE_OWNER_NAME, USER_DOMAIN, CLIENT_ID)
/
|
<reponame>archzi/druid<filename>src/main/resources/tpch/q9.sql
-- database: presto; groups: tpch, big_query; tables: part,supplier,lineitem,partsupp,orders,nation
SELECT
nation,
o_year,
sum(amount) AS sum_profit
FROM (
SELECT
n_name AS natio... |
-- alter table which create using int,char,varchar,bit,bit varying,nchar,nchar varying,string to add 3 range partitions having maxvalue on nvarchar field
create table range_test(id int not null ,
test_char char(50),
test_varchar varchar(2000),
test_bit bit(16),
test_varbit bit varying(20),
test_nchar nc... |
-- @testpoint: create table和LIKE INCLUDING COMMENTS参数结合使用
DROP TABLE IF EXISTS tab_12;
CREATE TABLE tab_12
(id NUMBER(7)
CONSTRAINT tab_12_id_nn NOT NULL,
use_filename VARCHAR2(20),
filename VARCHAR2(255),
text VARCHAR2(2000)
);
insert in... |
<reponame>TuesdayHat/CD-Organizer-DB
SET MODE PostgreSQL;
CREATE TABLE IF NOT EXISTS artists (
id int PRIMARY KEY auto_increment,
name VARCHAR
);
CREATE TABLE IF NOT EXISTS cds (
id int PRIMARY KEY auto_increment,
title VARCHAR,
artistid INTEGER
);
|
<reponame>akshaytambekar17/soyosystem
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 19, 2018 at 03:46 PM
-- Server version: 5.7.21-0ubuntu0.16.04.1
-- PHP Version: 7.2.1-1+ubuntu16.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZER... |
-- DROP DATABASE Kmom05oophp;
CREATE DATABASE IF NOT EXISTS Kmom05oophp;
USE Kmom05oophp;
-- USE carb14;
SET NAMES 'utf8';
--
-- Create table for Content
--
DROP TABLE IF EXISTS Post2Category;
DROP TABLE IF EXISTS Content;
CREATE TABLE Content
(
id INT AUTO_INCREMENT PRIMARY KEY NOT NULL,
slug CHAR(80) UNIQ... |
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';
CREATE SCHEMA IF NOT EXISTS `school` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;
USE `school` ;
-- -------... |
CREATE TABLE IF NOT EXISTS `pv_feedbacks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` char(50) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`sadr_id` int(11) DEFAULT NULL,
`sadr_followup_id` int(11) DEFAULT NULL,
`pqmp_id` int(11) DEFAULT NULL,
`feedback` text,
`created` datetime DEFAULT NULL,
`m... |
<filename>services/db/init/seed/004-chat-queue.sql
insert into chat_queue (queue_id, user_handle) values
('06fad102-1a73-41ad-ba62-7bbd4be3278f','b9cdffec-ad82-4855-8cad-5315c3a06610'),
on conflict do nothing;
|
INSERT INTO `clubs` VALUES
(1,'Universitario De Deportes','2017-09-20 23:34:43','2017-09-20 23:34:43'),
(2,'<NAME>','2017-09-20 23:34:43','2017-09-20 23:34:43'),
(3,'Sporting Cristal','2017-09-20 23:34:43','2017-09-20 23:34:43');
INSERT INTO `roles` VALUES
(1,'Admin','2017-09-20 23:34:43','2017-09-20 23:34:43'),
(2,... |
insert into public.item(id,inventory__id,type,quantity) values(DEFAULT,?,?,?) returning id; |
<reponame>DimitarDKirov/Data-Bases
/*============================================================================
File: 1.1 - Optimize for Ad-hoc workload.sql
Summary: The script demonstrates how and what is the effect for turning
on the option "Optimize for Ad-hoc Workloads" on a SQL Server
instance.
... |
<filename>egov/egov-egf/src/main/resources/db/migration/main/V20160314175054__egf_budget_reappropriation_sequence_py.sql
INSERT INTO EG_SCRIPT (ID,NAME,type,SCRIPT,version) VALUES(nextval('seq_eg_script'),'egf.budget.reappropriation.sequence.generator','python',
'from org.egov.infra.validation.exception import Validati... |
<reponame>bytecraftoy/timesheets-backend
# --- !Ups
CREATE TABLE timeinput
(
timeinput_id UUID NOT NULL,
app_user_id UUID NOT NULL,
project_id UUID NOT NULL,
input_date DATE NOT NULL,
minutes INTEGER DEFAULT NULL,
description TEXT DEFAULT NULL,
timestamp_created TIMESTAMP NOT NULL,
time... |
ALTER TABLE vedtak_simulering_mottaker
ADD COLUMN opprettet_av VARCHAR(512) DEFAULT 'VL'::CHARACTER VARYING NOT NULL;
ALTER TABLE vedtak_simulering_mottaker
ADD COLUMN opprettet_tid TIMESTAMP(3) DEFAULT LOCALTIMESTAMP NOT NULL;
ALTER TABLE vedtak_simulering_mottaker
ADD COLUMN endret_av VARCHAR(512);
ALTER TABLE vedtak... |
<reponame>Shuttl-Tech/antlr_psql
-- file:jsonb.sql ln:493 expect:true
select '[{"b": "c"}, {"b": null}]'::jsonb #>> array['1','b']
|
<reponame>Shuttl-Tech/antlr_psql
-- file:tsrf.sql ln:54 expect:true
SELECT few.dataa, count(*) FROM few WHERE dataa = 'a' GROUP BY few.dataa ORDER BY 2
|
Rem $Header: bi_views.sql 2015/03/19 10:23:26 smtaylor Exp $
Rem
Rem Copyright (c) 2002, 2015, Oracle Corporation. All rights reserved.
Rem
Rem Permission is hereby granted, free of charge, to any person obtaining
Rem a copy of this software and associated documentation files (the
Rem "Software"), to deal in the So... |
SELECT *
FROM `{{internal_project_id}}.{{dataset_name}}.{{history_table_name}}`
WHERE DATE(block_timestamp) <= '{{ds}}'
UNION ALL
SELECT *
FROM `{{internal_project_id}}.{{dataset_name}}.{{table_name}}`
WHERE DATE(block_timestamp) > '{{ds}}' |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 21, 2017 at 08:37 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.6.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
select count(distinct F1.ID2) + count(distinct F2.ID2)
from Friend F1, Friend F2, Highschooler
where Highschooler.name = 'Cassandra'
and Highschooler.ID = F1.ID1
-- reach friends of friends
and F2.ID1 = F1.ID2
-- except herself
and F2.ID1 <> Highschooler.ID
and F2.ID2 <> Highschooler.ID
;
|
CREATE TABLE [dbo].[Car] (
[Id] int identity not null PRIMARY KEY,
[Name] nvarchar(255)
)
GO
CREATE TABLE [dbo].[Person] (
[Id] int identity not null,
[Name] nvarchar(255) not null,
[FavouriteCar] int,
CONSTRAINT FK_Person_FavouriteCar FOREIGN KEY (FavouriteCar) REFERENCES dbo.Car (Id)
)
GO
|
<reponame>ckamtsikis/cmssw
/* Show all the database objects */
SELECT table_name FROM user_tables ORDER BY table_name;
SELECT sequence_name FROM user_sequences ORDER BY sequence_name;
SELECT procedure_name, object_name FROM user_procedures ORDER BY procedure_name;
SELECT object_name AS FUNCTION FROM user_objects WHERE... |
<gh_stars>10-100
select db_instance_identifier, title, tags, akas
from aws.aws_rds_db_instance
where db_instance_identifier = '{{ resourceName }}'
|
SELECT (myfunc(x)).* FROM some_table;
SELECT (myfunc(x)).a, (myfunc(x)).b, (myfunc(x)).c FROM some_table;
|
-- +migrate Up
SELECT create_index('workflow_run', 'IDX_WORKFLOW_LOAD_RUNS_NUM', 'project_id, workflow_id, num');
-- +migrate Down
DROP INDEX IDX_WORKFLOW_LOAD_RUNS_NUM;
|
# SQL day3
# JOIN
-- user/addr 테이블 작성 후 join 연습
use ssac;
create table user(
user_id int primary key auto_increment,
name varchar(30) not null
);
create table addr(
addr_id int primary key auto_increment,
addr_name varchar(30) not null,
user_id int not null
);
insert into user(name)
values ("... |
<filename>src/ESFA.DC.Data.LARS.Database/Core/Tables/LARS_StandardMetaData.sql
CREATE TABLE [Core].[LARS_StandardMetaData] (
[StandardCode] INT NOT NULL,
[RoleOverview] NVARCHAR (MAX) NULL,
[JobRoles] NVARCHAR (MAX) NULL,
[Keywords] NVA... |
<reponame>zharmedia386/Progate-Course-Repo<gh_stars>0
DROP DATABASE IF EXISTS blog;
CREATE DATABASE blog CHARACTER SET utf8 COLLATE utf8_general_ci;
USE blog;
CREATE TABLE articles (
id int(11) NOT NULL AUTO_INCREMENT,
title varchar(100),
summary varchar(200),
content text,
category varchar(11),
PRIMARY KEY... |
DELETE FROM project WHERE id=?; |
DROP DATABASE IF EXISTS employeeTrackerDB;
CREATE database employeeTrackerDB;
USE employeeTrackerDB;
CREATE TABLE department (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(30) NULL,
PRIMARY KEY (id)
);
CREATE TABLE role (
id INT NOT NULL AUTO_INCREMENT,
title VARCHAR(30),
salary DECIMAL,
... |
-- showfree.sql
-- show all free space
col tbs format a15
col fid format 999999
col bid format 999999
col MEG format 99999.99
col blocks format 9999999
clear break
clear compute
break on tbs skip 1 on report
compute sum of MEG on tbs
compute sum of MEG on report
@@title80 'Show All Free Space'
--ttitle center 'All... |
<gh_stars>0
CREATE TABLE IF NOT EXISTS Department (
department_id varchar(15) PRIMARY KEY,
department_name varchar(50)
);
CREATE TABLE IF NOT EXISTS Student (
student_usn varchar(10) CHECK (student_usn ~ '^[0-9][A-Z]{2}[0-9]{2}[A-Z]{2}[0-9]{3}') PRIMARY KEY,
first_name varchar(20),
middle_name varc... |
<filename>backend/db/init/players-scores.sql
-- Creating Tables
DROP TABLE IF EXISTS players;
CREATE TABLE players
(
id serial not null
constraint players_pk
primary key,
name text
);
DROP TABLE IF EXISTS scores;
CREATE TABLE scores
(
id serial not null
constraint ta... |
<filename>Interface/src/sql/forsesk_table.sql
-- phpMyAdmin SQL Dump
-- version 4.6.6deb4
-- https://www.phpmyadmin.net/
--
-- Hostiteľ: localhost:3306
-- Čas generovania: St 11.Okt 2017, 21:20
-- Verzia serveru: 5.7.19-0ubuntu0.17.04.1
-- Verzia PHP: 5.6.11-1ubuntu3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zo... |
<gh_stars>0
CREATE PROCEDURE [dbo].[AddRandomCarOrders] @MaxOrders int
AS
BEGIN
--declare @MaxOrders int = 1500
declare @lastNumber int;
SELECT TOP 1 @lastNumber = SUBSTRING(Ord_Code, PATINDEX('%/%', Ord_Code)+1, PATINDEX('%/%', Ord_Code)) from Orders order by Ord_Id desc
IF @lastNumber is null
BEGIN
SET @lastNumb... |
-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 03, 2017 at 03:29 AM
-- Server version: 5.5.24-log
-- PHP Version: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
<filename>scripts/createTables.sql
-- Criar tabelas
USE spotper
CREATE TABLE gravadora (
cod INT NOT NULL,
nome NVARCHAR(50) NOT NULL,
homepage NVARCHAR(50),
pais NVARCHAR(50) NOT NULL,
cidade NVARCHAR(50) NOT NULL,
rua NVARCHAR(50) NOT NULL,
CONSTRAINT gravadora_PK PRIMARY KEY (cod)
) ON spotper_fg01;
CREATE... |
DROP TABLE "public"."projects_cache";
|
DROP TABLE IF EXISTS `node_countries`;
CREATE TABLE `node_countries` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
`tld` VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
`c... |
<reponame>mndnext/MNDDEV2<filename>templates/project/db/remove_db.sql
DROP DATABASE IF EXISTS mnddev; |
<reponame>AndreyQC/UN-statistic<filename>src/UNStatistic/UNStatistic.DWH.Azure/adf/Stored procedures/usp_Configuration_Seed.sql
CREATE PROCEDURE [adf].[usp_Configuration_Seed]
(
@JSON NVARCHAR(MAX)
)
AS
BEGIN
SET NOCOUNT ON;
BEGIN TRY
BEGIN TRANSACTION;
DELETE FROM [adf].[Configurati... |
<filename>ORACLE_SQL/SHARED_FUNCTIONS/22_SEC/22F003_SEC.GET_USR_NAME.sql
/* Formatted on 10/6/2014 3:09:31 AM (QP5 v5.126.903.23003) */
CREATE OR REPLACE FUNCTION SEC.GET_USR_NAME (P_USRID NUMBER)
RETURN VARCHAR2
AS
L_RESULT VARCHAR2 (200 BYTE);
BEGIN
L_RESULT := '';
SELECT USER_NAME
INTO L_RESU... |
<gh_stars>10-100
-- file:alter_generic.sql ln:364 expect:true
CREATE OPERATOR FAMILY alt_opf13 USING hash
|
-- file:rowsecurity.sql ln:1503 expect:true
INSERT INTO r1 SELECT a + 1 FROM r2 RETURNING *
|
-- file:xml.sql ln:272 expect:true
SELECT xml_is_well_formed('<pg:foo xmlns:pg="http://postgresql.org/stuff">bar</my:foo>')
|
<reponame>aws-samples/postgres-lightweight-locks-simulator<gh_stars>1-10
CREATE SCHEMA partman;
CREATE EXTENSION pg_partman WITH SCHEMA partman;
SELECT partman.create_parent( p_parent_table => 'public.orders',
p_control => 'created_at',
p_type => 'native',
p_start_partition => '2022-01-21',
p_interval=> 'daily',
... |
<reponame>MellonQ/leechcraft
CREATE TABLE mrss_thumbnails (
mrss_thumb_id BIGINT PRIMARY KEY,
mrss_id BIGINT NOT NULL,
url TEXT,
width INTEGER,
height INTEGER,
time TEXT
);
ALTER TABLE mrss_thumbnails ADD
FOREIGN KEY ( mrss_id )
REFERENCES mrss ( mrss_id )
ON DELETE CASCADE
... |
/*
Select all movies stored in the database (independent of actor).
*/
SELECT mov.mov_href,
mov.mov_title,
mov.mov_year,
mov.mov_rating,
mt.met_name
FROM movie AS mov
INNER JOIN medium_type AS mt ON mov.mov_type = mt.met_id; |
<filename>tajo-core-tests/src/test/resources/queries/TestInsertQuery/testInsertOverwriteWithTargetColumns.sql
insert overwrite into table1 (col1, col3) select l_orderkey, l_quantity from default.lineitem; |
CREATE TABLE grouper_ddl_worker
(
id VARCHAR(40) NOT NULL,
grouper VARCHAR(40) NOT NULL,
worker_uuid VARCHAR(40) NOT NULL,
heartbeat TIMESTAMP,
last_updated TIMESTAMP NOT NULL,
PRIMARY KEY (id)
);
CREATE UNIQUE INDEX grouper_ddl_worker_grp_idx ON grouper_ddl_worker (grouper);
|
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';
-- -----------------------------------------------------
-- Table `audit_event_history`
-- -------------------------------------------... |
<filename>Database/SqlServer/Petshop.sql
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Inventory](
[ItemId] [varchar](10) NOT NULL,
[Qty] [int] NOT NULL,
PRIMARY KEY CLUSTERED
(
[ItemId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, A... |
-- This file is automatically generated by LogicalPlanToSQLSuite.
SELECT exp.id, parquet_t3.id
FROM parquet_t3
LATERAL VIEW OUTER EXPLODE(arr) exp AS id
--------------------------------------------------------------------------------
SELECT `gen_attr` AS `id`, `gen_attr` AS `id` FROM (SELECT `gen_attr`, `gen_attr` FROM... |
USE [QL_DH_GH_ONLINE]
GO
---- CREATE 5 LOGIN ------
EXEC sp_addLogin 'LG_DoiTac','DoiTac'
EXEC sp_addLogin 'LG_KhachHang','KhachHang'
EXEC sp_addLogin 'LG_NhanVien','NhanVien'
EXEC sp_addLogin 'LG_TaiXe','TaiXe'
EXEC sp_addLogin 'LG_Admin','Admin'
---- CREATE USER ---------
CREATE USER userDT FOR LOGIN LG_Do... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 16, 2017 at 07:05 PM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
<filename>apex/f120/application/shared_components/security/authentications/opendoorcred.sql<gh_stars>0
prompt --application/shared_components/security/authentications/opendoorcred
begin
wwv_flow_api.create_authentication(
p_id=>wwv_flow_api.id(34574642392703810)
,p_name=>'OpenDoorCred'
,p_scheme_type=>'NATIVE_OPEN_DOO... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.4.15.10
-- https://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 17, 2017 at 04:02 PM
-- Server version: 5.5.52-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
USE master;
go
-- check if configuration property is set
SELECT name, description, value
FROM sys.configurations
WHERE name = 'external scripts enabled';
-- if value is 0, reset the configuration to enable
EXEC sp_configure 'external scripts enabled', 1;
RECONFIGURE WITH OVERRIDE;
-- Restart SQL Server Service
... |
<filename>benchmark/MLB/tables-vectorwise/MLB_1.table-renamed.sql<gh_stars>0
CREATE TABLE "MLB_1"(
"col_00" smallint NOT NULL,
"col_01" decimal(4, 3),
"col_02" decimal(4, 3),
"col_03" smallint NOT NULL,
"col_04" smallint NOT NULL,
"col_05" smallint NOT NULL,
"col_06" decimal(4, 1) NOT NULL,
"col_07" smallint NOT NULL,
... |
drop table if exists tweets;
drop table if exists users;
drop table if exists tweets_x_users;
drop table if exists scrape_histories; |
<filename>db/eapi .sql
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Feb 21, 2020 at 01:37 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:0... |
CREATE TABLE teams_users(
Teams_Users_ID SERIAL NOT NULL PRIMARY KEY,
Team_ID INT NOT NULL REFERENCES teams(Team_ID),
User_ID INT NOT NULL REFERENCES users(User_ID),
Role_ID INT NOT NULL REFERENCES team_roles(Team_Role_ID),
Status BIT DEFAULT NULL -- 0 for declined, 1 for accepted
); |
USE [master];
CREATE DATABASE [MSPetShop4]; |
create or replace function insert_taxonomies_search_view_from_taxonomies_fn()
returns trigger as $$
begin
insert into taxonomies_search_view
select
t.id as id,
t.form_id as taxono... |
<reponame>csouflis/postgres-react-text-search
CREATE DATABASE partydb;
create table users (
user_id INT,
first_name VARCHAR(50),
last_name VARCHAR(50)
);
insert into users (user_id, first_name, last_name) values (1, 'Hartwell', 'Scoates');
insert into users (user_id, first_name, last_name) values (2, 'Buck', 'Wyley... |
ALTER TABLE photos ALTER COLUMN width SET NOT NULL;
ALTER TABLE photos ALTER COLUMN height SET NOT NULL;
|
CREATE TABLE IF NOT EXISTS note
(
id INT NOT NULL AUTO_INCREMENT,
text VARCHAR NOT NULL
);
CREATE TABLE IF NOT EXISTS author
(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR NOT NULL
);
|
<filename>src/test/resources/sql/savepoint/bb635eea.sql
-- file:foreign_key.sql ln:872 expect:true
SAVEPOINT savept1
|
-- file:create_table.sql ln:498 expect:true
CREATE TEMP TABLE temp_parted (
a int
) PARTITION BY LIST (a)
|
ALTER TABLE frames ADD COLUMN tags text[];
|
<reponame>machengim/MyLib
ALTER TABLE site ADD allow_guest INTEGER NOT NULL DEFAULT 0;
CREATE TABLE IF NOT EXISTS hidden (
hidden_id INTEGER PRIMARY KEY,
path TEXT NOT NULL UNIQUE,
least_permission INTEGER NOT NULL DEFAULT 0
); |
CREATE TABLE Inventory
( BookCode CHAR(4) not null,
BranchNum DECIMAL(2,0) not null,
OnHand DECIMAL(2,0),
constraint Invent_pk
primary key(BookCode, BranchNum),
constraint InventBranch_fk
foreign key (BranchNum) references Branch(branchNum)
);
-- Insertion of forty seven Inventory rows
INSERT INTO Inv... |
version https://git-lfs.github.com/spec/v1
oid sha256:471c7a483eb12a2e85b7eedc0abe4dc1919a9bfe16cc3dd1d658d1a44c34e49c
size 170
|
<filename>EdFi.Ods.Utilities.Migration/Scripts/MsSql/02Upgrade/v24_to_v25/11 Create Constraints/50140 AssessmentContentStandard [FK].sql
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Versio... |
<reponame>Vertabelo/vertabelo-mobile-orm-demo-ios
-- Created by Vertabelo (http://vertabelo.com)
-- Last modification date: 2015-10-28 10:23:49.038
-- tables
-- Table: address
CREATE TABLE address (
id integer NOT NULL PRIMARY KEY,
city_id integer NOT NULL,
address varchar(255),
FOREIGN KEY (city... |
CREATE FUNCTION networkapi_deletetriggersbysensorid(sensorid VARCHAR(24))
RETURNS TABLE(
"ID" BIGINT,
"SensorID" VARCHAR(24),
"KeyValue" VARCHAR(32),
"LowerEdge" NUMERIC,
"UpperEdge" NUMERIC,
"FormalLanguage" TEXT,
"Type" INT
)
LANGUAGE plpgsql
AS $$
B... |
# actions_args schema
# --- !Ups
DROP TABLE IF EXISTS actions_args CASCADE;
CREATE TABLE actions_args (
id serial not null primary key,
label varchar(100) default null,
arg_value varchar(100) not null,
action_id integer not null,
foreign key (action_id) references actions (id)
);
# --- !Downs
DROP TABLE a... |
<gh_stars>1-10
--
-- Table structure for table easyrec.action
--
DROP TABLE IF EXISTS action;
CREATE TABLE action (
id int(11) unsigned NOT NULL AUTO_INCREMENT,
tenantId int(11) NOT NULL,
userId int(11) DEFAULT NULL,
sessionId varchar(50) DEFAULT NULL,
ip varchar(45) DEFAULT NULL,
itemId int(11) DEFAULT NU... |
<filename>sql/roles.sql
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50553
Source Host : localhost:3306
Source Database : tp5
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-04-21 22:23:47
*/
SET FOREIGN... |
<gh_stars>1-10
-- begin DDCUI_MESSAGE
alter table DDCUI_MESSAGE add constraint FK_DDCUI_MESSAGE_ON_SENDER foreign key (SENDER_ID) references SEC_USER(ID)^
alter table DDCUI_MESSAGE add constraint FK_DDCUI_MESSAGE_ON_RECEIVER foreign key (RECEIVER_ID) references SEC_USER(ID)^
create index IDX_DDCUI_MESSAGE_ON_SENDER on ... |
alter type audience add value 'All Ages';
alter type audience add value 'Research';
|
<gh_stars>1-10
DROP VIEW IF EXISTS finance.current_asset_selector_view;
CREATE VIEW finance.current_asset_selector_view
AS
SELECT
finance.account_scrud_view.account_id AS current_asset_id,
finance.account_scrud_view.account_name AS current_asset_name
FROM finance.account_scrud_view
WHERE account_mast... |
<filename>src/cloud/profile/schema/000019_create_org_ide_configs_tables.down.sql
DROP TABLE IF EXISTS org_ide_configs;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.