sql stringlengths 6 1.05M |
|---|
CREATE PROCEDURE [dbo].[InsTag]
@Code VARCHAR(50),
@Name VARCHAR(50)
AS
INSERT INTO [dbo].[Tag] (Code, [Name])
VALUES
(
@Code,
@Name
)
RETURN SCOPE_IDENTITY()
|
<gh_stars>0
/*
This procedure takes a list of years, semesters, and departments in the following format... '2016,2017,2015' ... as an argument
and returns a list of course numbers.
*/
IF EXISTS(SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE SPECIFIC_NAME = 'sp_GetDepartments')
DROP PROCEDURE sp_GetDepartments
GO
... |
<reponame>treebat1/SQL
if OBJECT_ID('tempdb.dbo.#tempDBName') is null
BEGIN
create table #tempDBName
(idid int not null identity(1,1)
, DBName varchar(100))
end |
<filename>pizzadb/CreateTableOrders.sql
create table Orders
(
OrderID int identity(1, 1) primary key not null,
Name nvarchar(255),
Address nvarchar(255),
ZipCode nvarchar(255),
OrderDate Datetime,
DeliveryCharge decimal,
TotalValue decimal
) |
-- Demo PostgreSQL Database initialisation
CREATE USER testuser PASSWORD '<PASSWORD>';
CREATE USER tm351 PASSWORD '<PASSWORD>';
CREATE USER tm351_student PASSWORD '<PASSWORD>';
CREATE USER tm351admin PASSWORD '<PASSWORD>' SUPERUSER;
CREATE USER jovyan PASSWORD '<PASSWORD>' SUPERUSER;
DROP TABLE IF EXISTS quickdemo CA... |
<reponame>jisilvia/SQL_Data_Requests
-- sakila Database
/*
1. Select all columns from the film table for PG-rated films. (1 point)
*/
SELECT *
FROM film
WHERE rating = "PG";
/*
2. Select the customer_id, first_name, and last_name for the active customers (0 means inactive). Sort the customers by their last name and ... |
<reponame>wahyufaturrizky/PT-Mulia-Sawit-Agro-Lestari-Group-WahyuFaturRizki<filename>database/msalgroup.sql
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 30, 2020 at 05:34 AM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.2.25
SET SQL_MODE = ... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.3.11
-- Generation Time: Jul 19, 2021 at 05:16 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 7.4.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... |
INSERT INTO department (name)
VALUES ("Therapy"),
("Nursing"),
("Food Services"),
("Maintenance");
INSERT INTO role (title, salary, department_id)
VALUES ("Rehab Aid", 35000, 1),
("Physical Therapist", 85000, 1),
("Occupational Therapist", 85000, 1),
("Exercise Specialist", 4... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 18 Okt 2019 pada 13.28
-- Versi server: 10.4.6-MariaDB
-- Versi PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
delete from issue where id > 0;
delete from project where id > 0;
ALTER SEQUENCE project_id_seq RESTART WITH 56;
ALTER SEQUENCE issue_id_seq RESTART WITH 11; |
<reponame>Bajix/channel-loader-rs
CREATE TABLE content (
id serial PRIMARY KEY,
title varchar(256) NOT NULL
);
CREATE TABLE users_content (
user_id serial REFERENCES users(id),
content_id serial REFERENCES content(id),
PRIMARY KEY (user_id, content_id)
); |
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <NAME>
-- Create date: 04/05/2021
-- Description: Reads a Geomap based on its code
-- exec Data_GeoMap_Read 'c9989202b75921e3a062ca6942b3d8aa'
-- =============================================
CREATE
OR
ALTE... |
TRUNCATE TABLE PROTO_CORRESP_TEMPL DROP STORAGE
/
|
create table blocked_transactions_table
(transaction_id xid, detection_time_stamp timestamp) without oids;
create table malicious_transactions_table
(transaction_id xid, detection_time_stamp timestamp) without oids;
CREATE OR REPLACE FUNCTION alertMTxn(etxid bigint)
RETURNS void AS $$
DECLARE
dummy xid := etx... |
/*
Navicat MySQL Data Transfer
Source Server : zh
Source Server Version : 50617
Source Host : localhost:3306
Source Database : zaih
Target Server Type : MYSQL
Target Server Version : 50617
File Encoding : 65001
Date: 2017-11-07 18:16:07
*/
SET FOREIGN_KEY_CHECKS=0;
-- -----------... |
CREATE TABLE IF NOT EXISTS film
(
id SERIAL primary key,
file varchar(255),
name varchar(255),
production_year int,
explanation varchar(255),
view int default 0,
price int DEFAULT 0,
score numeric default 0
)
|
SELECT
push_messages.id as id,
push_messages.push_device_id as push_device_id,
push_messages.push_channel_id as push_channel_id,
push_messages.push_channel_message_id as push_channel_message_id,
push_messages.stamp as stamp,
push_messages.data as data
FROM push_messages, push_devices, push_channels
WHERE pu... |
UPDATE selfservice_errors SET seen_at = '1980-01-01 00:00:00' WHERE seen_at = NULL |
DROP TABLE IF EXISTS FILTER;
Create table FILTER(
REC_ID int
); |
ALTER TABLE orders
add checkout_url text;
ALTER TABLE orders
add checkout_url_expires timestamp;
alter table payments
alter column created_by drop not null;
|
<filename>create_tables_entries.sql
CREATE TABLE IF NOT EXISTS `Entries_00` (base binary(30) NOT NULL, idr binary(16) NOT NULL, path varchar(128) DEFAULT NULL, hash varchar(32) DEFAULT NULL, offset int(11) DEFAULT NULL, len int(11) DEFAULT NULL, lat decimal(8,5) DEFAULT NULL, lng decimal(8,5) DEFAULT NULL, q0 bigint(20... |
<filename>migrations/185-blocklist-dates.sql
UPDATE blitems SET created="2010-08-11", modified="2010-08-11" WHERE details_id=1;
UPDATE blitems SET created="2009-05-03", modified="2009-05-03" WHERE details_id=2;
UPDATE blitems SET created="2008-05-07", modified="2008-05-07" WHERE details_id=3;
UPDATE blitems SET created... |
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 17, 2020 at 06:39 PM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>martilad/MI-EDW2019
-- Dumped from database version 9.5.16
-- Dumped by pg_dump version 9.5.16
-- Started on 2019-05-03 16:56:41
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET ch... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 16, 2021 at 03:37 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.1.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 30, 2017 at 03:30 PM
-- Server version: 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";
/*!4... |
<filename>pglScripts/categorias.sql
-- Table: public.categorias
-- DROP TABLE public.categorias;
CREATE TABLE public.categorias
(
id_categ integer NOT NULL DEFAULT nextval('categoria_id_categ_seq'::regclass),
categ_nome character varying(55),
CONSTRAINT categ_id PRIMARY KEY (id_categ)
)
WITH (
OIDS=FALSE
);
... |
<reponame>plainenough/pinehphone_testing
CREATE TABLE TestBank (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
test_name VARCHAR(32) NOT NULL,
test_steps VARCHAR(512) NOT NULL,
test_description VARCHAR(64) NOT NULL,
creator INT UNSIGNED NOT NULL,
active BOOLEAN DEFAULT FALSE,
creation_date TIMESTAMP NOT NULL DEFAULT CURRENT... |
<filename>ph2-solutions.sql
/* SQL "Sakila" database query exercises - phase 1 */
-- Database context
USE sakila;
-- Your solutions...
1a.
select first_name, last_name
from actor
1b.
select concat (first_name,' ',last_name) as ActorName
from actor
2a.
select actor_id, first_name, last_name
from actor
where first_na... |
CREATE TABLE HelloWorld (
HelloWorldId INT IDENTITY NOT NULL,
Declaration nvarchar(1000) NULL,
CONSTRAINT PK_HelloWorld PRIMARY KEY CLUSTERED (HelloWorldId)
);
CREATE TABLE HelloWorld2 (
HelloWorldId2 INT IDENTITY NOT NULL,
Declaration2 nvarchar(1000) NULL,
CONSTRAINT PK_HelloWorld PRIMARY KEY ... |
SELECT s.id, s.username, SUM(sk.total_questions_asked) AS Grand_total_questions_asked, COUNT(sk.kanji_id) AS kanji_tracked
FROM student s
JOIN student_kanji sk ON s.id = sk.student_id
GROUP BY s.username
ORDER BY s.id |
<reponame>RobertDurfee/Flights<gh_stars>0
USE `Schedule`;
SELECT DISTINCT `Departure`.`ICAOCode`,
COUNT(*) AS `FlightsFrom`
FROM `Schedule`
INNER JOIN `Flight`
ON `Schedule`.`FlightID` = `Flight`.`FlightID`
INNER JOIN `Departure`
ON `Schedule`.`ScheduleID` = `Departure`.`ScheduleID`
WHERE `Schedule`.`Type` = 'ar... |
select
count(*) as failures,
count(*) != 0 as should_warn,
count(*) != 0 as should_error
from (
select
campaign_noun as unique_field,
count(*) as n_records
from "quasar_prod_warehouse"."public"."campaign_info"
where campaign_noun is not null
group by campaign_noun
having... |
Drop Trigger T2;
|
<reponame>EL-BID/nexso
CREATE PROCEDURE [dbo].[dnn_GetSharedModulesWithPortal]
@Portald int
AS
SELECT * FROM dbo.dnn_vw_TabModules tb
WHERE tb.PortalID != tb.OwnerPortalID
AND tb.PortalID = @Portald
|
<filename>setup/extensions.sql<gh_stars>1-10
create extension if not exists postgis;
create extension if not exists pg_trgm;
create extension if not exists unaccent;
create extension if not exists tablefunc;
|
<filename>news_collector/db_creation.sql
CREATE DATABASE `newscollector_db` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */;
CREATE TABLE `feed_entries` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`url` varchar(500) DEFAULT NULL,
`source` varchar(45) DEFAULT NULL,
`seccion` varchar(140) DEFAULT NULL,... |
INSERT INTO "Jutsu" ("id", "name", "description", "kanji", "romaji", "portugues", "games", "mangaPanini", "tvBrasileira", "range", "rank", "handSeals") VALUES
(490, E'Círculo de Areia', E'Gaara ataca seu oponente com uma pequena formação de areia semelhante a um braço, vindo de baixo. Em seguida, ele usa sua areia emba... |
\set ON_ERROR_STOP 1
BEGIN;
CREATE TABLE area_containment (
descendant INTEGER NOT NULL, -- PK, references area.id
parent INTEGER NOT NULL, -- PK, references area.id
depth SMALLINT NOT NULL
);
CREATE OR REPLACE FUNCTION a_ins_l_area_area_mirror() RETURNS trigger AS $$
... |
-- file:limit.sql ln:46 expect:true
fetch backward all in c1
|
-- TABLES
ALTER TABLE `bx_cnl_pics` CHANGE `size` `size` bigint(20) NOT NULL;
ALTER TABLE `bx_cnl_pics_resized` CHANGE `size` `size` bigint(20) NOT NULL;
|
-- File Name : list_table_mayor.sql
-- Author : <NAME>
-- Description : Lista el top indicado o en su defecto 10, de las tablas de mayor consumo
-- de espacio del schema especificado o en su defecto todos los schemas.
-- Tambien puede filtrar las tablas particionadas agregando un 3er parametro
-- ... |
<gh_stars>1-10
/* DELETE QUERY */
/*=============== GAMEOBJECT ===============*/
DELETE FROM `gameobject_names` WHERE entry = '180797';
DELETE FROM `gameobject_spawns` WHERE entry = '178425';
DELETE FROM `gameobject_spawns` WHERE entry = '178426';
DELETE FROM `gameobject_spawns` WHERE entry = '178428';
DELETE FROM `gam... |
<reponame>nixj14/pic-sure-gic-institution
use auth;
update connection set requiredFields = "[]" where id = "manual-token"; |
SELECT
ORDER_TYPE_KEY,
PROVIDE_REQUEST_TYPE,
ACQUISITION_TYPE,
ORDER_TYPE_CODE,
PARENT_ORDER_TYPE_CODE,
MD_INS_TS,
MD_CURR_FLAG
FROM ODW_ORDER_TYPE_DIM
WHERE (
MD_INS_TS >= '{from_ts}'
AND MD_INS_TS < '{to_ts}'
);
|
-------------------------------------------------------------------------
-- Update API keys which have expired. These ones won't expired.
-------------------------------------------------------------------------
-- For stroom
-- NB: If you update this insert you must remember to update Base_IT too, otherwise the inte... |
<reponame>chloxen95/RspamdConfiguration
/*
Navicat MySQL Data Transfer
Source Server : root@localhost:3306
Source Server Version : 50718
Source Host : localhost:3306
Source Database : rspamd
Target Server Type : MYSQL
Target Server Version : 50718
File Encoding : 65001
Date: 2017-0... |
DROP STAGE IF EXISTS test_stage;
CREATE STAGE test_stage url='s3://load/files/' credentials=(access_key_id='1a2b3c' secret_access_key='4x5y6z');
DROP STAGE test_stage;
DROP STAGE IF EXISTS test_stage;
DROP STAGE test_stage; -- {ErrorCode 4060}
|
drop table test_cleansing;
create table test_cleansing (contract_id string, cdate string, user_id string, prod_code string,
store_code string, birth_date string, nationality string);
insert into test_cleansing values
("cid000000007","2015-05-15","uid0035874","04_04_003_0010","1044","1972-02... |
select id, name, lifecycle_state
from oci.oci_cloud_guard_responder_recipe
where name = '{{ resourceName }}'; |
select count(*)
from `workers`
group by `salary` * `id_department`
having `salary` * `id_department` is not null |
set optimization level 513;
CREATE CLASS [test_h];
CREATE CLASS [test_d];
CREATE CLASS [test_d_u];
CREATE CLASS [test_p_d];
CREATE CLASS [test_s];
CREATE CLASS [test_b] REUSE_OID;
ALTER CLASS [test_h] ADD ATTRIBUTE
[c_n] character varying(30) NOT NULL,
[c1] character varying(30) NOT NULL,
[t_h_n]... |
<filename>database/UPDATE bd_siguemed V1.2.sql
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: <NAME>
* Created: 11/12/2018
*/
ALTER TABLE `paciente` ADD `email` T... |
<filename>db/tables/tbl_oas.sql
create table oas (
objectid integer not null,
oa11cd character(9) not null,
lad11cd character(9) not null,
st_areasha numeric,
st_lengths numeric,
geom geometry,
constraint pk_oas_id primary key (objectid)
); |
<gh_stars>0
-- IV)
-- Contrainte : auto-jointure
-- Trouver des paires de produits de catégories différentes dont le prix à un moment donné été le même (pas forcément simultanément)
-- Remarque : Requête pas très intéressante.
SELECT PR1.nom AS nom_produit_1, PR1.id_produit, PR2.nom AS nom_produit_2, PR2.id_produit
FRO... |
<filename>nataliya_zhuravleva.sql
-- MySQL dump 10.13 Distrib 8.0.15, for macos10.14 (x86_64)
--
-- Host: localhost Database: nataliya_zhuravleva
-- ------------------------------------------------------
-- Server version 8.0.15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CH... |
<reponame>mikeyangyo/tasks-management-system
CREATE TABLE IF NOT EXISTS tasks (
id INT(11) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30) NOT NULL,
status INT(1) NOT NULL DEFAULT 0
);
ALTER TABLE tasks ADD INDEX (status);
|
-- $$varname$$ /.*/
SELECT *
FROM [dbo].[MC_GLOBAL_VARIABLES] WITH(nolock)
WHERE VARNAME = '$$varname$$'
ORDER BY VarCategory DESC
|
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[EventCalendarRecurrences]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[EventCalendarRecurrences](
[RecurrenceId] [int] NOT NULL,
[Name] [nvarchar](250) COLLATE SQL_Latin1_General_CP1_CI_AS... |
<gh_stars>1-10
USE AutoDealershipDemo;
GO
-----
-- Copy out Index Usage
IF OBJECT_ID('tempdb.dbo.#tmpIndexUsageBefore') IS NOT NULL
DROP TABLE #tmpIndexUsageBefore;
SELECT
indexes.Name AS IndexName,
dm_db_index_usage_stats.user_seeks,
dm_db_index_usage_stats.user_scans,
dm_db_index_usage_stats.us... |
CREATE TABLE \p ()
SELECT * FROM \p\") \r or die 'Cannot prepare: ' . $dbh->errstr();\r$sth->execute() or die 'Cannot execute: ' . $sth->errstr();\r\p\r$sth->finish();" " select
|
-- <one line to give the program's name and a brief idea of what it does.>
-- Copyright (C) <year> <name of author>
CREATE TABLE llx_books(
rowid INTEGER AUTO_INCREMENT PRIMARY KEY,
ref VARCHAR(30) NOT NULL,
name VARCHAR(100) NOT NULL,
`desc` VARCHAR(255) NULL,
type INTEGER NOT NULL,
... |
<reponame>aliostad/deep-learning-lang-detection
CREATE TABLE ShowInfo (
show_id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT,
director TEXT,
musical_director TEXT,
show_info TEXT,
page_live_date DATETIME,
reserve_live_date DATETIME
);
CREATE TABLE Performances (
show_id INTEGER,
p_id IN... |
SELECT
a.attrelid::regclass::text AS table_name,
a.attname AS column_name,
v.oid::regclass::text AS dependent_name,
v.relkind AS dependent_type
FROM pg_attribute AS a -- columns for the table
JOIN pg_depend AS d -- objects that depend on the column
ON d.refobjsubid = a.attnum AND d.refobjid = a.att... |
<reponame>staticfloat/SidewalkWebpage<filename>conf/evolutions/default/39.sql<gh_stars>10-100
# --- !Ups
INSERT INTO version VALUES ('6.2.2', now(), 'Adds a Resume Mission modal to the validation page.');
# --- !Downs
DELETE FROM version WHERE version_id = '6.2.2';
|
insert into cell_info values
(2, 4, 12, 'I', false, false),
(2, 4, 16, 'J', false, true),
(2, 4, 18, 'J', false, true),
(6, 1, 1, 'G', true, false),
(6, 1, 2, 'A', true, false),
(6, 1, 3, 'B', true, false),
(6, 1, 4, 'C', false, false),
(6, 1, 5, 'D', false, false),
(6, 1, 6, 'E', f... |
<reponame>JesterOrNot/werft
CREATE TABLE IF NOT EXISTS job_status (
id SERIAL PRIMARY KEY,
name varchar(255) NOT NULL UNIQUE,
data text NOT NULL,
owner varchar(255) NULL,
phase VARCHAR(255) NOT NULL,
repo_owner varchar(255) NULL,
repo_repo varchar(255) NULL,
repo_host varchar(255) NULL,
repo_ref varchar(255) ... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3308
-- Generation Time: Sep 22, 2021 at 07:00 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>dram/metasfresh
-- 2018-08-17T16:32:38.174
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ SELECT public.db_alter_table('AD_Tab','ALTER TABLE public.AD_Tab ADD COLUMN InternalName VARCHAR(255)')
;
create unique index AD_Tab_InternalName_UQ on AD_Tab (AD_Window_ID, InternalName) wh... |
<filename>Uolo-Net/UNet/data/mysql_backup/lambda_lambda_rad_patient.sql
CREATE DATABASE IF NOT EXISTS `lambda` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `lambda`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: lambda
-- -----------------------------------------------------... |
select col1 from `parquet_storage/drill4704` where col2 between 2 and 2 and col3=3;
|
-- Revert node_external_storage
BEGIN;
ALTER TABLE ONLY nodes ALTER COLUMN serialized_object SET STORAGE EXTENDED;
COMMIT;
|
-- @testpoint: 子查询验证字段名大小写
select * from false_1 where b in (select b from wms);
select * from false_1 where B in (select b from wms);
select * from false_1 where b in (select B from wms);
select * from false_1 where b in (select B from WMS); |
<filename>conf/evolutions/default/17.sql
# --- !Ups
ALTER TABLE TILE ADD COLOUR INT DEFAULT 0 NOT NULL;
# --- !Downs
ALTER TABLE TILE DROP COLUMN COLOUR; |
USE minors_2022;
INSERT INTO catcher_minors_tools(
first_name,
last_name,
ORG,
FHIT,
FGAME_P,
FRAW_P,
FSPEED,
FFV
)
VALUES
('Adley','Rutschman','Baltimore',60,55,60,35,70),
('Gabriel','Moreno','Toronto',60,45,50,50,60),
('Henry','Davis','Pittsbu... |
<gh_stars>0
CREATE TABLE BooksAuthors (ISBN CHAR(13), Author_Id CHAR(4), Seq_No INT)
INSERT INTO BooksAuthors VALUES ('0-07-882198-3', 'KARP', 1)
INSERT INTO BooksAuthors VALUES ('0-78970541-9', 'EVAN', 1)
INSERT INTO BooksAuthors VALUES ('0-12623540-6', 'SCHE', 1)
INSERT INTO BooksAuthors VALUES ('1-56-884454-9', 'TAY... |
<gh_stars>0
IF EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND SCHEMA_NAME([schema_id]) = 'EPONS' AND QUOTENAME(name) = '[AssignMeasurementTool]')
DROP PROCEDURE [EPONS].[AssignMeasurementTool]
GO
CREATE PROCEDURE [EPONS].[AssignMeasurementTool]
@patientId UNIQUEIDENTIFIER,
@measurementToolId UNIQUEIDENTIFI... |
<filename>laraveldata.sql<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : 本地
Source Server Version : 50553
Source Host : localhost:3306
Source Database : laraveldata
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-11-28 21:08:27
*... |
.mode columns
.headers on
.nullvalue NULL
/*
listar nome, classificacao media, num criticas, num sessoes e num bilhetes vendidos de cada filme
se for igual a null, insere '-' em vez de null
*/
SELECT nome as "Filme", average as "Classificacao", criticsCount as "Num criticas", sessionCount as "Num sessoes", ticketcou... |
-- phpMyAdmin SQL Dump
-- version 4.0.10.7
-- http://www.phpmyadmin.net
--
-- المزود: localhost:3306
-- أنشئ في: 12 يناير 2016 الساعة 16:52
-- إصدارة المزود: 5.5.46-cll
-- PHP إصدارة: 5.4.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... |
<gh_stars>0
-- RenameIndex
ALTER INDEX "profiles_user_id_unique" RENAME TO "profiles.user_id_unique";
|
SELECT ID
FROM DIR_GAME_ACCOUNT
WHERE GAME_ID = ? AND
USER_ID = ?;
|
-- Setup for rolling absence count by counting # of days
-- and summing the days absence
DECLARE @day as float
DECLARE @interval as float
SET @day = 360.0
SET @interval = 4.0
SELECT ap.Site, ap.StudentID, ap.Date,
ROW_NUMBER() OVER (PARTITION BY ap.StudentID ORDER BY ap.StudentID, CONVERT(Date,ap.Date)) as ... |
<reponame>st2forget/fastSQL<filename>src/api/FastSQL.App/Migrations/1.0.0/1525333084-AddDependencyReferenceColumns.sql
-- Name: example-79d2f83b-852e-4aed-951c-f82c30dea3c5
-- Date: 5/3/2018 2:38:04 PM
-- Author: BaoChau
----------------------------
-- Migration up goes here.
----------------------------
ALTER TABLE [... |
<filename>migrations/20211030072737_add-base-class.up.sql
ALTER TABLE job
ADD is_deleted TINYINT(1) NOT NULL DEFAULT 0 COMMENT 'Whether the item is deleted or not. 0 = active, 1 = deleted',
ADD created_on DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The DateTime when the item was created',
ADD updat... |
<filename>src/cli/bundled/sql/AdAssetFeedSpecGroupRule.sql
CREATE TABLE ad_asset_feed_spec_group_rule (
)
ENGINE = Log
|
<reponame>loiclefevre/plsql-language
CREATE OR REPLACE PACKAGE BODY "schema"."PCK$1"
as
procedure my$Procedure(param1 in varchar2)
is
lnumber number;
begin
-- some code to execute
lnumber = PCK_2.myFunction('toto');
PCK_2.myProcedure('toto');
return;
end;
end;
/
|
<gh_stars>10-100
INSERT INTO `user`(`id`, `user_id`, `password`, `user_role`, `name`, `email`, `created`, `active`) VALUES (99, 'ahmustm1', '', 'user', '<NAME>', '', '2016-07-05', 1);
INSERT INTO `device` (`id`, `type`, `name`) VALUES (1, 'MiSeq', 'Neo');
INSERT INTO `sender` (`id`, `name`) VALUES (1, 'Coriell');
I... |
CREATE TABLE Bees (
id int PRIMARY KEY,
color int,
hive_id int UNIQUE,
FOREIGN KEY (hive_id) REFERENCES Hives
);
|
DROP TABLE IF EXISTS t_etf_calc CASCADE;
CREATE TABLE t_etf_calc (
item_code varchar(6) NOT NULL
, trdd varchar(8) NOT NULL
, date_inst timestamp DEFAULT NOW()
, date_updt timestamp DEFAULT NOW()
, d20_vol_size int
, d20_vol decimal(14, 4)
, d20_volaccu_size int
, d20_volaccu decimal(12, 4)
, d5_mmnt_size int
... |
#1
INSERT INTO ACCOUNT (AccountID, Password, Username)
Values ('<EMAIL>', '123456', '<PASSWORD>');
#2
SELECT ReqID, ReqName
FROM REQUEST
WHERE ReqName like '%jazz%' and Status = 'funding'
Order by PostTime desc;
#3
Create View JazzRequest as
SELECT ReqID
FROM REQUEST r join Label l on r.ReqID = l.ReqID
WHERE ... |
/****** Object: StoredProcedure [dbo].[LoadGetOAErrorMessage] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Create Procedure LoadGetOAErrorMessage
/****************************************************
**
** Desc:
**
**
** Return values: 0: end of line not yet encountered
**
** Parame... |
<reponame>SocialGouv/emjpm<gh_stars>10-100
INSERT INTO "info_finance_annee" ("type", "annee", "montant") VALUES
('aah_annuel', 2018, 9828.0000),
('smic_mensuel', 2018, 1498.4700),
('aah_annuel', 2020, 10832.4000),
('smic_mensuel', 2021, 1554.5800);
|
<filename>backend/dal/Migrations/v01.06.00/Up/PreUp/01-Buildings.sql
PRINT 'Backup Buildings'
-- Create temporary table to store the building values
SELECT
b.[Id]
, b.[ProjectNumber]
INTO #Buildings
FROM dbo.[Buildings] b
WHERE b.[ProjectNumber] IS NOT NULL |
-- @testpoint: openGauss保留关键字 maxvalue 作为列名带双引号,使用时带单引号或反引号,大小写匹配(合理报错)
drop table if exists test_tbl;
create table test_tbl(
c_id int, c_int int, c_integer integer, c_bool int, c_boolean int, c_bigint integer,
c_real real, c_double real,
c_decimal decimal(38), c_number number(38), c_numeric numeric(38),
c_char ch... |
<reponame>cscl-git/digit-bpa
insert into eg_roleaction(roleid,actionid) values((select id from eg_role where name='Budget Approver'),(select id from eg_action where name='BudgetUploadReport-getReferenceBudget'));
insert into eg_roleaction(roleid,actionid) values((select id from eg_role where name='Payment Creator'... |
<reponame>asjianghang123/demo
CREATE TABLE IF NOT EXISTS `temp_highlostcell` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`city` varchar(25) DEFAULT NULL,
`subNetwork` varchar(25) DEFAULT NULL,
`cell` varchar(25) DEFAULT NULL,
`hour_id` varchar(25) DEFAULT NULL,
`前天小时数` ... |
<reponame>Dzykk/wseiprojectdb<filename>ProjektDenorm/ProjektDenorm/dbo/Tables/CarModel.sql
CREATE TABLE [dbo].[CarModel] (
[CarModelID] INT IDENTITY (1, 1) NOT NULL,
[ManufacturerName] VARCHAR (30) NOT NULL,
[ManufacturerCountry] VARCHAR (30) NULL,
[ModelID] INT ... |
-- begin gklients_ORIGIN
create table gklients_ORIGIN (
ID uuid,
CREATE_TS timestamp,
CREATED_BY varchar(50),
VERSION integer,
UPDATE_TS timestamp,
UPDATED_BY varchar(50),
DELETE_TS timestamp,
DELETED_BY varchar(50),
--
ORIGIN_TEXT varchar(255),
--
primary key (ID)
)^-- e... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.