sql stringlengths 6 1.05M |
|---|
CREATE TABLE [dbo].[KeySerialAssignments] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[ApprovedAt] DATETIME2 (7) NULL,
[ConfirmedAt] DATETIME2 (7) NULL,
[ExpiresAt] DATETIME2 (7) NOT NULL,
[IsConfirmed] BIT NOT NULL,
[Ke... |
DROP TABLE IF EXSITS libros;
CREATE TABLE libros(
codigo INT unsigned auto_increment,
titulo VARCHAR(40),
autor VARCHAR(30),
editorial VARCHAR(15),
precio DECIMAL(5,2),
PRIMARY KEY(codigo)
);
INSERT INTO libros (titulo,autor,editorial,precio)
VALUES('El aleph','Borges','Planeta',15.50);
INSERT INTO li... |
<gh_stars>1-10
/*
Database : xe
Target Server Type : ORACLE
Date: 2017-04-04 12:10 PM
*/
BEGIN
FOR tt IN (SELECT table_name as tname
FROM all_tables WHERE TABLE_NAME='ADDRESSBOOK_V4' AND OWNER='R4ME')
LOOP
EXECUTE IMMEDIATE 'DROP TABLE ADDRESSBOOK_V4';
END LOOP... |
-- 2018-06-28T13:57:44.098
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Table (AccessLevel,ACTriggerLength,AD_Client_ID,AD_Org_ID,AD_Table_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsAutocomplete,IsChangeLog,IsDeleteable,IsDLM,IsHighVolume,IsSecurityEn... |
<filename>CIMOB_IPS_DB/dbo/Tables/Mobilidade.sql
CREATE TABLE Mobilidade
(
id_mobilidade BIGINT PRIMARY KEY IDENTITY(1,1),
id_candidatura BIGINT NOT NULL,
id_programa BIGINT NOT NULL,
id_estado BIGINT NOT NULL,
id_tecnico_responsavel BIGINT NOT NULL,
id_instituicao_outgoing BIGINT NOT NULL,
data_inicio DATE NOT... |
<filename>src/main/resources/create_user.sql
alter session set "_ORACLE_SCRIPT"=true;
create user shopping_list identified by "password";
GRANT CONNECT, RESOURCE TO shopping_list;
GRANT CREATE SESSION TO shopping_list;
GRANT UNLIMITED TABLESPACE TO shopping_list;
grant create view, create procedure, create sequenc... |
<filename>src/test/resources/bvt/parser/antlr_grammers_v4_plsql/examples/pivot12.sql
select value from
(
(
select
'a' v1,
'e' v2,
'i' v3,
'o' v4,
'u' v5
from dual
)
unpivot include nulls
(
value
for value_type ... |
<filename>NugSQL.Test/pg-queries/Create_User_Table.sql
-- :name create_tbl_user :affected
-- Table: test.user
DROP TABLE IF EXISTS test."user";
CREATE TABLE test."user"
(
id serial NOT NULL,
user_name character varying(150) NOT NULL,
salt bytea NOT NULL,
password bytea NOT NULL,
profile jsonb NOT... |
<filename>tests/samples/valid.sql<gh_stars>10-100
-- name: simple
-- raw: 1
SELECT * FROM simple;
-- name: multiline
SELECT *
FROM multiline
WHERE line = 42;
-- name: comments
-- yoyo
SELECT *
-- inline
FROM comments;
|
<filename>fixtures/doctests/psql-ref/003/input.sql<gh_stars>0
$ psql "service=myservice sslmode=require"
$ psql postgresql://dbmaster:5433/mydb?sslmode=require
|
<reponame>xyrit/huogouadmin
CREATE TABLE `brands` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
`name` VARCHAR(255) NOT NULL COMMENT '品牌名称',
`alias` VARCHAR(255) NULL COMMENT '品牌别名',
`url` VARCHAR(255) NULL COMMENT '品牌网址',
`intro` TEXT NULL COMMENT '品牌介绍',
`create_name` VARCHAR(20) NOT NULL ... |
--combination with group by ... having clause
drop table if exists p_disc_groupby;
create table p_disc_groupby(
col1 int auto_increment primary key,
col2 smallint,
col3 char(30) default 'abc',
col4 date default SYSDATE,
col5 varchar(30),
col6 float
);
insert into p_disc_groupby(col2, col3, col4, col5, col6) va... |
USE [MillennialResort_DB]
GO
/*Start Kevin */
print '*** inserting test data into Department'
GO
INSERT INTO [dbo].[Department]
([DepartmentID],[Description])
VALUES
('Department','Description')
GO
print '' print '*** Inserting test data into Employee'
GO
INSERT INTO [dbo].[Employee]
([FirstName],[LastName],[Phon... |
<reponame>webdaud/emateri-online
-- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 26, 2015 at 01:52 PM
-- Server version: 5.5.36
-- PHP Version: 5.4.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
<filename>test/migration/migration_0-1.sql
ALTER TABLE `user` DROP COLUMN `age`;
ALTER TABLE `user` ADD COLUMN `birthdate` datetime NULL DEFAULT NULL; |
<gh_stars>0
CREATE TABLE [dbo].[TBVenue_TBInstagramUser]
(
[id] INT NOT NULL PRIMARY KEY IDENTITY,
[venue_id] INT NOT NULL,
[instragramuser_id] INT NOT NULL,
CONSTRAINT [FK_TBVenue_TBInstragramUser] FOREIGN KEY ([venue_id]) REFERENCES [TBVenue]([id]),
CONSTRAINT [FK_TBInstragramUser_TBVenue] FOREIGN KEY ([i... |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 21-Jul-2016 às 03:53
-- Versão do servidor: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
<reponame>Sliezk/movies
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1:3306
-- Généré le : Ven 22 Septembre 2017 à 04:01
-- Version du serveur : 5.7.17-0ubuntu0.16.04.1
-- Version de PHP : 7.0.15-0ubuntu0.16.04.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SE... |
<reponame>Yassine-Lafryhi/EcommerceWithPHP<filename>database.sql
CREATE DATABASE boutique;
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 07, 2020 at 12:48 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.2.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
SELECT * FROM user;
SELECT * FROM member;
|
DELETE
FROM webauth_user_auth
WHERE user_id=:id
AND provider=:provider
AND sub=:sub
|
<reponame>pdehaan/facebook-political-ads
alter table ads rename column lang to browser_lang;
|
<gh_stars>10-100
INSERT INTO `tiny`.`song` (`id`, `artist`, `track`, `link`) VALUES
(1, 'Dena', 'Cash, Diamond Ring, Swimming Pools', 'http://www.youtube.com/watch?v=r4CDc9yCAqE'),
(2, '<NAME>', '<NAME>', 'http://vimeo.com/73455369'),
(3, 'The Orwells', 'In my Bed (live)', 'http://www.youtube.com/watch?v=8tA_2qCGnmE'),... |
<filename>SQL/stock_data.session.sql
CREATE TABLE option_chains (
description TEXT,
putCall TEXT,
symbol TEXT,
exchangeName TEXT,
bid NUMERIC,
ask NUMERIC,
last NUMERIC,
mark NUMERIC,
bidSize BIGINT,
askSize BIGINT,)
bidAskSize TEXT,
lastSize BIGINT,
highPrice NUMERIC... |
-- SETTINGS
SET @iCategId = (SELECT `id` FROM `sys_options_categories` WHERE `name`='bx_organizations' LIMIT 1);
DELETE FROM `sys_options` WHERE `name`='bx_organizations_per_page_browse_recommended';
INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `extra`, `check`, `check_error`, `order`) ... |
-- etldoc: layer_place[shape=record fillcolor=lightpink, style="rounded,filled",
-- etldoc: label="layer_place | <z0_3> z0-3|<z4_7> z4-7|<z8_11> z8-11| <z12_14> z12-z14+" ] ;
CREATE OR REPLACE FUNCTION layer_place(bbox geometry, zoom_level int, pixel_width numeric)
RETURNS TABLE(osm_id bigint, geometry geometry, ... |
<gh_stars>0
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'qq1203943228' WITH GRANT OPTION;
|
<gh_stars>0
update instance_properties set value = :value: where ident='serverinstance_database_version'; |
use tp;CREATE TABLE `reportlog` (
`date` varchar(10) NOT NULL,
`unitid` varchar(50) NOT NULL,
`content` varchar(4500) NOT NULL,
`draft` smallint(2) NOT NULL DEFAULT '1' COMMENT '1-草稿,0-提交,2-拒绝,3-同意',
`time` datetime NOT NULL,
`declinereason` varchar(450) DEFAULT NULL,
PRIMARY KEY (`date`,`unitid`),
UNIQ... |
<reponame>aliandr13/e-learning
CREATE TABLE student
(
id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
first_name VARCHAR(255) NOT NULL,
middle_name VARCHAR(255) NOT NULL,
last_name VARCHAR(255) NOT NULL,
phone VARCHAR(50)
)
|
create table elo_array
(
Probability double not null
primary key,
Difference smallint not null
)
engine = MyISAM
charset = utf8;
INSERT INTO world.elo_array (Probability, Difference) VALUES (0.01, -677);
INSERT INTO world.elo_array (Probability, Difference) VALUES (0.02, -589);
INSERT INTO w... |
<filename>dev/services/src/prUserIdMapper/dev/db/pavedroad.sql<gh_stars>1-10
CREATE DATABASE IF NOT EXISTS pavedroad;
|
<reponame>jojopoper/horizon
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = public, pg_catalog;
DROP INDEX public.signersaccou... |
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Янв 01 2019 г., 16:13
-- Версия сервера: 5.6.38
-- Версия PHP: 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTE... |
<reponame>MemphiS047/library-web-app-api
-- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64)
--
-- Host: localhost Database: medipolib
-- ------------------------------------------------------
-- Server version 8.0.23
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_... |
<filename>C# DB Fundamentals/Databases Basics - MS SQL Server/Joins, Subqueries, CTE and Indices/04. Employee Departments.sql
SELECT TOP(5) e.EmployeeID, e.FirstName, e.Salary, d.[Name] AS [DepartmentName]
FROM Employees AS e
JOIN Departments AS d ON d.DepartmentID = e.DepartmentID
WHERE e.Salary > 15000
ORDER BY e.D... |
<reponame>AyslanAragao/PrjClube
CREATE TABLE tbTipoPagamento(
cdTipoPagamento int identity (1,1) not null,
dsTipoPagamento varchar(50),
);
CREATE TABLE tbLancamento(
cdLancamento int identity (1,1) not null,
cdParticipante int not null,
cdTipoPagamento int ,
vlLancamento numeric (10,2),
dtLancamento smalldatetime... |
<gh_stars>0
INSERT INTO media VALUES ("ltr_jgw8100","letter","1828-11-28","<NAME>","NH","US","John","Whittier","","A","Thayer","","individual","","I have been in a quandary ever since I left thee, whether I had better accept the offer of Friend Collier, or nail myself down to my seat, for, verily, I could not be kept t... |
/*
Navicat Premium Data Transfer
Source Server : localmariadb
Source Server Type : MariaDB
Source Server Version : 100128
Source Host : localhost:3306
Source Schema : control
Target Server Type : MariaDB
Target Server Version : 100128
File Encoding : 65001
Date: 27/1... |
create view IF NOT EXISTS ACCOUNT_TWR_PERF AS
select * from(
select account_id, pos_date, 1 type, ((sum(POS_VALUE_REPORTING_CURRENCY) - sum(QUANTITY* CMA *tMA) ) / sum(QUANTITY* CMA *tMA) )*100 perf from positions group by account_id, POS_DATE
union
select account_id, ... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 02, 2018 at 10:35 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.0.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
CREATE
VIEW VW_Estabelecimentosavaliacao AS
SELECT
es.CodEstabelecimento AS EsCodEstabelecimento,
es.Nome AS EsNome,
es.Descricao AS EsDescricao,
es.Foto AS EsFoto,
es.CriadoEm AS EsCriadoEm,
es.AtualizadoEm AS EsAtualizadoEm,
es.CNPJ AS EsCNPJ,
ca.Cod... |
<filename>db/CreateTable.sql
CREATE TABLE IF NOT EXISTS users
(
id INTEGER NOT NULL AUTO_INCREMENT,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
email VARCHAR(150) NOT N... |
<filename>Contact/contact (1).sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 04, 2018 at 02:35 PM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.0.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;... |
-- MySQL dump 10.13 Distrib 5.7.19, for osx10.13 (x86_64)
--
-- Host: 127.0.0.1 Database: gotrue_development
-- ------------------------------------------------------
-- Server version 5.7.20
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_R... |
USE devops_ci_project;
SET NAMES utf8mb4;
DROP PROCEDURE IF EXISTS ci_demo_date_update;
DELIMITER <CI_UBF>
CREATE PROCEDURE ci_demo_date_update()
BEGIN
DECLARE db VARCHAR(100);
SET AUTOCOMMIT = 0;
SELECT DATABASE() INTO db;
-- create demo project
IF EXISTS(SELECT 1 FROM information_schema.COLUM... |
insert into datetime_at(id, created_at, updated_at)
value(UUID_TO_BIN('7322727f-7e31-4089-9d0e-667f0473bfea'), '2020-06-15 23:27:44', '2020-06-15 23:27:44');
|
-- Выбрать всех выпускников "университетов"
SELECT name, college_name FROM
teachers INNER JOIN accounts
ON teachers.id = accounts.id
INNER JOIN colleges
ON teachers.college_id = colleges.id
WHERE college_name IN (
SELECT college_name FROM colleges
WHERE college_name LIKE 'University%'
) |
<reponame>pollett/RDocumentation-app<gh_stars>10-100
/* Replace with your SQL commands */
ALTER TABLE `DownloadStatistics`
DROP `last_month_downloads_direct`,
DROP `last_month_downloads_indirect`,
DROP `last_month_downloads`;
ALTER TABLE DownloadStatistics
ADD (`direct_downloads` int(11) NOT NULL,
`indirect_downl... |
-- MySQL dump 10.13 Distrib 5.5.41, for debian-linux-gnu (x86_64)
--
-- Host: mysql1.cs.clemson.edu Database: metube_u4an
-- ------------------------------------------------------
-- Server version 5.5.41-0ubuntu0.12.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER... |
DELETE FROM Event_ID WHERE event_id IN
(SELECT event_id FROM Event_ID WHERE event_id NOT IN (
SELECT event_id FROM Event
INTERSECT SELECT event_id FROM Event_Structure
INTERSECT SELECT event_id FROM Event_FCs
INTERSECT SELECT event_id FR... |
create table Customer(
cid varchar(10),
cname varchar(15),
city varchar(15),
discount number(3),
constraint customer_pk primary key (cid),
constraint cid_dom check(cid like 'c%'),
constraint discount_dom check(discount between 0 and 100)
);
create table Agents(
aid varchar(10),
aname varchar(15),
city varchar... |
<gh_stars>1-10
ALTER TABLE `auctionhouse`
ADD `item_template` int(11) unsigned NOT NULL default '0' AFTER `itemguid`;
UPDATE `auctionhouse`,`item_instance`
SET `item_template` = SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',4),' ',-1)
WHERE `auctionhouse`.`itemguid` = `item_instance`.`guid`;
|
<reponame>pleak-tools/pleak-sql-analysis
INSERT INTO port_enc SELECT port.available AS available, port.latitude AS latitude, port.longitude AS longitude, port.name AS name, port.offloadcapacity AS offloadcapacity, port.offloadtime AS offloadtime, port.port_id AS port_id FROM port AS port;
INSERT INTO count_ships SELEC... |
<filename>ccit.sql
/*
Navicat MySQL Data Transfer
Source Server : Test
Source Server Version : 50553
Source Host : localhost:3306
Source Database : ccit
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2019-01-11 14:56:54
*/
SET FOREIGN_KEY_CHEC... |
CREATE OR REPLACE FUNCTION stratcon.choose_storage_node_for_sid(in v_uuid uuid, in v_noit text, out o_storage_node_id int, out o_fqdn text, out o_dsn text)
RETURNS RECORD
AS $$
BEGIN
-- we could be smart with v_uuid and/or v_noit
SELECT storage_node_id, fqdn, dsn from stratcon.storage_node order by random() l... |
<reponame>jeantornier/amaze-us
-- -------------------------------------------------------------
-- INSERT
-- -------------------------------------------------------------
-- table : RESOURCE
INSERT INTO public.RESOURCE (RESOURCE_ID, RESOURCE_NAME, RESOURCE_DESCRIPTION, RESOURCE_CRITICALITY, RESOURCE_QUANTITY_VALUE, RE... |
<reponame>Ed-Fi-Exchange-OSS/Ed-Fi-to-Generate<filename>Test Data/NCESTestData/FS040_edfi.StudentAcademicRecord.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, Version 2.0.
-- See the LI... |
-- *********************************************************************
-- DDL for the Apicurio Registry - Database: H2
-- *********************************************************************
CREATE TABLE apicurio (prop_name VARCHAR(255) NOT NULL, prop_value VARCHAR(255));
ALTER TABLE apicurio ADD PRIMARY KEY (prop_... |
DROP TABLE IF EXISTS `amazon_eks_profile_node_pool_labels`;
DROP TABLE IF EXISTS `amazon_eks_profile_node_pools`;
DROP TABLE IF EXISTS `amazon_eks_profiles`;
DROP TABLE IF EXISTS `azure_aks_profile_node_pool_labels`;
DROP TABLE IF EXISTS `azure_aks_profile_node_pools`;
DROP TABLE IF EXISTS `azure_aks_profiles`;
DROP ... |
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 16, 2021 at 07:56 AM
-- Server version: 8.0.22
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.14
-- Dumped by pg_dump version 10.5 (Ubuntu 10.5-0ubuntu0.18.04)
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.se... |
<reponame>opengauss-mirror/Yat
-- @testpoint: generate_subscripts(array anyarray, dim int)生成一系列包括给定数组的下标
SELECT generate_subscripts('{NULL,1,NULL,2}'::int[], 1)as s; |
ALTER TABLE Events
ADD EventCreatorId UNIQUEIDENTIFIER
CONSTRAINT fk_EventUserAccount FOREIGN KEY (EventCreatorId)
REFERENCES EventEmitter.dbo.[UserAccounts](UserAccountId) |
INSERT INTO soups (soup_name) VALUES ('New England Clam Chowder'), ('Italian Wedding'),('Chicken Noodle') |
SELECT
`bg`.`id` AS `game_id`,
`bg`.`title`,
`bg`.`min_players`,
`bg`.`max_players`,
`col`.`color`
FROM `M_BOARDGAME` AS `bg`
INNER JOIN `M_COLOR` AS `col`
ON `bg`.`id` = `col`.`game_id`
WHERE CAST(`bg`.`score_tool` AS UNSIGNED) = 1; |
ALTER TABLE funding DROP COLUMN IF EXISTS user_accepted
|
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50624
Source Host : localhost:3306
Source Database : db_hris
Target Server Type : MYSQL
Target Server Version : 50624
File Encoding : 65001
Date: 2016-04-13 15:16:43
*/
SET FOREIGN_KEY_CHECKS=0;
-- -... |
SELECT
fish_entries.id,
fish_entries.species_id,
tc.species,
fish_entries.water_id,
fishable_waters.water_name,
fish_entries.date_caught,
fish_entries.pounds,
fish_entries.ounces,
fish_entries.fish_weight,
fish_entries.fish_length,
fish_entries.angler_name,
fish_entries.angler_state,
tc.trophy... |
create table LoanRequests(
RID integer primary key NOT NULL AUTO_INCREMENT,
UPIN varchar(64) not null,
LoanType char(32) not null,
Amount varchar(12) not null,
AdditionalNotes varchar(256) default null,
--
RefObjectId integer not null,
Reviewed boolean default False,
--
foreign key (UPIN) references Users(... |
//find who likes graphs besides Jennifer
match (j:Person {name: 'Jennifer'})-[:LIKES]-(Technology {type: 'Graphs'})-[:LIKES]-(p:Person)
return p.name;
//find who likes graphs besides Jennifer that she is also friends with
match (j:Person {name: 'Jennifer'})-[:LIKES]->(:Technology {type: 'Graphs'})<-[:LIKES]-(p:Person)... |
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 27, 2017 at 11:58 PM
-- Server version: 5.7.20-0ubuntu0.16.04.1
-- PHP Version: 7.0.22-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... |
<filename>data/database.sql
DROP TABLE IF EXISTS `Data`;
CREATE TABLE `Data` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`sensor_id` varchar(30) DEFAULT NULL,
`time` int(100) NOT NULL,
`volume` int(10) NOT NULL,
PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `Data` WRITE;
INSERT INTO `Da... |
<filename>scripts/create_schema.sql
USE easy_asset_tracker;
CREATE TABLE organization (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(256) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE role (
id INT NOT NULL,
name VARCHAR(80),
PRIMARY KEY (id)
);
CREATE TABLE user (
organization_id INT NOT NULL,
id INT ... |
SET DEFINE OFF;
CREATE UNIQUE INDEX AFW_23_PATRN_RECHR_PK ON AFW_23_PATRN_RECHR
(SEQNC)
LOGGING
/
|
<reponame>zhang96/GreatMovieDatabase-Database
INSERT INTO Director
VALUES ('D0001', '<NAME>', 'Inarritu', 'mx');
INSERT INTO Director
VALUES ('D0002', 'Alfonso', 'Cuaron', 'uk');
INSERT INTO Director
VALUES ('D0003', 'Ang', 'Lee', 'us');
INSERT INTO Director
VALUES ('D0004', 'Michel', 'Hazanavicius', 'fr');
INS... |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Tempo de geração: 21/12/2019 às 18:17
-- Versão do servidor: 8.0.18
-- Versão do PHP: 7.1.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
<gh_stars>1-10
-- Finds the last day of 2 months after June, in this case August
SELECT EOMONTH('2017/06/17', 2)
-- Finds the last day of 4 months before June, in this case February
SELECT EOMONTH('2017/06/17', -4)
|
<filename>Create Scripts/1.0/SQLBackupHelperMasterData.sql
SET NUMERIC_ROUNDABORT OFF
GO
SET XACT_ABORT, ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS, NOCOUNT ON
GO
-- Pointer used for text / image updates. This might not be needed, but is declared here just in case
... |
<reponame>naushard/EclipsePOS
USE [possite1]
GO
/****** Object: StoredProcedure [dbo].[Load_Item_By_Item_Group] Script Date: 10/25/2012 23:12:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE Procedure [dbo].[Load_Item_By_Item_Group]
/* Param List */
@organization_no varchar(6),
@item_group var... |
<filename>src/main/resources/db/migration/nomis/ddl-oracle/V1_621__PSS_EVENTS.sql
create or replace package api_owner.pss_events
is
function show_version return varchar2;
procedure reception(p_offender_book_id in offender_bookings.offender_book_id%type,
p_agy_loc_id in agency_loc... |
-- +goose Up
-- +goose StatementBegin
ALTER TABLE trade DROP CONSTRAINT uniquetrade;
CREATE UNIQUE INDEX unique_trade_no_id ON trade (base,quote,asset,price,amount,side, timestamp)
WHERE tid IS NULL;
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP INDEX unique_trade_no_id;
ALTER TABLE trade A... |
CREATE TABLE IF NOT EXISTS session
(
id BIGINT PRIMARY KEY AUTO_INCREMENT,
secret CHAR(36) NOT NULL,
uid BIGINT NOT NULL,
expires_at BIGINT NOT NULL
);
CREATE TABLE IF NOT EXISTS discord_user
(
id BIGINT PRIMARY KEY,
username VARCHAR(127) NOT NULL,
ava... |
<reponame>DBatOWL/tutorials<gh_stars>1000+
INSERT INTO song(id,name,length_in_seconds,compositor,singer,released,genre)
VALUES
(1,'Despacito',209,'<NAME>','<NAME>, <NAME>','2017-01-12','Reggaeton'),
(2,'Con calma',188,'<NAME>','<NAME>','2019-01-24','Reggaeton'),
(3,'It''s My Life',205,'<NAME>','<NAME>','2000-05-23','Po... |
DROP VIEW IF EXISTS db_columns_fk;
CREATE OR REPLACE VIEW db_columns_fk AS
SELECT
v.TableName
, v.ColumnName
, v.table_ref as Ref_TableName
, v.TableName_EntityType, v.ColumnName_EntityType
, v.AD_Reference_ID, v.AD_Reference_Name, v.AD_Reference_Value_ID
--
, v.DDL_NoForeignKey
, v.IsView
--
, (CASE
WHEN... |
CREATE TABLE CLOG_POST (
POST_ID CHAR(36) NOT NULL,
SITE_ID VARCHAR2(255),
TITLE VARCHAR2(255) NOT NULL,
CONTENT CLOB NOT NULL,
CREATED_DATE DATE NOT NULL,
MODIFIED_DATE DATE,
CREATOR_ID VARCHAR2(255) NOT NULL,
ALLOW_COMMENTS NUMBER(10 ,0),
VISIBILITY VARCHAR2(16) NOT NULL,
CONST... |
<reponame>davymartinez/base-de-datos-master
/* Listar los nombres y las capitales de los países en cuya capital se concentre más de la mitad de su población
total.
(Se esperan 2 columnas y 14 registros). */
SELECT
country.name AS 'Country', city.name AS 'Capital'
FROM
world.country
INNER JOIN
wo... |
<filename>blog.sql<gh_stars>0
--create database FinalBlog
create table noticias
(
noticiaId int primary key identity(1,1),
noticiaTitulo varchar(250) not null,
noticiaDescripcion varchar(max) not null,
noticiaFechaCreacion datetime not null,
noticiaUrlFoto varchar(250),
noticiaFechaActualizacion datetim... |
<filename>bin/apache-hive-3.1.2-bin/scripts/metastore/upgrade/postgres/upgrade-0.13.0-to-0.14.0.postgres.sql
version https://git-lfs.github.com/spec/v1
oid sha256:f9fc6d193efe164f2631d5973357d7f317a7bd5c21503da5707e5724faf1eed2
size 366
|
SET 'ksql.streams.cache.max.bytes.buffering'='2000000';
|
-- Unique property reference numbers
\copy geo_uprn from 'data/os_open_uprn.csv' csv header;
create index idx_geouprn_xy on geo_uprn (x_coordinate, y_coordinate);
-- Postcodes
\copy geo_postcode_lookup from 'data/ons_postcode_directory.csv' csv header force null easting,northing,latitude,longitude,lsoa,district,ward,c... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th10 15, 2021 lúc 05:26 AM
-- Phiên bản máy phục vụ: 10.4.21-MariaDB
-- Phiên bản PHP: 7.3.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
CREATE TABLE IF NOT EXISTS `cmq` (
`id` BIGINT UNSIGNED AUTO_INCREMENT NOT NULL,
`command_class` VARCHAR(255) NOT NULL,
`command` LONGBLOB NOT NULL,
`pool` VARCHAR(100) NOT NULL,
`failed_no` SMALLINT DEFAULT 0 NOT NULL,
`processed` TINYINT(1) DEFAULT '0' NOT NULL,
`process_after` DATETIME NO... |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 02, 2021 at 06:24 AM
-- 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:00";
/*!40101 SET @OLD... |
<gh_stars>0
SELECT order_date, child.name
FROM customers,orders,parent,child
WHERE customers.cid = orders.cid
AND parent.id = child.pid
AND customers.name = parent.name
ORDER BY child.name
|
<reponame>n6151h/roborank
-- RoboRank sqlit3 schema
pragma foreign_keys=off;
CREATE TABLE properties (
name varchar not null,
value varchar default ''
);
CREATE TABLE teams (
teamId integer primary key not null,
name varchar default '',
exclude int not null default 0
);
create table raw_scores (... |
LOAD DATA
FROM FILE '${DATA_DIR}aka_name.csv'
INTO aka_name
USING '{ "from": {"file": {"escapechar":"\\"} } }'
|
DROP FUNCTION IF EXISTS now_utc();
CREATE FUNCTION now_utc()
RETURNS TIMESTAMP AS
$$
SELECT now() AT TIME ZONE 'utc';
$$ LANGUAGE SQL;
ALTER TABLE gateways
ALTER COLUMN created_at SET DEFAULT now_utc();
ALTER TABLE users
ALTER COLUMN created_at SET DEFAULT now_utc();
ALTER TABLE rooms
ALTER COLUMN cre... |
<reponame>itsg2jakhmola/MediCrip
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 09, 2017 at 08:24 PM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 7.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.