sql stringlengths 6 1.05M |
|---|
DROP PROCEDURE if EXISTS get_next_test_in_queue;
CREATE PROCEDURE get_next_test_in_queue()
BEGIN
START TRANSACTION;
select bsLogicInfoId, tradeLogicInfoId Into @bsId, @tlId FROM tradetests WHERE State = 0 ORDER BY PredictedPerformance Desc LIMIT 1 FOR UPDATE SKIP LOCKED;
update tradeTests SET state = 1 WHE... |
CREATE TABLE [dbo].[LiteratureImage] (
[LiteratureID] INT NOT NULL,
[ImageID] INT NOT NULL,
[LiteratureImageID] INT NOT NULL,
[FigureNo] NVARCHAR (MAX) NULL
);
|
<reponame>lucasnapolilapenda/dvd<gh_stars>0
/***** Table movieType *****/
IF OBJECT_ID('production.MovieType', 'U') is not NULL
DROP TABLE production.MovieType
;
GO
/***** Table movieType Creation *****/
CREATE TABLE production.MovieType
(
MtID SMALLINT IDENTITY(1,1) NOT NULL PRIMARY KEY,
MtValue NVARCHAR(20) ... |
USE SoftUni
SELECT FirstName, LastName, HireDate, d.Name
FROM Employees AS e
INNER JOIN Departments AS d ON
e.DepartmentID = d.DepartmentID
WHERE d.Name IN ('Sales', 'Finance') AND e.HireDate > '01/01/1999'
ORDER BY HireDate |
create table if not exists consumidor (
id serial primary key,
nome varchar(100) not null,
email varchar(100) not null,
telefone int not null,
senha text not null
);
create table if not exists restaurante (
id serial primary key,
usuario_id int not null,
nome varchar(50) not null,
descricao text,
... |
<gh_stars>0
/*******************************************************************************
COM236 SQL - Knowledge Verification Labs 2 - CREATE
Exercise 4
*******************************************************************************/
/****************************************************************************... |
-- +migrate Up
CREATE TABLE rating (
id uuid NOT NULL DEFAULT uuid_generate_v1mc(),
user_id uuid NOT NULL,
author_id uuid NOT NULL,
trip_id uuid NOT NULL,
comment character varying(128) NOT NULL,
value numeric NOT NULL,
created_at timestamp WITHOUT TIME ZONE DEFAULT (... |
CREATE DEFINER=`root`@`%` PROCEDURE `getPossibleMothersBasedOnDate`(IN `DateIn` DATE)
SQL SECURITY INVOKER
COMMENT 'To get possible mothers based on a certain date'
BEGIN
DECLARE CompletedOk int;
DECLARE NewTransNo int;
DECLARE TransResult int;
DECLARE RecCount int;
DECLARE MessageText CHAR;
DECL... |
<gh_stars>0
-- ***************************************************************************
-- File: 9_4 .sql
--
-- Developed By TUSC
--
-- Disclaimer: Neither Osborne/McGraw-Hill, TUSC, nor the author warrant
-- that this source code is error-free. If any errors are
-- found in this source code,... |
CREATE TRIGGER [dbo].[TRACKING___Decia_ObjectType___AllChanges] ON [dbo].[Decia_ObjectType]
AFTER INSERT, UPDATE, DELETE
AS
BEGIN
EXEC [dbo].[spDecia_ChangeState_IncrementLatest] NULL, NULL;
END;
GO |
<gh_stars>1-10
CREATE TABLE [dbo].[Rule]
(
[Id] BIGINT NOT NULL PRIMARY KEY IDENTITY(1,1),
[CourseId] VARCHAR(20) NOT NULL,
[Restriction] TINYINT NOT NULL,
[CreatedDate] DATETIME NOT NULL DEFAULT GETDATE(),
[ActiveFrom] DATETIME NOT NULL,
[ActiveTo] DATETIME NULL,
CONSTRAINT [FK_Rule_Apprenticeship] FOREIGN... |
update eg_wf_matrix set additionalrule ='CouncilCommonWorkflow' where id =(select id from eg_wf_matrix where objecttype ='CouncilPreamble' and currentstate='Rejected' and pendingactions is null);
update eg_wf_matrix set additionalrule ='CouncilCommonWorkflow' where id =(select id from eg_wf_matrix where objecttype ='Co... |
CREATE TABLE IF NOT EXISTS assignment (
slug TEXT PRIMARY KEY
CHECK (slug ~ '^[a-z0-9-]+$' AND char_length(slug) < 60),
-- Number of points possible on this assignment.
points_possible smallint NOT NULL
CHECK (points_possible >= 0),
-- If this assignment is still being worked on by the ... |
<reponame>aszego/WhatTheHack
/****** Object: StoredProcedure [Integration].[GetLastETLCutoffTime] Script Date: 4/9/2020 9:00:54 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [Integration].[GetLastETLCutoffTime] @TableName [sysname] AS
BEGIN
SET NOCOUNT ON;
SET XACT_ABORT ON;
S... |
<reponame>bensheldon/panlexicon-rails<filename>app/models/sql/weighted_search_with_pos.sql
WITH
searched_words as (
SELECT
words.*,
:searched_groups_count AS searched_groups_count,
:max_weight AS weight
FROM words
WHERE words.id IN (:searched_word_ids)
),
grouped_words as (
SELEC... |
<filename>sreport/src/main/sql/70-baseline-year.sql
update SR_CAT set questions = REPLACE(questions,'CARBON_REDUCTION_BASELINE_USED,','') where questions like '%CARBON_REDUCTION_BASELINE_USED%';
update SR_QUESTION set
label = 'What is your organisation\'s baseline year?',
hint = 'If you are not sure, use the defa... |
-- Websites have a flag added to allow selection of verification checks on or off.
ALTER TABLE websites ADD COLUMN verification_checks_enabled boolean;
UPDATE websites SET verification_checks_enabled=false;
ALTER TABLE websites ALTER COLUMN verification_checks_enabled SET NOT NULL;
ALTER TABLE websites ALTER COLUMN ve... |
CREATE TABLE DATABASES_ (
DB_ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
DB_NAME VARCHAR(128) NOT NULL UNIQUE,
SPACE_ID INT NOT NULL,
FOREIGN KEY (SPACE_ID) REFERENCES TABLESPACES (SPACE_ID),
UNIQUE INDEX IDX_NAME (DB_NAME)
) |
-- reports
ALTER TABLE `reports`
MODIFY COLUMN `excel_template_name` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL,
MODIFY COLUMN `excel_template` longblob NOT NULL,
MODIFY COLUMN `format` int(1) NOT NULL DEFAULT 1 COMMENT '1 -> Excel';
-- report_progress
ALTER TABLE `report_progress`
DROP COLUMN `sql`;
-- sys... |
-- =============================================
-- Create basic stored procedure template
-- =============================================
-- Drop stored procedure if it already exists
IF EXISTS (
SELECT *
FROM INFORMATION_SCHEMA.ROUTINES
WHERE SPECIFIC_SCHEMA = N'dbo'
AND SPECIFIC_NAME = N'spFindComp... |
### 子查询 功能测试 ###
# 初始化数据
delete from `Baikaltest`.`subselect` ;
insert into `Baikaltest`.`subselect`(id,name1,name2,age1,age2,class1,class2,address1,address2,height1,height2) values(1,'zhangsan1','zhangsan11',10,11,100,101,'zhangsanaddress1','zhangsanaddress11',1000,1001);
insert into `Baikaltest`.`subselect`(id,name1,... |
<reponame>mwleeds/flat-manager<filename>migrations/2019-01-24-101838_add_build_repo/down.sql<gh_stars>10-100
ALTER TABLE builds DROP COLUMN repo;
|
-- This should not default to null (and be UNIQUE) after zamboni takes over all the creation of add-ons
ALTER TABLE addons ADD COLUMN `slug` varchar(30) DEFAULT NULL AFTER `name`, ADD UNIQUE(`slug`);
|
<reponame>mbustamanteAseinfo/configManager
/* Script Generado por Evolution - Editor de Formulación de Planillas. 16-01-2017 3:14 PM */
begin transaction
delete from [sal].[fac_factores] where [fac_codigo] = 'f5949487-5943-449b-ac95-907bca42829e';
insert into [sal].[fac_factores] ([fac_codigo],[fac_id],[fac_descripc... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 12, 2020 at 06:35 AM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.2.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
<gh_stars>0
-- drop view if exists mess.overview_2_5;
drop table if exists mess.overview_2_5;
create table mess.overview_2_5 as
select a.gid as gid,(a.value+b.value)/2 as value from
mess.view_2_5_1 a inner join mess.view_2_5_2 b using (gid);
|
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 15, 2019 at 01:21 PM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
CREATE DATABASE IF NOT EXISTS `db_kependudukan` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `db_kependudukan`;
-- MySQL dump 10.13 Distrib 8.0.16, for macos10.14 (x86_64)
--
-- Host: localhost Database: db_kependudukan
-- ------------------------------------------------------
-- Server version 5.7.25
/*!40101 S... |
-- PL/SQLの基本構文
-- 宣言部
DECLARE
message VARCHAR2(50);
-- 処理部
BEGIN
message := 'Hello, world!';
DBMS_OUTPUT.PUT_LINE('message=' || message);
END; |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Máy chủ: localhost
-- Thời gian đã tạo: Th8 12, 2020 lúc 07:10 PM
-- Phiên bản máy phục vụ: 10.4.13-MariaDB
-- Phiên bản PHP: 7.2.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
<reponame>chengtao511322/drive-cloud-master
/*
Navicat MySQL Data Transfer
Source Server : mysql5.0
Source Server Version : 50719
Source Host : 172.16.31.10:3304
Source Database : fast-cloud
Target Server Type : MYSQL
Target Server Version : 50719
File Encoding : 65001
Date: 2021-0... |
<filename>SEL/sql/sel_drop_tables.sql
DROP TABLE dbresprod.dbo.SEL_UPDATES;
DROP TABLE dbresprod.dbo.SEL_READINGS;
DROP TABLE dbresprod.dbo.SEL_ALARMS;
DROP TABLE dbresprod.dbo.SEL_REQUESTS;
DROP TABLE dbresprod.dbo.SEL_OUTPUTS;
DROP TABLE dbresprod.dbo.SEL_MEASURE_UNITS;
DROP TABLE dbresprod.dbo.SEL_TYPES;
DROP TABLE ... |
-- MySQL dump 10.13 Distrib 5.7.26, for Linux (x86_64)
--
-- Host: localhost Database: nogorhat_db
-- ------------------------------------------------------
-- Server version 5.7.26-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE... |
<filename>MvcAngularBlog/Data/SQL Scripts/dbo.tbl_ArticleComment.sql
CREATE TABLE [dbo].[tbl_ArticleComment] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[Article_Id] INT NOT NULL,
[Comment_Id] INT NOT NULL,
PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [FK_Article] FOREIGN KEY ([Article_Id]) REFERE... |
DROP TABLE discounts;
DROP TYPE discount_type CASCADE; |
INSERT INTO `user` (`id`,`email`,`created_at`,`updated_at`,`deleted_at`,`password_hash`,`username`,`email_confirmation`) VALUES (1,'<EMAIL>','2020-04-12 19:35:32',NULL,NULL,'NjU0MzIx',NULL,NULL);
INSERT INTO `user` (`id`,`email`,`created_at`,`updated_at`,`deleted_at`,`password_hash`,`username`,`email_confirmation`) VAL... |
<filename>sql/postgres/20200728.sql
UPDATE repositories SET repo_oai_name = REPLACE(REPLACE(SUBSTRING(homepage_url,9),'/','-'),'www.','') where homepage_url like 'https%' and (repo_oai_name = '' or repo_oai_name is null);
UPDATE repositories SET repo_oai_name = REPLACE(REPLACE(SUBSTRING(homepage_url,8),'/','-'),'www.',... |
clear columns
clear break
clear computes
set line 200
set pagesize 60
-- comment this line to see variable subtitution
set verify off
col name format a30 head 'S=STATUS O=NAME'
col partition format a30 head 'S=TIMESTAMP O=PARTITION'
-- get level and object name
col table_owner new_value table_owner noprint
col st... |
-- MySQL Script generated by MySQL Workbench
-- Fri Nov 13 10:57:33 2020
-- 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;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON... |
<filename>highwayshop.sql<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- ホスト: 127.0.0.1
-- 生成日時:
-- サーバのバージョン: 10.4.11-MariaDB
-- PHP のバージョン: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... |
<filename>yama/db_schema.sql
DROP DATABASE `yama`;
CREATE DATABASE `yama`;
CREATE TABLE `yama`.`url_s0` (
`id` int(1) NOT NULL AUTO_INCREMENT,
`hostname` varchar(255) NOT NULL,
`port` smallint(1) unsigned NOT NULL DEFAULT 80,
`path` varchar(2048) NOT NULL,
`is_malware` boolean NOT NULL DEFAULT TRUE,
... |
-- file:boolean.sql ln:53 expect:true
SELECT bool 'off_' AS error
|
<reponame>mitring/cuba
-- Rename VALUE columns
alter table SEC_USER_SETTING rename VALUE to VALUE_;
alter table SYS_CONFIG rename VALUE to VALUE_;
alter table SEC_PERMISSION rename VALUE to VALUE_;
|
<filename>conf/evolutions/default/1.sql
# Users schema
# --- !Ups
CREATE TABLE Product (
id BIGINT(8) NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
price BIGINT(8) NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO Product (name, price) VALUES ('Product 1', 340);
INSERT INTO Product (name, price) VALUE... |
<filename>moneytransfer-api/src/test/resources/data.sql
INSERT INTO CUSTOMER (id, name, lastname) VALUES (123, 'Lorenzo', 'Gagliani');
INSERT INTO CUSTOMER (id, name, lastname) VALUES (222, 'Filippo', 'Alberti');
INSERT INTO CUSTOMER (id, name, lastname) VALUES (333, 'Mario', 'Rossi');
INSERT INTO CUSTOMER (id, name, l... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.3
-- Dumped by pg_dump version 13.1
-- Started on 2021-08-03 19:17:13 CEST
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_c... |
<reponame>Ed-Fi-Exchange-OSS/Credential-Manager<filename>Database/EdFiAdmin/2-AuditEntry.sql<gh_stars>1-10
CREATE TABLE [dbo].[AuditEntry] (
[AuditEntryId] INT NOT NULL IDENTITY,
[EntityTypeName] VARCHAR(255) NOT NULL,
[State] INT NOT NULL,
[StateName] VARCHAR(255) NOT NULL,
[CreatedBy] VAR... |
<gh_stars>1-10
INSERT INTO sec.system (code,name,description) VALUES ('test_system','Тестовая система','Тестовая система'),
('access','Подсистема безопасности и авторизации','Единая подсистема безопасности и авторизации'); |
<gh_stars>1-10
ALTER TABLE keypair ADD COLUMN certificate_repository_location char varying(2000);
UPDATE keypair kp
SET certificate_repository_location = '${online.repository.uri}' || substr(ca.uuid, 1, 2) || '/' || substr(ca.uuid, 3) || '/1/'
FROM certificateauthority ca
WHERE kp.type = 'HOSTED'
A... |
<reponame>Impactstory/unpaywall-export
create temp table tmp_pmcid_lookup (like pmcid_lookup);
\copy tmp_pmcid_lookup (doi, pmcid, release_date) from _CSV_FILE_ csv header
update tmp_pmcid_lookup set doi = lower(doi), pmcid = lower(pmcid);
begin;
delete from pmcid_lookup;
insert into pmcid_lookup (doi, pmcid, release... |
-- MySQL dump 10.13 Distrib 5.7.22, for Linux (x86_64)
--
-- Host: localhost Database: cube
-- ------------------------------------------------------
-- Server version 5.7.22-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_R... |
INSERT INTO `navigations` ( `tier_1`, `tier_2`, `tier_3`, `tier_4`, `worker`, `label`, `order`, `disabled`) VALUES
( 2, 5, 0, 0, 'com.ecbeta.app.engine.controller.AttachmentController', '文件管理', 0, 0)
;
|
-- add a WHERE clause to get rows with the category "food"
-- then group the results by the purchased_at and character_name columns
SELECT SUM(price),purchased_at,character_name
FROM purchases
WHERE category = "food"
GROUP BY purchased_at,character_name
; |
<filename>DB/api_student.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 27, 2020 at 05:43 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 ... |
CREATE TABLE [dbo].[Statuses]
(
[Id] INT NOT NULL PRIMARY KEY IDENTITY(1,1),
[Status] NVARCHAR(50) NOT NULL,
[CreatedAt] DATETIME2 NOT NULL DEFAULT GetDate(),
[UpdatedAt] DATETIME2 NULL
)
|
--
-- PostgreSQL database sql
--
CREATE SCHEMA blog;
CREATE SCHEMA user_management;
CREATE TABLE blog.article (
id bigint NOT NULL,
article_status_type character varying(255) NOT NULL,
content character varying(255) NOT NULL,
created_by character varying(255),
created_on timestamp without time z... |
SELECT
DepositGroup,
SUM(DepositAmount) AS [TotalSum]
FROM WizzardDeposits
WHERE MagicWandCreator LIKE '%Ollivander%'
GROUP BY DepositGroup |
<reponame>kotuk/stalker-portal-4.9.x
--
CREATE TABLE IF NOT EXISTS `media_favorites`(
`id` int NOT NULL auto_increment,
`uid` int NOT NULL default 0,
`favorites` text not null,
`modified` timestamp not null,
PRIMARY KEY (`id`),
UNIQUE KEY (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--//@UNDO |
<gh_stars>1-10
CREATE TABLE crawler_sites(
id BIGSERIAL PRIMARY KEY,
name VARCHAR(32) NOT NULL,
url VARCHAR(255) NOT NULL,
cron VARCHAR(255) NOT NULL,
version BIGINT NOT NULL DEFAULT 0,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL
);
CREATE UNIQUE I... |
<gh_stars>100-1000
-- limit.test
--
-- execsql {
-- SELECT * FROM t6 LIMIT -1 OFFSET 1
-- }
SELECT * FROM t6 LIMIT -1 OFFSET 1 |
<% if (!auth.user.id) { %>
select 0 where false;
<% } else { %>
select distinct tf.tag_id as id, t."en-US" as label
from tag_followers tf
left join tags t on (tf.tag_id = t.id)
where tf.user_id = '<%= auth.user.id %>'
and tf.deleted_date is null
and t.deleted_date is null
order by label;
<% } %>
|
<filename>src/main/resources/sql/update/osi/organisms/update-template.sql
-- Update an organism's template pattern
--
-- Expected inputs:
-- 1. string New template string
-- 2. int32 Organism ID
UPDATE
osi.organisms
SET
template = ?
WHERE
organism_id = ?
;
|
------------------------------------------------------------------------------------------------
--- NOTE: THIS FILE IS COMPLETELY GENERATED FROM extractRecords.sql DO NOT EDIT MANUALLY
--- UNLESS ABSOLUTELY NECESSARY
------------------------------------------------------------------------------------------------
-... |
<reponame>mvlm/counter-strike-docker
CREATE TABLE `ps_awards` (
`id` int(10) unsigned NOT NULL default '0',
`awardid` int(10) unsigned NOT NULL default '0',
`awardtype` enum('player','weapon','weaponclass') NOT NULL default 'player',
`awardname` varchar(128) NOT NULL default '',
`awarddate` date NOT NULL,
`... |
CREATE TABLE IF NOT EXISTS ANNOTATION_REPLICATION(
OBJECT_TYPE ENUM ('SUBMISSION','ENTITY') NOT NULL,
OBJECT_ID BIGINT NOT NULL,
OBJECT_VERSION BIGINT NOT NULL,
ANNO_KEY VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
ANNO_TYPE ENUM('STRING','LONG','DOUBLE','DATE','BOOLEAN') NOT NULL,
MAX_STRING_... |
<filename>orcas_integrationstest/tests/test_table_compression_partition_range/erzeuge_zielzustand.sql
create table tab_part_mod_compress_dl
(
col1 number(15) not null,
col2 number(15) not null
)
partition by range (col1,col2)
(
partition part_10 values less than (10,5),
partition part_20 values less than (max... |
<reponame>aabarmin/database-metadata-extractor
select col.owner as schema_name,
col.table_name,
col.COLUMN_ID,
col.column_name,
col.data_type,
decode(char_length,
0, data_type,
data_type || '(' || char_length || ')') as data_type_ext,
col.data_length... |
<filename>gpdb/contrib/postgis/raster/test/regress/rt_set_band_properties.sql<gh_stars>1-10
-----------------------------------------------------------------------
-- $Id$
--
-- Copyright (c) 2010 <NAME> <<EMAIL>>
--
-- This is free software; you can redistribute and/or modify it under
-- the terms of the GNU General P... |
<filename>sql/indexes.sql<gh_stars>100-1000
CREATE UNIQUE INDEX `login` ON `ghtorrent`.`users` (`login` ASC) COMMENT '';
CREATE UNIQUE INDEX `sha` ON `ghtorrent`.`commits` (`sha` ASC) COMMENT '';
CREATE UNIQUE INDEX `comment_id` ON `ghtorrent`.`commit_comments` (`comment_id` ASC) COMMENT '';
CREATE INDEX `follower_i... |
-- MySQL dump 10.13 Distrib 5.6.39, for FreeBSD11.1 (amd64)
--
-- Host: localhost Database: yii2basic
-- ------------------------------------------------------
-- Server version 5.6.39-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESU... |
<filename>src/server apps/DiFYCore/DiFYWebApp/Database/Migrations/1_0_0_0/0002_add_friendship.sql<gh_stars>0
GO
CREATE SCHEMA [social]
AUTHORIZATION [dbo];
GO
CREATE TABLE [social].[Friendship]
(
[Id] UNIQUEIDENTIFIER NOT NULL,
[RequesterId] UNIQUEIDENTIFIER NOT NULL,
[AddresseeId] UNIQUEIDENTIFIER NO... |
CREATE TABLE IF NOT EXISTS livestock_maps_audit
( audit_id SERIAL PRIMARY KEY
, action_type CHAR(1) NOT NULL -- i (insert), b (before update), a (after update), d (delete)
, user_id INT NOT NULL
, action_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP
, id INT
, target_id INT NOT NULL
);
CREATE OR REPLACE FUNCTION li... |
<gh_stars>0
-- Q1:1 Nisan 2007 tarihten sonra ödeme yapan müşterileri listeleyen bir sorgu yazınız.
select DISTINCT(c.email),c.first_name, c.last_name, p.payment_date
FROM customer AS c
INNER JOIN payment AS p
ON c.customer_id = p.customer_id
where p.payment_date > '2007-04-01' ;
-- Q2:Aksiyon ve Animasyon kategor... |
<gh_stars>0
LOAD DATA INFILE '/app/data/tsv_files/bbig_expr_all_genes.tsv' INTO TABLE bbig_expr_all_genes FIELDS TERMINATED BY '\t' IGNORE 1 LINES;
|
/*
Warnings:
- The primary key for the `Graphics` table will be changed. If it partially fails, the table could be left without primary key constraint.
- The primary key for the `Processor` table will be changed. If it partially fails, the table could be left without primary key constraint.
- The primary key f... |
-- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 14, 2016 at 08:15 AM
-- Server version: 5.6.11
-- PHP Version: 5.5.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
<reponame>AlexHowansky/ork-crom
DROP TABLE IF EXISTS new_york
DROP TABLE IF EXISTS alaska
|
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1
-- Время создания: Июл 29 2016 г., 18:00
-- Версия сервера: 10.1.13-MariaDB
-- Версия PHP: 5.6.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... |
<reponame>ready-4-stage/stage<filename>stage-server/src/main/resources/sql/lesson/lesson_update.sql
UPDATE LESSON
SET BEGIN = ?,
END = ?,
ROOM_ID = ?,
TEACHER_ID = ?,
LESSONTYPE_ID = ?,
CONTENT = ?
WHERE ID = ?;
|
DROP TABLE ptcore.in_user_goal_photo CASCADE;
DROP TABLE ptcore.in_user_goal_has_in_user_goal_photo CASCADE;
CREATE TABLE ptcore.in_user_photo (
id BIGSERIAL PRIMARY KEY NOT NULL,
created TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT now(),
goal_id BIGINT NOT NULL,
file_name VARCHAR(200) NOT NULL DEFAUL... |
-- file:plpgsql.sql ln:1278 expect:true
insert into PSlot values ('PS.first.b5', 'PF1_1', '', 'WS.102.3a')
|
-- original: without_rowid6.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
CREATE TABLE t1(a,b,c,d,e, PRIMARY KEY(a,b,c,a,b,c,d,a,b,c)) WITHOUT ROWID;
CREATE INDEX t1a ON t1(b, b);
WITH RECURSIVE
c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<1000)
INSERT INTO t1(a,b,c,d,e) SELEC... |
<filename>DBADash/SQL/SQLWaits.sql
SELECT wait_type,
waiting_tasks_count,
wait_time_ms,
signal_wait_time_ms
FROM sys.dm_os_wait_stats WITH (NOLOCK)
WHERE [wait_type] NOT IN ( N'BROKER_EVENTHANDLER', N'BROKER_RECEIVE_WAITFOR', N'BROKER_TASK_STOP', N'BROKER_TO_FLUSH',
N'BR... |
-- exec statements separated
ALTER TYPE xplan_gml.xp_zweckbestimmunggruen ADD VALUE '10000' AFTER '1000';
ALTER TYPE xplan_gml.xp_zweckbestimmunggruen ADD VALUE '10001' AFTER '10000';
ALTER TYPE xplan_gml.xp_zweckbestimmunggruen ADD VALUE '10002' AFTER '10001';
ALTER TYPE xplan_gml.xp_zweckbestimmunggruen ADD VALUE '10... |
CREATE SCHEMA [PaymentGateway]
AUTHORIZATION [dbo]
GO
|
<gh_stars>1-10
-- DROP SEQUENCES
DROP SEQUENCE IF EXISTS sq_tb_app CASCADE;
DROP SEQUENCE IF EXISTS sq_tb_discipline CASCADE;
DROP SEQUENCE IF EXISTS sq_tb_lesson CASCADE;
DROP SEQUENCE IF EXISTS sq_tb_educational_content CASCADE;
DROP SEQUENCE IF EXISTS sq_tb_user CASCADE;
-- DROP TABLES
DROP TABLE IF EXISTS tb_app... |
<reponame>bugcodes/transaction-practice
create table transaction_user
(
id int not null auto_increment
primary key,
name varchar(32) null,
account int null,
balance decimal(20,3) null,
update_time timestamp default CURRENT_TIMESTAMP not null,
create_time timestamp default '0000-00-00 00:00:00' not null,
status... |
<gh_stars>1-10
@derived_cohort_table_create
DELETE FROM @cohort_database_schema.@cohort_table
WHERE cohort_definition_id IN (SELECT cohort_id FROM #DERIVED_COHORT_XREF)
;
INSERT INTO @cohort_database_schema.@cohort_table (
cohort_definition_id,
subject_id,
cohort_start_date,
cohort_end_date
)
SELECT
x.coho... |
<filename>oracle/diag/sql/sessions-whr-username.sql
/*
* Copyright 2016 Amazon.com, Inc. or its affiliates.
* All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located ... |
<reponame>clouserw/olympia
ALTER TABLE `approvals`
DROP FOREIGN KEY `approvals_ibfk_2`;
ALTER TABLE `approvals` ADD CONSTRAINT `approvals_ibfk_2`
FOREIGN KEY `approvals_ibfk_2` (`file_id`)
REFERENCES `files` (`id`)
ON DELETE CASCADE;
|
<reponame>Zhaojia2019/cubrid-testcases
--insert into DATETIME(L)TZ columns without constraints
drop table if exists tz_test;
create table tz_test(
id int,
ts datetime,
tsltz datetime with local time zone,
tstz datetime with time zone
);
--test: insert ... values, one row
insert into tz_test values (1, datetime... |
<gh_stars>0
CREATE TABLE `zonealiases` (
`zoneID` int(10) unsigned NOT NULL auto_increment,
`alias` varchar(255) NOT NULL,
PRIMARY KEY (`zoneID`,`alias`),
CONSTRAINT `FK_zonealiases_1` FOREIGN KEY (`zoneID`) REFERENCES `zones` (`zoneID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET... |
CREATE TABLE [dbo].[QueryNameHistory]
(
Id int identity not null primary key,
RevisionId int not null,
QueryId int NOT NULL,
UserId int,
Name nvarchar(100),
[Description] nvarchar(1000)
)
|
<filename>init.sql
-- Script per inizializzazione db
CREATE TABLE IF NOT EXISTS tracked_point (
id serial PRIMARY KEY NOT NULL,
code integer UNIQUE NOT NULL,
point_name varchar(50) NOT NULL,
description text NULL,
location geometry(Point, 4326) NOT NULL
);
CREATE TABLE IF NOT EXISTS gatherings_de... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 03, 2021 at 11:17 AM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 7.4.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
USE Diablo
GO
DECLARE @UserId INT = (
SELECT Id
FROM Users
WHERE Username = 'Stamat')
DECLARE @GameId INT = (
SELECT Id
FROM Games
WHERE [Name] = 'Safflower')
DECLARE @UserGameId INT = (
SELECT Id
FROM UsersGames
WHERE UserId = @UserId AND GameId = @GameId)
BEGIN TRANSACTION
DECLARE @Us... |
SET DEFINE OFF;
ALTER TABLE AFW_12_UTILS_AVATR ADD (
CONSTRAINT AFW_12_UTILS_AVATR_UK1
UNIQUE (REF_UTILS, REF_DOMN)
ENABLE VALIDATE)
/
|
<gh_stars>1-10
CREATE TABLE [sqlparse].[RepoObject_SqlModules] (
[RepoObject_guid] UNIQUEIDENTIFIER NOT NULL,
[sql_modules_dt] DATETIME CONSTRAINT [DF__RepoObjec__sql_m__19AACF41] DEFAULT (getdate()) NOT NULL,
[sql_modules_formatted] NVARCHAR (MAX) NULL,
[sql_modules_for... |
SET NAMES utf8mb4;
CREATE TABLE `agents` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '实例ID',
`alias` varchar(32) NOT NULL DEFAULT '' COMMENT '别名',
`ip` varchar(100) NOT NULL DEFAULT '' COMMENT 'IP地址',
`port` varchar(100) NOT NULL DEFAULT '' COMMENT '端口号',
`status` tinyint(4) NOT NULL DEFAULT 0 C... |
SELECT printerusa0_.printer_usage_log_id AS printer1_14_0_,
account4_.account_id AS account1_0_1_,
printerusa0_.usage_date AS usage2_14_0_,
printerusa0_.usage_day AS usage3_14_0_,
printerusa0_.used_by_user_id AS used4_14... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.