sql stringlengths 6 1.05M |
|---|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Jan 10, 2018 at 04:55 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";
/*... |
CREATE TABLE devices
(
id integer primary key autoincrement,
academic_year integer not null,
serial_number integer not null,
mac_address text not null unique,
ip_address text,
active integer not null default 0
);
|
<filename>Implementation/oracle/00_SCHEMA/01_TABLESPACES.sql<gh_stars>0
REM ******************************************************************
REM Fecha : 08/05/2018
REM Realizado por : <NAME>
REM Base de Datos : FS_AUWEB_US
REM ******************************************************************
REM TABLESPACE ... |
<gh_stars>0
INSERT INTO `role` (`id`, `name`, `slug`, `permission`, `createdAt`, `updatedAt`) VALUES
(1, 'Administrateur', 'administrateur', 0, NOW(), NOW()),
(2, 'Enseignant', 'enseignant', 1, NOW(), NOW()),
(3, 'Étudiant', 'etudiant', 2, NOW(), NOW());
INSERT INTO `group` (`id`, `name`, `sl... |
<reponame>ljouwertbv/StudentFollowingSystem<filename>src/StudentFollowingSystem.Database/dbo/Tables/Classes.sql<gh_stars>1-10
CREATE TABLE [dbo].[Classes]
(
[Id] INT IDENTITY (1, 1) PRIMARY KEY,
[Name] NVARCHAR(50) NOT NULL,
[Section] NVARCHAR(50) NULL,
[CounselerId] INT NOT NULL
)
|
<reponame>getwasim/egov-smartcity-suites-test<filename>egov/egov-wtms/src/main/resources/db/migration/main/V20151104160438__wcms_modulename_change.sql
update eg_module set displayname='Water Charge Management' where displayname='Water Tax Management'; |
<reponame>CS-UCY-EPL343/winter19.team2<filename>Database/individual Script/1Employee.sql
INSERT INTO Employee(Fname,Lname,ID,DateOfBirth,Email,Position,SSN,PhoneNumber,HomeNumber,Address,Salary,IsAdmin) VALUES ('Marios','Pitsiali',190312,'08/07/1979','<EMAIL>','Employee',7806502,99620281,24476913,'36 Lukken Park',1500,... |
<filename>irex-query-examples.sql
-- composition (determination letter)
'TBD' as author
organizations can come from SITESPROJECTS
-- study
select
pr_id,
pr_title,
'TBD' as status,
lead_si_id,
'TBD' as pi, -- there seem to be multiple pis per site/project in irex...
reviewer_si_id -- maybe add to composition org... |
<filename>Source/TreasureGuide.DB/dbo/Functions/UpdateTeamScores.sql
CREATE PROCEDURE [dbo].[UpdateTeamScores]
@teamId int = NULL
AS
UPDATE S
SET [Value] = ISNULL( (SELECT SUM(V.[Value]) FROM [dbo].[TeamVotes] AS V WHERE V.[TeamId] = S.[TeamId]), 0)
FROM [dbo].[TeamScores] AS S
LEFT JOIN [d... |
<filename>insert_students.sql
use school
-- INSERT INTO TableName(Columns...) VALUES (values....)
-- Single Row Insert
insert into Students(firstname, lastname, dateofbirth, enrollmentdate) values
('Test', 'Student', '2001-09-03', null) -- Use a
-- INSERT INTO TableName(Columns...) VALUES (values....), (values... |
CREATE OR REPLACE FUNCTION tap_rsi(_interval INT, _instrument_id BIGINT, _from DATE, _to DATE)
RETURNS TABLE("close_date" DATE, rsi DOUBLE PRECISION)
LANGUAGE plpgsql
AS $$
DECLARE
_start DATE;
BEGIN
RETURN QUERY
WITH RECURSIVE prices AS (
SELECT
*,
row_number()
OVER () AS row_num... |
<reponame>marcelloims/toko_smartphone
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 12 Jan 2022 pada 16.30
-- Versi server: 10.3.16-MariaDB
-- Versi PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zo... |
-- select7.test
--
-- execsql {
-- CREATE TABLE IF NOT EXISTS photo(pk integer primary key, x);
-- CREATE TABLE IF NOT EXISTS tag(pk integer primary key, fk int, name);
--
-- SELECT P.pk from PHOTO P WHERE NOT EXISTS (
-- SELECT T2.pk from TAG T2 WHERE T2.fk = P.pk
-- EXC... |
-- file:alter_table.sql ln:980 expect:true
create table child (a float4) inherits (parent)
|
<reponame>TiggerMcNuggets/Travelr<filename>conf/evolutions/default/2.sql
-- !Ups
INSERT INTO nationality (name) values ('Afghan');
INSERT INTO nationality (name) values ('Albania');
INSERT INTO nationality (name) values ('Algeria');
INSERT INTO nationality (name) values ('American');
INSERT INTO nationality (name) val... |
<filename>@api/db/migrations/committed/000232.sql
--! Previous: sha1:69cfa5212b335470e5a4c52ea0c1baef44db3b59
--! Hash: sha1:8123fbd861546bd2275d04820e6e1d34cad0d783
--! split: 1-current.sql
-- Enter migration here
DROP FUNCTION app_public.users_check_in_statistics (u app_public.users);
CREATE OR REPLACE FUNCTION app... |
DROP TABLE IF EXISTS drugs;
CREATE TABLE drugs AS
SELECT DISTINCT fo_prd_id,
a.prd_name,
a.mast_prd_name,
a.dosage,
a.unit,
a.dosage2,
a.unit2,
a.mol_eid,
a.mol_name,
b.mol_name as mol_name_2,
atccode,
atc_name,
nfc_code,
manufacturer
FROM fo_product_1_vs_2 a
FULL OUTER JOIN drug_mapping_1_vs_2 b ON a.prd... |
<reponame>BasselRawda/FYP-Pallier
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Nov 25, 2018 at 02:27 AM
-- Server version: 5.7.21
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone ... |
-- 演示商品数据 ↓
-- 商品数据
INSERT INTO `fa_shopro_goods`(`id`, `type`, `title`, `subtitle`, `status`, `weigh`, `category_ids`, `image`, `images`, `params`, `content`, `price`, `original_price`, `is_sku`, `likes`, `views`, `sales`, `show_sales`, `service_ids`, `dispatch_type`, `dispatch_ids`, `createtime`, `updatetime`, `dele... |
CREATE TABLE IF NOT EXISTS $target (LIKE $source);
$convert
CREATE SEQUENCE $seq_name;
ALTER TABLE $target ALTER COLUMN $pk SET DEFAULT nextval('$seq_name');
ALTER SEQUENCE $seq_name OWNED BY $target.$pk;
ALTER TABLE $target ADD PRIMARY KEY ($pk);
|
<filename>db/migrations/0003_user_created_at.sql
-- +migrate Up
ALTER TABLE authd_user ADD COLUMN "created_at" bigint;
UPDATE authd_user SET "created_at" = 0;
|
USE DATABASE SANDBOX_POC1;
USE SCHEMA EMPLOYEES;
CREATE PIPE IF NOT EXISTS Employee_pipe
AUTO_INGEST = true
AS
COPY INTO Employee (ID,Age,NAME)
FROM ( SELECT $1:ID::NUMBER(38, 0),
$1:Age::NUMBER(38, 0),
$1:NAME::VARCHAR(38)
FROM @STREAMLINER_QUICKSTART_1_stage/Employee)
FILE_FORMAT = ( TYPE = PARQUET); |
<filename>scripts/basic/add_mark.cql<gh_stars>0
create (p:Person{name: "Mark"}) return p;
|
<filename>db_scripts/stored/df.reservation_delete_single.sql
-- ================================================
-- Template generated from Template Explorer using:
-- Create Procedure (New Menu).SQL
--
-- Use the Specify Values for Template Parameters
-- command (Ctrl-Shift-M) to fill in the parameter
-- values belo... |
/*
Navicat MySQL Data Transfer
Source Server : mydb
Source Server Version : 50617
Source Host : localhost:3306
Source Database : app-server
Target Server Type : MYSQL
Target Server Version : 50617
File Encoding : 65001
Date: 2017-12-19 11:15:44
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---... |
<filename>backup/db/20-12-2020 2.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 20, 2020 at 05:37 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 05, 2019 at 12:16 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>dibmartins/incrudr<filename>incrudr.sql
CREATE DATABASE IF NOT EXISTS `incrudr` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `incrudr`;
-- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86)
--
-- Host: 127.0.0.1 Database: incrudr
-- ------------------------------------------------------
-- Server version ... |
<gh_stars>0
DELETE FROM BookAuthor;
DELETE FROM BookGenre;
DELETE FROM Book;
DELETE FROM Reader;
DELETE FROM Author;
DELETE FROM Genre;
INSERT INTO Author (Id, Name) VALUES (1, 'Author1');
INSERT INTO Author (Id, Name) VALUES (2, 'Author2');
INSERT INTO Author (Id, Name) VALUES (3, 'Author3');
INSERT INTO Genre (Id, ... |
CREATE TABLE users
(
user_id integer UNIQUE,
user_name varchar(120) NOT NULL
); |
#The file has been imported using Table Data Import Wizard
#Inspecting after Import
select*
from `bajaj auto`;
#Creating New Table Bajaj1
create table bajaj1(
Date date,`Close Price` float8,
`20 Day MA` float4,`50 Day MA` float4);
#Inspecting layout
select* from bajaj1;
#Inspecting Data Type of columns
Show fields
... |
CREATE OR REPLACE FUNCTION get_simple_long()
RETURNS integer AS
' begin return 4; end; '
LANGUAGE plpgsql VOLATILE
COST 100;
|
DROP TABLE moduleMountTentative;
DROP TABLE studentPlans;
DROP TABLE moduleMounted;
DROP TABLE moduleMountedPast;
DROP TABLE belongsToFocus;
DROP TABLE takesFocusArea;
DROP TABLE precludes;
DROP TABLE prerequisite;
DROP TABLE starred;
DROP TABLE sessions;
DROP TABLE users;
DROP TABLE focusArea;
DROP TABLE student;
DROP... |
SELECT * FROM get_user_reviews(${id}); |
alter table white_papper_metadata add column created_user_id int8;
alter table white_papper_metadata add column created_dt timestamptz(6);
alter table white_papper_metadata add column updated_user_id int8;
alter table white_papper_metadata add column updated_dt timestamptz(6);
comment on column white_papper_metadata.c... |
<gh_stars>1-10
SELECT DISTINCT
t_assessment_item.id,
t_assessment_item.uuid,
t_assessment_item.creation_timestamp,
t_assessment_item.identifier,
t_assessment_item.title,
t_assessment_item.adaptive,
t_assessment_item.time_dependent,
t_response_declaration.identifier,
t_response_declaration.cardinality,
t_respo... |
/*[[show LMS stats]]*/
set sep4k on pivotsort head
col program,traceid,tracefile,sosid,terminal,USERNAME,SERIAL#,BACKGROUND noprint
col "CR Time,CUR Time,Avg CR Time,Avg CUR Time" for usmhd2
grid {
[[select /*grid={topic='gv$cr_block_server',pivot=20}*/ * from gv$cr_block_server order by inst_id]],
'|',
[[... |
CREATE TABLE supplier_products
(
id serial NOT NULL PRIMARY KEY,
product_id integer NOT NULL,
supplier_id integer NOT NULL,
created_at timestamp
WITH time zone DEFAULT NOW
(),
updated_at timestamp
WITH time zone,
deleted_at timestamp
WITH time zone,
CONSTRAINT suppliers_produ... |
BEGIN;
ALTER TABLE ONLY public.systems
ADD COLUMN last_token_at timestamp with time zone;
COMMIT; |
-- Fix Tamar <Leatherworking Supplies> in Orgrimmar
-- http://www.wowhead.com/npc=3366
-- Remove Pattern: Drakehide Leg Armor which was added in patch 4.2.0
-- http://www.wowhead.com/item=71721
DELETE FROM `npc_vendor` WHERE `entry`=3366 AND `item`=71721;
-- Fix <NAME> <Jewelcrafting Design Vendor> in Stormwind Cit... |
-- DROP TABLE IF EXISTS `files`;
CREATE TABLE `public_files` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT NULL DEFAULT NULL,
`file_metadata_id` INT NULL DEFAULT NULL,
`file_content_type` VARCHAR(255) NULL DEFAULT NULL,
`data_name` VARCHAR(255) NULL DEFAULT NULL,
`password_hash` VARCHAR(255) NULL DEFAULT NULL,
... |
<filename>science/src/main/resources/db/changelog/migrations/001.sql
CREATE TABLE `category` (
`id` bigint NOT NULL AUTO_INCREMENT,
`name` varchar(30) NOT NULL,
PRIMARY KEY (`id`)
);
|
select count(1)
from vehiculo
where id = :idVehiculo |
<gh_stars>1-10
| project_name |
+--------------+
| bigapple24 |
| douwa |
| hellwen |
| hellwenwu |
| hsbs |
| jjqabc |
| jkq1995 |
| jwj831223 |
| liHui0811 |
| liuyangjike |
| lixueningggg |
| trams |
| zmbgitlab |
| 今何安 |
| 诺墨同学 |
insert into project (p... |
-- Extraction of cdm_source table
select *
from @cdmDatabaseSchema.cdm_source
|
<gh_stars>10-100
CREATE TABLE invitation (
invitation_id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
invite_to uuid NULL REFERENCES identities (id),
resource_id varchar NULL REFERENCES resource (resource_id),
identity_id uuid NOT NULL REFERENCES identities (id),
member boolean NOT NULL,
created_at timestam... |
SELECT product_name,sale_price,purchase_price
FROM Product
WHERE NOT sale_price - purchase_price < 500;
|
<filename>target/collapp/WEB-INF/classes/io/collapp/db/HSQLDB/V8__REMOVE_DEFAULT_PROJECT_IF_NOT_USED.sql
DELETE FROM LA_BOARD_COLUMN_DEFINITION WHERE
BOARD_COLUMN_DEFINITION_PROJECT_ID_FK = (SELECT PROJECT_ID FROM LA_PROJECT WHERE PROJECT_SHORT_NAME = 'DEFAULT') AND
(SELECT COUNT(*) FROM LA_BOARD INNER JOIN LA_PROJECT... |
<filename>Procedures, Functions And Triggers HW/soft_uni_db_queries.sql
#1
DELIMITER $$
CREATE PROCEDURE usp_get_employees_salary_above_35000()
BEGIN
SELECT e.first_name, e.last_name
FROM employees AS e
WHERE e.salary > 35000
ORDER BY
e.first_name,
e.last_name;
END $$
DELIMITER ;
CALL usp_get_employees_sala... |
<filename>account.sql
drop table if exists "account";
create table account
(
"id" integer primary key autoincrement,
"account_name" varchar(50),
"short_name" varchar(30),
"merchant_id" varchar(50) not null,
"market_place_id" varchar(50) not null,
"aws_access_key_id" varchar(100) not null,
"secre... |
create schema employeetracker;
CREATE TABLE `employeetracker`.`employee` (
`id` INT NOT NULL AUTO_INCREMENT,
`first_name` VARCHAR(30) NOT NULL,
`last_name` VARCHAR(30) NOT NULL,
`role_id` INT NOT NULL,
`manager_id` INT,
PRIMARY KEY (`id`));
CREATE TABLE `employeetracker`.`role` (
`id` INT NOT NULL AUT... |
<gh_stars>0
DROP DATABASE IF EXISTS crypto_piggy;
CREATE DATABASE crypto_piggy;
\c crypto_piggy;
CREATE TABLE users (
ID SERIAL PRIMARY KEY,
username VARCHAR NOT NULL,
hash_pass VARCHAR NOT NULL,
created_at timestamp default current_timestamp
);
CREATE TABLE addresses (
ID SERIAL PRIMARY KEY,
user_id int... |
<gh_stars>0
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE ony.sys_user
(
id int UNSIGNED AUTO_INCREMENT COMMENT '用户ID'
PRIMARY KEY,
username varchar(50) DEFAULT '' NOT NULL COMMENT '用户名',
password varchar(100) DEFAULT '' NOT NULL COMMENT '密码',
real_n... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 14, 2020 at 12:14 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
-- REGISTROS
-- Semestre
insert into semestre (num, aberto) values (1,1);
insert into semestre (num, aberto) values (2,0);
-- Ano
insert into ano (num) values (2022);
insert into ano (num) values (2021);
insert into ano (num) values (2020);
insert into ano (num) values (2019);
insert into ano (num) values (2018);
ins... |
WITH vorschriften_dokument_legal_basis AS (
SELECT
t_id AS hinweis
FROM
arp_npl_oereb.vorschriften_dokument
WHERE
t_ili_tid IN ('ch.so.sk.bgs.711.1', 'ch.so.sk.bgs.711.61')
)
INSERT INTO arp_npl_oereb.vorschriften_hinweisweiteredokumente (
t_basket,
t_datasetname,
ursprung,
hinweis
)
SELECT
... |
/*
* NOTE: Sqlite has weak support for foreign keys: https://www.sqlite.org/foreignkeys.html
* Syntax: FOREIGN KEY(<name>) REFERENCES <other_table>(<other_name>)
*/
PRAGMA foreign_keys = ON;
CREATE TABLE minecraft_versions (
id INTEGER PRIMARY KEY,
name VARCHAR(64) NOT NULL
);
CREATE UNIQUE INDEX idx_minecra... |
<reponame>valkirilov/fmi-di
CREATE TABLE Studio(
name VARCHAR(64) NOT NULL,
address VARCHAR(256),
presc VARCHAR(32),
PRIMARY KEY (name)
);
CREATE TABLE MovieExec(
cert VARCHAR(64) NOT NULL,
name VARCHAR(64),
address VARCHAR(64),
networth INT,
PRIMARY KEY (name)
);
CREATE TABLE Movi... |
CREATE TABLE dbo.Users
(
Id INT IDENTITY(1, 1) NOT NULL CONSTRAINT PK_Users PRIMARY KEY,
Name NVARCHAR(255) NOT NULL,
Role VARCHAR(255) NOT NULL,
SteamId CHAR(17) NOT NULL,
Avatar VARBINARY(MAX) NULL,
PayPalEmail NVARCHAR(255) NULL,
PayPalCurrency CHAR(3) NOT NULL CONSTRAINT DF_Users_PayPalCurrency DEFAULT 'USD... |
<reponame>khandy21yo/aplus
DEFINE RECORD CDD$TOP.AP.AP_OPEN_DIST
DESCRIPTION IS /*Accounts Payable Open Distribution*/.
AP_OPEN_DIST_CDD STRUCTURE.
/* Element =
Description = Transaction key */
TRANKEY DATATYPE IS TEXT SIZE IS 6.
/* Element =
D... |
<reponame>vhnegrisoli/cadeira-livre-empresa-api
ALTER TABLE AGENDA ADD COLUMN TOTAL_SERVICO FLOAT NOT NULL; |
<gh_stars>10-100
CREATE TABLE c (a int)
/
CREATE TABLE d (a int, b int)
/
INSERT INTO d VALUES (1,2)
/
SELECT * FROM d
/ |
/* Formatted on 10/6/2014 8:52:58 PM (QP5 v5.126.903.23003) */
-- TABLE: SCM.SCM_PRCHS_DOCS_DET
-- DROP TABLE SCM.SCM_PRCHS_DOCS_DET;
CREATE TABLE SCM.SCM_PRCHS_DOCS_DET (
PRCHS_DOC_LINE_ID NUMBER NOT NULL,
PRCHS_DOC_HDR_ID NUMBER,
ITM_ID NUMBER,
QUANTITY NUMBER,
UNIT_PRICE... |
<gh_stars>1-10
/*
Warnings:
- You are about to drop the column `account_id` on the `messages` table. All the data in the column will be lost.
- Added the required column `updated_at` to the `messages` table without a default value. This is not possible if the table is not empty.
*/
-- DropForeignKey
ALTER TABLE... |
<filename>src/test/resources/sql/select/54fa8780.sql
-- file:timestamp.sql ln:30 expect:true
SELECT count(*) AS Three FROM TIMESTAMP_TBL WHERE d1 = timestamp without time zone 'tomorrow'
|
<filename>src/test/resources/sql/select/8da1f254.sql
-- file:xml.sql ln:131 expect:true
SELECT xml '<abc/>' IS NOT DOCUMENT
|
<reponame>fatiiates/demo-community-site<filename>database.sql
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 01, 2020 at 07:18 PM
-- Server version: 8.0.17
-- PHP Version: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRAN... |
<reponame>youlekong/tp5_admin
create table if not exists `user`(
id tinyint unsigned not null primary key auto_increment,
nickname varchar(100),
pwd varchar(50) not null,
type tinyint unsigned default 0
) charset=utf8 comment="用户信息";
create table if not exists content(
id int(11) unsigned not null primary key au... |
----------------------------------- Mapping number 1 ----------------------------------------------
36 initial source relations =relation_10..relation_11..relation_13..relation_16..relation_18..relation_2..relation_20..relation_22..relation_24..relation_26..relation_28..relation_3..relation_30..relation_32..relation_... |
<filename>query/oss/oss_bucket_encrypted_with_byok.sql<gh_stars>1-10
select
-- Required Columns
'acs:oss:::' || b.name as resource,
case
when server_side_encryption ->> 'SSEAlgorithm' = 'KMS' and k.creator = k.account_id then 'ok'
else 'alarm'
end as status,
case
when server_side_encryption ->> 'S... |
with qs as (
select name, setting from pg_settings
)
select
(extract(epoch from now()) * 1e9)::int8 as epoch_ns,
current_setting('server_version') as server_version,
current_setting('server_version_num')::int8 as server_version_num,
current_setting('block_size')::int as block_size,
current_setting('max_conn... |
<reponame>taritom/bn-api
ALTER TABLE holds DROP CONSTRAINT redemption_code_unique_per_event;
ALTER TABLE codes DROP CONSTRAINT redemption_code_unique_per_event;
ALTER TABLE comps DROP CONSTRAINT redemption_code_unique_per_event;
DROP FUNCTION redemption_code_unique_per_event;
|
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL... |
ALTER TABLE `compat_override_range` ADD COLUMN `min_version_int` varchar(50) NOT NULL;
ALTER TABLE `compat_override_range` ADD COLUMN `max_version_int` varchar(50) NOT NULL;
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : Dim 20 oct. 2019 à 14:15
-- Version du serveur : 10.3.16-MariaDB
-- Version de PHP : 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00... |
use mywebsite;
ALTER TABLE product
ADD ean16 VARCHAR(16) NOT NULL
;
UPDATE product SET
ean16 = (select UPPER(LEFT(TO_BASE64( SHA(rand())), 16)))
;
CREATE INDEX product_ean ON product (ean16);
DROP INDEX product_ean ON product;
CREATE INDEX product_ean ON product (ean16, id_product);
CREATE FULLTEXT INDEX ... |
SELECT NAME FROM STUDENTS WHERE Marks > 75 ORDER BY RIGHT(NAME, 3), ID ASC;
|
<filename>Database/20190323.sql
/*** Leet Code Scratch pad ***/
--Exchange Seats
create table dbo.seat (
id int identity(1,1),
student varchar(30)
)
Go
insert into dbo.seat (student)
values ('Abbot')
, ('Doris')
, ('Emerson')
, ('Green')
, ('Jeames')
Go
-- -- Solution 1
declare @max_id int
set @max_... |
<reponame>citeaux/JAHAP<gh_stars>0
-- Imports Report into DB
-- POSTGRESQL: the files have to be placed in the DATA folder
|
<gh_stars>0
-- Criando a tabela de `estados`!
create table estados(
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
nome VARCHAR(45) NOT NULL,
sigla VARCHAR(2) NOT NULL,
regiao ENUM(
'Norte',
'Nordeste',
'Centro-Oeste',
'Sudeste',
'Sul'
) NOT NULL,
populacao DECI... |
<reponame>daviduck123/ferrscreen<filename>SQL/ferrscreen_db_20171015.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 15, 2017 at 11:31 AM
-- Server version: 10.1.24-MariaDB
-- PHP Version: 7.1.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
... |
<gh_stars>0
INSERT INTO user (username, code)
VALUES ('rab63', '9999')
;
INSERT INTO user (username, code)
VALUES ('vc15', '0006')
;
|
set names 'utf8mb4';
set character_set_database = 'utf8mb4';
set character_set_server = 'utf8mb4';
USE `game`;
-- create by ylz 2019-02-18
alter table `t_player_skill` add column `tianFuInfo` varchar(256) DEFAULT "{}" COMMENT "天赋信息";
-- create by cjb 2019-02-18
alter table `t_player_addition_sys_level` add column `... |
<gh_stars>1-10
CREATE TABLE IF NOT EXISTS Plane (
PlaneID INTEGER NOT NULL,
PlaneVersion INTEGER NOT NULL,
PRIMARY KEY (PlaneID, PlaneVersion)
);
CREATE TABLE IF NOT EXISTS Glider (
GliderID INTEGER NOT NULL,
GliderVersion INTEGER NOT NULL,
PRIMARY KEY (GliderID, GliderVersion)
);
CREATE TABLE IF NOT EXISTS Fl... |
SELECT Id, Name, Created, Updated FROM Author WHERE Id = ?;
|
DROP INDEX recording_rtc_id_idx;
ALTER TABLE janus_rtc_stream
DROP CONSTRAINT janus_rtc_stream_backend_id_fkey;
ALTER TABLE recording DROP COLUMN backend_id;
|
update EG_OCCUPANCY set ordernumber =3 where code='A3';
update EG_OCCUPANCY set ordernumber =6 where code='B1';
update EG_OCCUPANCY set ordernumber =7 where code='B2';
update EG_OCCUPANCY set ordernumber =8 where code='B2';
update EG_OCCUPANCY set ordernumber =9 where code='B3';
update EG_OCCUPANCY set ordernumber... |
<gh_stars>1-10
SELECT E.DepartmentID,
MIN(E.Salary) AS MinimumSalary
FROM Employees AS E
WHERE (E.DepartmentID = 2 OR
E.DepartmentID = 5 OR
E.DepartmentID = 7) AND E.HireDate > '01/01/2000'
GROUP BY DepartmentID |
<reponame>isabella232/Ore-1
# --- !Ups
alter table project_views add column created_at timestamp;
alter table version_downloads add column created_at timestamp;
# --- !Downs
alter table project_views drop column created_at;
alter table version_downloads add column created_at;
|
-- file:xml.sql ln:17 expect:false
SELECT xmlcomment('SELECT xmlcomment('te st')
|
<reponame>scheltwort-it-services/common_schema<gh_stars>100-1000
SELECT this_query() INTO @q;
SELECT @q = 'SELECT this_query() INTO @q'; |
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50620
Source Host : localhost:3306
Source Database : grdev
Target Server Type : MYSQL
Target Server Version : 50620
File Encoding : 65001
Date: 2018-07-20 17:49:37
*/
SET FOREIGN_KEY_CHECKS=0;
-- -------... |
DROP TABLE IF EXISTS raster_setvalues_rast;
CREATE TABLE raster_setvalues_rast AS
SELECT 1 AS rid, ST_AddBand(ST_MakeEmptyRaster(5, 5, 0, 0, 1, -1, 0, 0, 0), 1, '8BUI', 0, 0) AS rast
;
DROP TABLE IF EXISTS raster_setvalues_geom;
CREATE TABLE raster_setvalues_geom AS
SELECT 1 AS gid, 'SRID=0;POINT(2.5 -2.5)'::geometr... |
<reponame>SAP-samples/hana-apl-apis-runtimes
-- @required(hanaMinimumVersion,2.0.32)
-- ================================================================
connect USER_APL password <PASSWORD>;
SET SESSION 'APL_CACHE_SCHEMA' = 'APL_CACHE';
DO BEGIN
declare INVALID_INPUT condition for SQL_ERROR_CODE 10001;
declare cou... |
{% macro is_dim_from_model(metric, dim_name) %}
{% if execute %}
-- For now, time dimensions have to be encoded in the meta tag.
-- If there's no meta config, then assume all dimensions belong to the main model.
{% if not metric['meta']['dimensions'] %}
{% do return(True) %}
... |
<reponame>dedmedved/cheburashka
create procedure ProcWithVariableThatIsWrittenToByFetchFromCursor
as
begin
declare @A int -- @A is set. This should NOT be flagged as a problem
declare l cursor for select a from Table1
open l
fetch next from l into @a
print isnull(@A, -1)
end |
INSERT INTO ${myuniversity}_${mymodule}.job_profiles (id, jsonb) values
('80898dee-449f-44dd-9c8e-37d5eb469b1d', '{
"id": "80898dee-449f-44dd-9c8e-37d5eb469b1d",
"name": "Default - Create Holdings and SRS MARC Holdings",
"description": "Load MARC Holdings to create SRS MARC Holdings and Inventory Holdings",
"de... |
<filename>webserver/app-moe/sql/Archive/3.8.x/3.8.4/POCOR-3588/rollback.sql<gh_stars>1-10
-- examination_items
DROP TABLE IF EXISTS `examination_items`;
RENAME TABLE `z_3588_examination_items` TO `examination_items`;
-- examination_item_results
DROP TABLE IF EXISTS `examination_item_results`;
RENAME TABLE `z_3588_exam... |
<filename>admin/sql/updates/20201028-mbs-1424.sql
\set ON_ERROR_STOP 1
SET search_path = musicbrainz;
BEGIN;
CREATE TABLE release_first_release_date (
release INTEGER NOT NULL,
year SMALLINT,
month SMALLINT,
day SMALLINT
);
CREATE TABLE recording_first_release_date (
recor... |
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50637
Source Host : 127.0.0.1:3306
Source Database : yii2_advanced
Target Server Type : MYSQL
Target Server Version : 50637
File Encoding : 65001
Date: 2017-09-29 13:55:46
*/
SET FOREIGN_KEY_CHECKS=0;... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.