sql stringlengths 6 1.05M |
|---|
USE DISASTERS
GO
-- Cannot create index on Varchar(Max) Columns
CREATE TABLE SomeTable (
Max_Varchar_Column VARCHAR(MAX) NULL,
Max_Nvarchar_Column NVARCHAR(MAX) NULL,
Varchar_Column VARCHAR(25) NULL
)
GO
INSERT INTO SomeTable VALUES ('Value1', N'Value1', 'Value1')
INSERT INTO SomeTable VALUES ('Value2', N'Val... |
<reponame>AhmadJaber/postgresql-bootcamp-references<filename>assets/sample_data/movies_revenues.sql
-- ---------------------------------------------------------
-- Records of 'movies' database > table : movies_revenues
-- ---------------------------------------------------------
INSERT INTO movies_revenues (revenue_id... |
<filename>resources/sql/employee.sql
INSERT INTO employees (emp_no, emp_fname, emp_lname, emp_oname, emp_email)
VALUES
(000001, 'John', 'Denver','Alexander', '<EMAIL>');
INSERT INTO employees (emp_no, emp_fname, emp_lname, emp_oname, emp_email)
VALUES
(000002, 'Joseph', 'Demore','David', '<EMAIL>');
|
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 23, 2020 at 04:51 PM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
<gh_stars>1-10
INSERT INTO webhooks (id, userid, subdomain, blob) VALUES (:id, :userid, :subdomain, :blob);
|
INSERT INTO test_sfti VALUES ('(1772,1782,3343,3353,1)');
INSERT INTO test_sfti VALUES ('(1892,1902,3713,3723,1)');
INSERT INTO test_sfti VALUES ('(256,266,2710,2720,1)');
INSERT INTO test_sfti VALUES ('(1926,1936,2757,2767,1)');
INSERT INTO test_sfti VALUES ('(536,546,3328,3338,1)');
INSERT INTO test_sfti VALUES ('(59... |
<gh_stars>1-10
CREATE DATABASE Movies;
USE Movies;
CREATE TABLE directories(
id INT(11) PRIMARY KEY AUTO_INCREMENT NOT NULL,
director_name VARCHAR(50) NOT NULL,
notes TEXT
);
CREATE TABLE genres(
id INT(11) PRIMARY KEY AUTO_INCREMENT NOT NULL,
genre_name VARCHAR(50) NOT NULL,
notes TEXT
);
CREATE TABLE ... |
<filename>services/v2/db/upgrades/0.40.sql
ALTER TABLE games ADD ipad_two_x TINYINT(1) NOT NULL DEFAULT 0 AFTER preload_media;
|
<reponame>Press-One/atom
ALTER TABLE transactions ADD COLUMN status VARCHAR NOT NULL DEFAULT 'SUBMITTED';
|
CREATE TABLE [Tzdb].[VersionInfo]
(
[Version] CHAR(5) NOT NULL,
[Loaded] DATETIMEOFFSET(0) NOT NULL,
CONSTRAINT [PK_VersionInfo] PRIMARY KEY ([Version])
)
|
<reponame>InsightPro/Transport<filename>transport.sql
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 02, 2021 at 06:51 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRA... |
CREATE TABLE MAVEN_ARTIFACT
(
GROUP_ID varchar(256) NOT NULL,
ARTIFACT_ID varchar(256) NOT NULL,
VERSION varchar(256) NOT NULL,
TYPE varchar(10) NOT NULL,
ID integer AUTO_INCREMENT PRIMARY KEY NOT NULL
);
CREATE INDEX IDX_MAVEN_ARTIFACT on MAVEN_ARTIFACT (GROUP_ID, ARTIFACT_ID, VERSION, TYPE);
CREATE TABLE ... |
<gh_stars>10-100
-- file:portals_p2.sql ln:94 expect:true
CLOSE foo24
|
-- +migrate Up
CREATE TYPE user_scope AS ENUM (
'app',
'cms'
);
-- +migrate Down
DROP TYPE IF EXISTS user_scope;
|
<filename>sql/sakila-db-test.sql
select *
from nicer_but_slower_film_list fl
where 1 = 1
and fl.rating = 'PG'
order by fl.category;
select * from actor
order by last_name;
select actor.first_name, actor.last_name, film.title
from actor
inner join film_actor
on actor.actor_id = film_actor.actor_id
inner join fil... |
--
-- Table structure for table `lzlanvpc_environment`
--
DROP TABLE IF EXISTS `lzlanvpc_environment`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `lzlanvpc_environment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`lzlanvpcId` int(11) NOT NUL... |
<gh_stars>10-100
BEGIN;
ALTER TABLE events ADD COLUMN tx_id UUID;
COMMIT;
|
<reponame>corner4world/MaxKey
source /docker-entrypoint-initdb.d/maxkey_v3.0.0.GA.sql ;
source /docker-entrypoint-initdb.d/maxkey_v3.0.0.GA_data.sql ;
|
<reponame>connormcd/misc-scripts<gh_stars>10-100
-------------------------------------------------------------------------------
--
-- PLEASE NOTE
--
-- No warranty, no liability, no support.
--
-- This script is 100% at your own risk to use.
--
-------------------------------------------------------------------------... |
DROP TABLE IF EXISTS `cards`;
CREATE TABLE `cards` (
`uid` VARCHAR(24) NOT NULL,
`title` VARCHAR(64) NULL DEFAULT NULL,
PRIMARY KEY (`uid`)
);
DROP TABLE IF EXISTS `links`;
CREATE TABLE `links` (
`parent` VARCHAR(24) NOT NULL,
`child` VARCHAR(24) NOT NULL,
PRIMARY KEY (`parent`, `child`)
);
|
<reponame>sethbs/SQL-Server-First-Responder-Kit
IF OBJECT_ID('dbo.sp_Blitz') IS NULL
EXEC ('CREATE PROCEDURE dbo.sp_Blitz AS RETURN 0;');
GO
ALTER PROCEDURE [dbo].[sp_Blitz]
@Help TINYINT = 0 ,
@CheckUserDatabaseObjects TINYINT = 1 ,
@CheckProcedureCache TINYINT = 0 ,
@OutputType VARCHAR(20) ... |
<filename>DB/billing_sysdb.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Aug 06, 2021 at 03:17 PM
-- Server version: 5.7.31
-- PHP Version: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 ... |
<reponame>sinotopia/sinotopia
--
-- Copyright 2010-2016 the original author or authors.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licen... |
-- INSERTS
INSERT INTO director(nombre_director) VALUES('<NAME>');
INSERT INTO director(nombre_director) VALUES('<NAME>');
INSERT INTO director(nombre_director) VALUES('<NAME>');
INSERT INTO director(nombre_director) VALUES('<NAME>');
INSERT INTO director(nombre_director) VALUES('<NAME>');
INSERT INTO director(... |
<filename>egov/egov-commons/src/main/resources/db/migration/main/V20160107120455__commons_alter_deptdesig_notnull.sql
ALTER TABLE eg_position ALTER COLUMN deptdesig SET NOT NULL;
|
--CREATE Database BookStore;
--GO
--USE BookStore;
--CREATE TABLE Books
--(
--id INT,
--name VARCHAR(50) NOT NULL,
--category VARCHAR(50) NOT NULL,
--price INT NOT NULL
--)
--USE BookStore
--INSERT INTO Books
--VALUES
--(1, 'Book1', 'Cat1', 1800),
--(2, 'Book2', 'Cat2', 1500),
--(3, 'Book3', 'Cat3', 2000),
--(4, '... |
<gh_stars>0
use DBA
go
DECLARE @From datetime = '2021-09-28 21:00:00.000'
DECLARE @To datetime = '2021-09-28 23:00:00.000'
DECLARE @NoOfDays int = 14;
-- Generate start_time/end_time for @NoOfDays
if object_id('tempdb..#event_time_table') is not null
drop table #event_time_table;
with dates as (
select @From as sta... |
DROP DATABASE IF EXISTS burgers_db;
CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE burgers (
id INTEGER AUTO_INCREMENT,
burger_name VARCHAR (50) NOT NULL,
devoured BOOLEAN DEFAULT false,
PRIMARY KEY (id)
);
|
<gh_stars>0
-- -------------------------------------------------------------
-- TablePlus 3.12.8(368)
--
-- https://tableplus.com/
--
-- Database: users_db
-- Generation Time: 2021-05-30 02:17:54.9970
-- -------------------------------------------------------------
-- This script only contains the table creation stat... |
INSERT INTO calaccess_processed_form460schedulefitem (
filing_id,
line_item,
payee_code,
payee_committee_id,
payee_title,
payee_lastname,
payee_firstname,
payee_name_suffix,
payee_city,
payee_state,
payee_zip,
treasurer_title,
treasurer_lastname,
treasurer_firstna... |
<reponame>MikeBeller/janetdocs
select
binding.id,
binding.name,
binding.docstring,
binding.package_id,
package.name as package,
count(example.id) as examples
from
binding
left outer join
package on binding.package_id = package.id
left outer join
example on example.binding_id = binding.id
where
bindi... |
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[SQLCop].[test User Aliases]') AND type in (N'P', N'PC'))
DROP PROCEDURE [SQLCop].[test User Aliases]
GO
CREATE PROCEDURE [SQLCop].[test User Aliases]
AS
BEGIN
-- Written by <NAME>
-- February 25, 2012
-- http://sqlcop.lessthandot.com
-- http://ww... |
-- This file should undo anything in `up.sql`
CREATE OR REPLACE FUNCTION payment_service.transition_to(payment payment_service.catalog_payments, status payment_service.payment_status, reason json)
RETURNS boolean
LANGUAGE plpgsql
AS $function$
declare
_project project_service.projects;
... |
select 12 -- ends with comment |
<reponame>vipulnaik/donations
# -- Donations *to* the 2016 donor lottery (<NAME> and <NAME>)
insert into donations(donor, donee, amount, fraction, donation_date, donation_date_precision, donation_date_basis, cause_area, url, notes) values
('<NAME>', 'Donor lottery', 5000.00, NULL, '2016-12-07', 'day', 'transaction',... |
<filename>database/2021-06-11_add_storage_params.sql
/*
####################
Add Improved Storage Module columns
Date applied: 2021-06-11
Description: This script adds the columns daily_self_discharge_rate, discharge_efficiency and
land_use_rate to the generation_plant table. These columns were added as part of the
im... |
<gh_stars>0
CREATE DATABASE IF NOT EXISTS `student_enrollment` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `student_enrollment`;
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: student_enrollment
-- ------------------------------------------------------
-- Server versio... |
<reponame>LeeBaekHaeng/sql<filename>oracle/oracle 11g/SYS/Views/ALL_TAB_COLS-select.sql
SELECT /* */
' , A.' || COLUMN_NAME SQL
-- ' , A.' || COLUMN_NAME || ' /* ' || COLUMN_COMMENTS || ' */' SQL
FROM (
SELECT /* select */
A.OWNER
, A.TABLE_NAME
... |
with conversation_part_history as (
select *
from {{ ref('stg_intercom__conversation_part_history') }}
),
--Returns each distinct admin author(s) that were associated with a single conversation.
admin_conversation_parts as (
select distinct
conversation_id,
author_id
from conversation_part_... |
CREATE TABLE sec.role
(
id SERIAL,
name character varying(100) NOT NULL,
code character varying(100),
description character varying(250),
system_code character varying(50),
user_level character varying(50),
CONSTRAINT role_pkey PRIMARY KEY (id),
CONSTRAINT role_system_code_fk FOREIGN KEY... |
<filename>tests/Dibix.Sdk.Tests.Database/CodeAnalysis/dbx_codeanalysis_error_030.sql<gh_stars>10-100
CREATE PROCEDURE [dbo].[dbx_codeanalysis_error_030]
AS
SELECT HASHBYTES(N'SHA1', N'') -- Fail
SELECT HASHBYTES(N'SHA2_512', N'') -- Success |
<filename>components/automate-workflow-server/schema/revert/team_members.sql<gh_stars>100-1000
-- Revert delivery:team_members from pg
BEGIN;
DROP TABLE IF EXISTS team_members;
COMMIT;
|
ALTER TABLE crates
DROP CONSTRAINT fk_namespace_id__crate_id;
ALTER TABLE crates
DROP COLUMN namespace_id;
|
--Statistics for IdPs
CREATE TABLE statistics (
year INT NOT NULL,
month INT NOT NULL,
day INT NOT NULL,
sourceIdp VARCHAR(255) NOT NULL,
service VARCHAR(255) NOT NULL,
count INT,
INDEX (sourceIdp),
INDEX (service),
INDEX (year),
INDEX (year,month),
INDEX (year,month,day),
... |
-- @file
-- FadZmaq Project
-- Professional Computing. Semester 2 2019
--
-- Copyright FadZmaq © 2019 All rights reserved.
-- @author <NAME> <EMAIL>
DROP ROLE IF EXISTS test_fadzmaq_app;
|
CREATE TABLE [dbo].[UserTest] (
[Id] INT NOT NULL IDENTITY,
[UserID] BIGINT NOT NULL,
[TestID] INT NOT NULL,
[TotalScore] BIGINT NULL,
[CreatedOn] DATE DEFAULT (getdate()) NULL,
TestStatus Bit Default 0
PRIMARY KEY CLUSTERED ([Id] ASC),
FOREIGN KEY ([UserID]) REFER... |
<filename>prisma/migrations/20220209150641_init2/migration.sql
/*
Warnings:
- You are about to drop the column `business` on the `user` table. All the data in the column will be lost.
- You are about to drop the column `tutor` on the `user` table. All the data in the column will be lost.
- Made the column `rol... |
<filename>DB/creationSQL/mysql/CreateTables_ts_mcbc_tr(prefix t_).sql
-- to create triggers, must put DB name before trigger and table names...
-- Create MySql tables:
-- note: the "DROP" statement must be a comment with two dashes + one space + "DROP" in order to be activated by
-- the creation script, ie. the scrip... |
BEGIN;
CREATE TABLE IF NOT EXISTS resources(
"id" SERIAL PRIMARY KEY,
"uid" VARCHAR(36) NOT NULL UNIQUE,
"name" TEXT NOT NULL,
"last_modified" TIMESTAMP NOT NULL,
"url" TEXT NOT NULL,
"created_at" TIMESTAMP NOT NULL DEFAULT NOW()
);
CREATE I... |
<reponame>eleightondick/demo-alwaysEncrypted
USE AdventureWorks2012;
GO
SELECT *
FROM HumanResources.Employee;
GO
SELECT *
FROM HumanResources.EmployeePayHistory;
GO
CREATE TABLE [HumanResources].[Employee](
[BusinessEntityID] [int] NOT NULL,
[NationalIDNumber] [nvarchar](15)
COLLATE Latin1_Gene... |
<reponame>sail3/PIPLibelula
-- MySQL dump 10.13 Distrib 5.6.25, for Linux (x86_64)
--
-- Host: localhost Database: db_libelula
-- ------------------------------------------------------
-- Server version 5.6.25
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS... |
# MySQL-Front 3.2 (Build 6.25)
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES 'utf8' */;
# Host: localhost Database: ehda
# ------------------... |
CREATE TABLE sys.column_xml_schema_collection_usages
(
object_id int NOT NULL,
column_id int NOT NULL,
xml_collection_id int NOT NULL
); |
<filename>apex/5.0/f179/application/shared_components/user_interface/templates/report.sql
prompt --application/shared_components/user_interface/templates/report
begin
wwv_flow_api.create_row_template(
p_id=>wwv_flow_api.id(327275801843455559)
,p_row_template_name=>'Alerts'
,p_internal_name=>'ALERTS'
,p_row_template1=>... |
<filename>db/elections/2009_parliament/structure.sql
create table _2009_parliament_majorvotes(
"section_id" text, -- 1) Пълен код на секция(код на район(2), община(2), адм. район(2), секция(3));
"major1_valid" integer, -- Гласовете за мажоритарни кандидати за съответния район, подредени по техния пореден но... |
<filename>core/src/Module/Control/sql/ModuleDescription.sql
/* auto-generated header by CodeFromTemplate - Connected Vision - https://github.com/ConnectedVision */
/* CodeFromTemplate Version: 0.3 alpha */
/* ModuleDescription.sql */
/* NEVER TOUCH this file! */
/* This SQL will DELETE ALL existing DATA! */
DROP TABLE... |
CREATE TABLE Products (
ProductId INT NOT NULL IDENTITY,
Name NVARCHAR(200) NOT NULL,
Price MONEY NOT NULL,
CONSTRAINT PK_ProductId PRIMARY KEY (ProductId),
);
CREATE TABLE Customers (
CustomerId INT NOT NULL IDENTITY,
FirstName NVARCHAR(200) NOT NULL,
LastName NVARCHAR(200) NOT NULL,
CardNumer NVARCHAR(20) NUL... |
<reponame>botic/wienerlinien-gtfs2postgres
DROP TABLE IF EXISTS agency;
DROP TABLE IF EXISTS calendar;
DROP TABLE IF EXISTS calendar_dates;
DROP TABLE IF EXISTS routes;
DROP TABLE IF EXISTS shapes;
DROP TABLE IF EXISTS stop_times;
DROP TABLE IF EXISTS stops;
DROP TABLE IF EXISTS trips;
CREATE TABLE agency
(
agency_i... |
SELECT password_hash, password_salt FROM users
WHERE
user_id = ?
|
<reponame>munich/ssh_five_core
-- Constraints
CREATE INDEX IF NOT EXISTS "transactions_block_id" ON ${schema~}.transactions ("block_id");
|
<gh_stars>10-100
--
-- Copyright (c) Microsoft Corporation. All rights reserved.
-- Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
--
CREATE PROCEDURE [dbo].[UpdateEmailJob]
@JobId uniqueidentifier
AS
set nocount on
SET XACT_ABORT ON -- close the transaction in ... |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 22, 2020 at 01:38 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<gh_stars>10-100
DROP INDEX IF EXISTS rtc_unique_room_id;
|
<filename>data/add_media_privacy.sql
ALTER TABLE `media` ADD `privacy` ENUM('PUBLIC', 'UNLISTED', 'PROTECTED', 'PRIVATE') NOT NULL DEFAULT 'PUBLIC' AFTER `author`;
|
<filename>Create_MySQL_Usuarios_DB/users_login_table.sql
-- Run this archieve in your DB manager
CREATE TABLE `users`.`users_login` (
`id` INT UNSIGNED auto_increment NOT NULL,
`username` varchar(150) NOT NULL,
`password_hash` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
CONSTRAINT users_login_PK PRIMARY... |
<reponame>aliostad/deep-learning-lang-detection<gh_stars>10-100
select model.id, model.urldocument FROM "поручениеобработкиотчетности" as model
inner join reportpackage report on
model.reportpackageid = report.id
inner join информацияопакете info on
model.package... |
<filename>mysql-migrate/src/main/resources/sql/diff/create-table.sql
CREATE TABLE `${tableName}` ( ${columnSql} )${engine}${charset}${collate}${comment}; |
-- minmax.test
--
-- execsql {
-- SELECT coalesce(max(rowid),999) FROM t3 WHERE rowid<25;
-- }
SELECT coalesce(max(rowid),999) FROM t3 WHERE rowid<25; |
-- CREATE
INSERT INTO comments(body,user_id,post_id) VALUES(?,?,?);
-- DELETE
DELETE FROM comments WHERE id = ?;
-- RETRIEVE ALL
SELECT
comments.id,
post_id,
comments.user_id,
username,
comments.body,
comments.created_at
FROM
comments
JOIN posts ON posts.id = comments.post_id
JOIN users ON... |
<gh_stars>0
DROP DATABASE IF EXISTS trackerDB;
CREATE DATABASE trackerDB;
USE trackerDB;
CREATE TABLE department (
id INT NOT NULL AUTO_INCREMENT,
primary key(id),
name VARCHAR(30)
);
CREATE TABLE employee (
id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
first_name varchar(50),
last_name varchar(50)... |
<gh_stars>1000+
-- 2021-06-18T10:05:01.914Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DDL_NoForeignKey,DefaultValue,Description,EntityType,FacetFilterSeqNo,FieldLengt... |
<gh_stars>1-10
ALTER TABLE db_version CHANGE COLUMN required_10219_01_mangos_spell_proc_event required_10223_01_mangos_spell_proc_event bit;
delete from `spell_proc_event` where entry = 71761;
insert into `spell_proc_event` values
(71761, 0x00, 3, 0x00000000, 0x00000000, 0x00000000, 0x00100000, 0x00000000, 0x00000000... |
<reponame>alex-ilyichov/dbt_quickbooks<filename>models/double_entry_transactions/int_quickbooks__journal_entry_double_entry.sql
/*
Table that provides the debit and credit records of a journal entry transaction.
*/
--To disable this model, set the using_journal_entry variable within your dbt_project.yml file to False.... |
<reponame>tamercuba/impacta-sql-server<filename>mod_I/cap_9/solucao_cap_9.sql
-- CAP 9 LAB I
-- 1
USE PEDIDOS;
GO
-- 2
SELECT AVG(PRECO_VENDA)
FROM TB_PRODUTO;
--3
SELECT COUNT(DISTINCT NUM_PEDIDO) AS TOTAL_PEDIDOS, MAX(VLR_TOTAL) AS MAX_VLR_TOTAL, MIN(VLR_TOTAL) AS MIN_VLR_TOTAL
FROM TB_PEDIDO;
-- 4
... |
create table ACT_CY_CONN_CONFIG (
ID_ nvarchar(255),
PLUGIN_ID_ nvarchar(255),
INSTANCE_NAME_ nvarchar(255),
INSTANCE_ID_ nvarchar(255),
USER_ nvarchar(255),
GROUP_ nvarchar(255),
VALUES_ nvarchar(1024),
primary key (ID_)
);
create table ACT_CY_CONFIG (
ID_ nvarchar(255),
GROUP_ nvarchar(255),
KEY_ nvarchar... |
<filename>components/org.wso2.carbon.identity.oauth/src/test/resources/dbScripts/identity_req_obj.sql
CREATE TABLE IF NOT EXISTS IDN_BASE_TABLE (
PRODUCT_NAME VARCHAR (20),
PRIMARY KEY (PRODUCT_NAME)
);
INSERT INTO IDN_BASE_TABLE values ('WSO2 Identity Server');
CREATE TABLE IF NOT EXISTS IDN_... |
<gh_stars>1-10
--"INTEL CONFIDENTIAL"
--Copyright 2016 Intel Corporation All Rights Reserved.
--
--The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its suppliers or licensors. Title to the Material remains with Intel Corporation or... |
<gh_stars>1-10
DROP SCHEMA IF EXISTS Modell CASCADE;
CREATE SCHEMA Modell;
SET search_path TO Modell;
CREATE TABLE A (
B INTEGER PRIMARY KEY,
C INTEGER);
CREATE TABLE X (
Y INTEGER PRIMARY KEY,
Z INTEGER);
CREATE TABLE U (
B INTEGER REFERENCES A(B),
Y INTEGER REFERENCES X(Y),
W INTEGER,
PRI... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50627
Source Host : localhost:3306
Source Database : huan_blog
Target Server Type : MYSQL
Target Server Version : 50627
File Encoding : 65001
Date: 2016-04-27 01:03:49
*/
SET FOREIGN_KEY_CHECKS = 0;
... |
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
----------------------------------------------------------------------------------
-- Procedure Name: [dbo].[QueryWaits]
--
-- Desc: This script queries the QDS data and generates a report based on wait statistics of a given Object, Query or Execution plan over a given ... |
<filename>persistence/sql/migrations/sql/20200830154602000000_add_verification_token.mysql.down.sql
DROP TABLE `identity_verification_tokens`; |
--+ holdcas on;
set system parameters 'compat_mode=mysql';
create table t1 (id int auto_increment, a1 CHAR(2000),b2 VARCHAR(2000),c3 NCHAR(2000),d4 NCHAR VARYING(2000),e5 BIT(2000),f6 BIT VARYING(2000),g7 NUMERIC,h8 DECIMAL,i9 INTEGER ,j10 SMALLINT,k11 MONETARY,l12 FLOAT,m13 REAL,n14 DOUBLE PRECISION,o15 DATE,p16 TIME... |
<gh_stars>1-10
--normal insert with column list
create class insert2_tb(
col1 int primary key,
col2 varchar(20),
col3 varchar(20),
col4 blob,
col5 clob
);
insert into insert2_tb (col1, col2, col3, col4, col5) values(1, 'aaa1', 'bbb1', bit_to_blob(B'000010'), char_to_clob('bbb1'));
insert into insert2_tb (col1, col2, c... |
<reponame>alok-sriv/Flask-Blog
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`username` varchar(30) NOT NULL UNIQUE,
`email` varchar(100) NOT NULL UNIQUE,
`image_file` varchar(100) NOT NULL DEFAULT 'default.jpg',
`password` varchar(100) NOT NULL,
`register_date` timestamp NOT NULL DEFAULT current_timestamp(... |
-------------------------------------
-- LinkedIn Learning ----------------
-- Advanced SQL - Query Processing --
-- <NAME> 2020 -------------------
-- .\Chapter1\Video3.sql ------------
-------------------------------------
-- SQL Server download
-- https://www.microsoft.com/en-us/sql-server/sql-server-downloads
-- ... |
USE [final(465)]
GO
/****** Declare Null or Not Null for each key. set data types that will be similar thoughout ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Client](
[ClientKey] [nchar](10) NOT NULL,
[ClientFirst_Name] [varchar](50) NOT NULL,
[ClientLast_Name] [varcha... |
<filename>backend/sql/db_schema_test.sql
-- MySQL Script generated by MySQL Workbench
-- Sat Nov 24 14:44:17 2018
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
S... |
CREATE TABLE `antraege` (
`antrag_id` int(11) NOT NULL AUTO_INCREMENT,
`status` tinyint(4) NOT NULL,
`ts_antrag` int(11) NOT NULL,
`ts_nachfrage` int(11) NOT NULL,
`ts_antwort` int(11) NOT NULL,
`ts_entscheidung` int(11) NOT NULL,
`ts_erinnerung` int(11) NOT NULL,
`ts_statusaenderung` int(11) NOT NULL D... |
<filename>delivery3/database.sql
-- =================================================================================================
-- Author: <NAME>
-- <NAME>
-- <NAME>
--
-- Description: Creates the database
-- ==========================================================================... |
<filename>schema.sql
DROP DATABASE IF EXISTS employee_tracker_db;
CREATE DATABASE employee_tracker_db;
USE employee_tracker_db;
CREATE TABLE department (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
department_name VARCHAR(30)
);
CREATE TABLE role (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
tit... |
/**
Agenda de contatos
@author <NAME>
*/
-- exibir banco de dados do servidor
show databases;
-- criar um novo banco de dados
create database dbagenda;
-- excluir um banco de dados
-- drop database dbteste;
-- selecionar o banco de dados
use dbagenda;
-- verificar tabelas existentes
show tables;
-- criar um... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 24 Apr 2019 pada 15.59
-- Versi Server: 10.1.25-MariaDB
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
<reponame>treebat1/SQL
sp_helpdb tempdb
alter database tempdb modify file (name = tempdev, filegrowth = 0 MB)
declare @i as int
declare @sql as nvarchar(2000)
set @i = 1
while @i <= 31
BEGIN
set @sql = N'alter database tempdb modify file (name = tempdev'
+ cast(@i as nvarchar(3)) + ', filegrowt... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 12 Jul 2020 pada 07.36
-- Versi server: 10.1.34-MariaDB
-- Versi PHP: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
INSERT INTO project (sponsor_id, name) VALUES (1, 'Madagascar Lemur Conservation');
INSERT INTO asset_type (name)
VALUES ('Ring Tailed Lemur'), ('Brown Mouse Lemur'), ('Silky Sifaka');
INSERT INTO property
(asset_type_id, name, data_type, required, is_private)
VALUES
(1, 'fur thickness', 'number', false, fals... |
<reponame>BugsUK/FindApprenticeship
/*----------------------------------------------------------------------
Name : ReportGetAllEmployersForProvider
Description : returns ordered unique Employers for providers
History:
-------- ... |
BEGIN;
CREATE TABLE "django_session" (
"session_key" varchar(40) NOT NULL PRIMARY KEY,
"session_data" text NOT NULL,
"expire_date" datetime NOT NULL
)
;
COMMIT;
|
<filename>Sql Files/DatabaseCreation.sql
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';
DROP SCHEMA IF EXISTS `myhome` ;
CREATE SCHEMA IF NOT EXISTS `myhome` DEFAU... |
-- count.test
--
-- execsql {
-- DROP TABLE IF EXISTS t1;
-- CREATE TABLE t1(a, b);
-- }
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(a, b); |
/* V0.1.3_0__Create_famous_people_table.sql */
CREATE TABLE IF NOT EXISTS famous_people (
famous_person_id int GENERATED ALWAYS AS IDENTITY primary key,
display_name text NOT NULL
);
/*GRANT ALL PRIVILEGES ON TABLE famous_people TO <user>;*/ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.