sql stringlengths 6 1.05M |
|---|
ALTER TABLE users ADD COLUMN service_bodies TEXT DEFAULT NULL;
|
-- AlterTable
ALTER TABLE "Booking" ADD COLUMN "location" TEXT;
|
<gh_stars>10-100
create or replace package body pit_admin
as
/**
Package: PIT_ADMIN Body
Implements PIT administration methods
Author::
<NAME>, ConDeS GmbH
Published under MIT licence
*/
/**
Group: Private type definitions
*/
/**
Type: predefined_error_rec
... |
<reponame>jdkoren/sqlite-parser
-- auth.test
--
-- execsql {
-- DROP TABLE tx;
-- DELETE FROM t2 WHERE a=1 AND b=2 AND c=3;
-- SELECT name FROM sqlite_master;
-- }
DROP TABLE tx;
DELETE FROM t2 WHERE a=1 AND b=2 AND c=3;
SELECT name FROM sqlite_master; |
ALTER TABLE project ADD COLUMN owner uuid NOT NULL;
|
UPDATE creature_template SET ScriptName='npc_deathstalker_faerleia' WHERE entry=2058;
|
<gh_stars>0
-- packages/acs-events/sql/timespan-drop.sql
--
-- $Id: timespan-drop.sql,v 1.4 2015/12/04 13:50:03 cvs Exp $
drop package timespan;
drop index timespans_idx;
drop table timespans;
drop package time_interval;
drop table time_intervals;
drop sequence timespan_seq;
|
BEGIN
BEGIN TRY
BEGIN TRANSACTION
declare @@StudentUsi int = 13727; --Student Usi
declare @@ParentUsi int = null;
delete edfi.[Grade] where StudentUSI = @@StudentUsi;
delete edfi.[StudentGradebookEntry] where StudentUsi = @@StudentUsi;
delete edfi.[StudentSectionAssociation] where StudentUSI = @@StudentU... |
select * from reserva
where fecha_entrada between :fecha_entrada1 and :fecha_entrada2 |
-- MariaDB dump 10.17 Distrib 10.5.5-MariaDB, for osx10.15 (x86_64)
--
-- Host: 172.16.31.10 Database: prometeo
-- ------------------------------------------------------
-- Server version 10.3.23-MariaDB-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@... |
<reponame>dhaifley/dauth
-- ============================================================================
-- dauth migrations
-- Create the schema for the dauth database.
-- Author: <NAME>
-- Created: 2018-08-01
-- ============================================================================
-- Table: public.perm
-- DR... |
<reponame>hcpzhe/foodorder
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50524
Source Host : localhost:3306
Source Database : foodorder
Target Server Type : MYSQL
Target Server Version : 50524
File Encoding : 65001
Date: 2015-01-09 17:23:40
*/
SE... |
CREATE TABLE [dbo].[Telefono] (
[Persona] VARCHAR (9) NOT NULL,
[Telefono] VARCHAR (9) NOT NULL,
[Comentario] VARCHAR (255) NULL,
PRIMARY KEY CLUSTERED ([Persona] ASC, [Telefono] ASC),
CONSTRAINT [TelefonosPersona] FOREIGN KEY ([Persona]) REFERENCES [dbo].[Persona] ([Dni]) ON DELETE CASCAD... |
<reponame>kurtjohnson-HS/EdFi-Project-Buzz
-- CREATE A SAMPLE INTERNET ACCESS SURVEY
CREATE TEMPORARY TABLE IF NOT EXISTS tmp_internet_survey(
"timestamp" VARCHAR(255),
StudentUniqueId VARCHAR(255),
FirstName VARCHAR(255),
LastSurName VARCHAR(255),
"Internet Access Type" VARCHAR(255),
"Has School Email Account" VARCHAR... |
DROP POLICY {{ conn|qtIdent(policy_name) }} ON {{conn|qtIdent(result.schema, result.table)}};
|
<gh_stars>0
-- Section1: DDL
CREATE TABLE Flights(
FlightID INT PRIMARY KEY,
DepartureTime DATETIME NOT NULL,
ArrivalTime DATETIME NOT NULL,
[Status] VARCHAR(9) NOT NULL CHECK ([Status] IN('Departing', 'Delayed', 'Arrived', 'Cancelled')),
OriginAirportID INT NOT NULL,
DestinationAirportID INT NOT NULL,
AirlineID INT... |
<reponame>compsocial/Popup-Networks
-- MySQL syntax
CREATE DATABASE IF NOT EXISTS api;
USE api;
CREATE TABLE IF NOT EXISTS apps (
id INTEGER UNIQUE KEY AUTO_INCREMENT, -- internal id
app_id VARCHAR(20) PRIMARY KEY, -- universal id
app_short_name VARCHAR(50) NOT NULL,
app_long_name VARCHAR(100) NOT NULL,
app_descr... |
CREATE SCHEMA [rpt]
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 18 Feb 2021 pada 14.38
-- Versi Server: 5.6.16
-- PHP Version: 5.5.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... |
CREATE TYPE item_type AS ENUM (
'Amulet',
'Belt',
'Quiver',
'Ring',
'Talisman',
'Body Armour',
'Boots',
'Gloves',
'Helmet',
'Large Shield',
'Medium Shield',
'Small Shield',
'Hybrid Flask',
'Life Flask',
'Mana Flask',
'Utility Flask',
'Jewel',
'Abyss Jewel',
'Bow',
'Claw',
'Dagg... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 26, 2020 at 06:39 PM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
-- Revert database-registration-view-data:schemas/public from pg
BEGIN;
-- XXX Add DDLs here.
COMMIT;
|
<filename>jadimasak.sql
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 23 Nov 2017 pada 16.55
-- Versi Server: 10.1.21-MariaDB
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
/* Assignment 5.sql
<NAME>
CS 155A, Fall 2017 */
/* Just copy / paste from mysql command-line to a text editor to do this. */
\W
/* library database */
/* Query 0 */
SELECT user(), current_date(), version(), @@sql_mode\G
/* Query 1 */
CREATE DATABASE IF NOT EXISTS library;
USE library;
/*... |
create or replace package finance_data_account
as
/** IBAN data for iban account number generation.
* @author <NAME>
* @version 0.0.1
* @project RANDOM_NINJA
*/
npg_version varchar2(250) := '1.3.0';
g_w_creditcard_tx_status varchar2(4000) := 'Authorized/Pending Capture[6],Capture... |
<filename>CartItem.sql<gh_stars>10-100
SELECT
c.id,c.user_id,c.product_package_id,c.nums,c.checked,pkg.product_id,
p.name AS product_name,pkg.price,pkg.stock,pkg.image_url,pkg.description
FROM
carts c
JOIN
product_packages pkg ON c.product_package_id = pkg.id
JOIN
products p ON pkg.product_id = p.id
WHERE
c.delet... |
/*
What if you want to select rows based on multiple conditions where some but not all of the conditions need to be met? For this, SQL has the OR operator.
For example, the following returns all films released in either 1994 or 2000:
SELECT title
FROM films
WHERE release_year = 1994
OR release_year = 2000;
Note that ... |
alter table fanfiction_authorinfo add primary key(uid,field);
alter table fanfiction_blocks drop index block_name;
alter table fanfiction_blocks add unique index block_name (block_name);
alter table fanfiction_categories drop index category;
alter table fanfiction_categories drop index parentcatid;
create index by... |
/* Delete task which imports all licences */
DELETE FROM "water"."scheduler";
|
<reponame>SamuelSouza2020/BancodeDados
create DATABASE cadastro
DEFAULT character set utf8
DEFAULT COLLATE utf8_general_ci;
use cadastro;
CREATE TABLE pessoas
(
id int NOT NULL AUTO_INCREMENT,
Nome Varchar (30) NOT null,
Nascimento date,
Sexo enum ('M' , 'F'),
Peso decimal (5,2),
Altura decimal (... |
<reponame>goldmansachs/obevo-kata
CREATE FUNCTION func649() RETURNS integer
LANGUAGE plpgsql
AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE205);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE299);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE17... |
<reponame>Bahmni/openmrs-data
set @concept_id = 0;
set @concept_name_short_id = 0;
set @concept_name_full_id = 0;
call add_concept(@concept_id, @concept_name_short_id, @concept_name_full_id, 'Admission', 'Admission', 'N/A', 'Misc', true);
call add_concept_word(@concept_id, @concept_name_short_id, 'Admission', 1);
|
-- DROP PROCEDURE [dbo].[dbx_tests_syntax_empty]
-- @Name Empty
CREATE PROCEDURE [dbo].[dbx_tests_syntax_empty]
AS
; |
<gh_stars>1-10
-- exercise services
CREATE TABLE exercise_services (
id UUID DEFAULT uuid_generate_v4() PRIMARY KEY,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
deleted_at TIMESTAMP WITH TIME ZONE,
name VARCHAR(255) NOT NULL,
slug V... |
<reponame>joaomfas/BDDAD-2019-2020
-- ** inserir dados nas tabelas **
-- ## tabela Editores ##
INSERT INTO editoras(id_editora, nome)
VALUES (1, 'BMG');
INSERT INTO editoras(id_editora, nome)
VALUES (2, '4AD');
INSERT INTO editoras(id_editora, nome)
VALUES (3, 'Polydor');
INSERT INTO editora... |
WITH
at_tumour AS
(SELECT TUMOURID, LSOA11_CODE, GRADE, AGE, SEX, CREG_CODE, SCREENINGSTATUSFULL_CODE, ER_STATUS, ER_SCORE, PR_STATUS, PR_SCORE, HER2_STATUS, GLEASON_PRIMARY, GLEASON_SECONDARY, GLEASON_TERTIARY, GLEASON_COMBINED, LATERALITY, DIAGNOSISDATEBEST, SITE_ICD10_O2, SITE_ICD10_O2_3CHAR, MORPH_ICD10_O2, BEHAVI... |
update bench.sample_one set country = 'Brazil'
where country = 'Peru'; |
<reponame>lucianobajr/banco
ALTER TABLE carro ADD numerodevalvulas INT NOT NULL DEFAULT 8;
UPDATE carro SET numerodevalvulas=16 WHERE modelo="Punto" AND versao="T-JET";
UPDATE carro SET numerodevalvulas=16 WHERE modelo="Fusion" AND versao="SEL2.5";
UPDATE carro SET numerodevalvulas=24 WHERE modelo="Fusion" AND versao="... |
-- attach ruptures info to shakemap extents table
SELECT
a.scenario,
--b.rupture_name,
b.magnitude,
CAST(b.rake AS NUMERIC),
CAST(b.lon AS NUMERIC),
CAST(b.lat AS NUMERIC),
CAST(b.depth AS NUMERIC),
a.geom
INTO gmf.shakemap_scenario_extents_tbl
FROM gmf.shakemap_scenario_extents_temp a
LEFT JOIN ruptures.rupture_tabl... |
alter table "public"."group_pricing" add column "group_id" bigint
not null;
|
/*
SQLyog Community v13.1.5 (32 bit)
MySQL - 5.7.36 : Database - retailmart
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOR... |
SELECT [Description],
c.[Name] AS [CategoryName]
FROM Reports AS r
JOIN Categories AS c ON c.Id = r.CategoryId
ORDER BY [Description],
c.[Name] |
-- test: basic
CREATE TABLE test(a PRIMARY KEY);
SELECT name, sql FROM __genji_catalog WHERE type = "table" AND name = "test";
/* result:
{
"name": "test",
"sql": "CREATE TABLE test (a ANY NOT NULL, CONSTRAINT test_pk PRIMARY KEY (a))"
}
*/
-- test: with type
CREATE TABLE test(a INT PRIMARY KEY);
SELECT name, sql ... |
<gh_stars>1-10
USE PasswordWeb
GO
-- Insert rows into table 'School'
INSERT INTO School
( -- columns to insert data into
[Name]
)
VALUES
( -- first row: values for the columns in the list above
'Bethesda Elementary School'
),
( -- second row: values for the columns in the list above
'Burton Magnet Elementary Scho... |
<gh_stars>10-100
SELECT *
FROM `a`
UNION
SELECT *
FROM `b`;
|
<filename>src/hg/lib/transRegCodeMotif.sql
# dnaMotif.sql was originally generated by the autoSql program, which also
# generated dnaMotif.c and dnaMotif.h. This creates the database representation of
# an object which can be loaded and saved from RAM in a fairly
# automatic way.
#A gapless DNA motif
CREATE TABLE t... |
CREATE OR REPLACE PROCEDURE SP_DELETE_SERVER_TOKEN
(
P_CONSUMER_KEY IN VARCHAR2,
P_USER_ID IN NUMBER,
P_TOKEN IN VARCHAR2,
P_USER_IS_ADMIN IN NUMBER, --0:NO; 1:YES
P_RESULT OUT NUMBER
)
AS
-- Delete a token we obtained from a serv... |
INSERT INTO `tiny_id_token`(`id`, `token`, `biz_type`, `remark`, `create_time`, `update_time`) VALUES (1, '0f673adf80504e2eaa552f5d791b644c', 'test', '1', '2017-12-14 16:36:46', '2017-12-14 16:36:48');
INSERT INTO `tiny_id_token`(`id`, `token`, `biz_type`, `remark`, `create_time`, `update_time`) VALUES (2, '0f673adf805... |
<reponame>reclada/db<gh_stars>0
DROP FUNCTION IF EXISTS reclada.validate_json;
CREATE OR REPLACE FUNCTION reclada.validate_json
(
_data jsonb,
_function text
)
RETURNS void AS $$
DECLARE
_schema jsonb;
BEGIN
-- select reclada.raise_exception('JSON invalid: ' || _data >> '{}')
select schema... |
elapsedtime on;
create table users (id int, name String, age int) using column options();
insert into users values(1,'abc',23),(2,'aaa',54),(3,'bbb',43),(4,'ccc',35);
|
<filename>crosswalk_csv/reports_for_mapping.sql
-- chartevents.itemid with context for more mapping:
-- current MIMIC IV mapping
-- previous MIMIC III mapping
-- top 5 values associated with the itemid
-- row counts for the itemid
-- 2021-05-17
-- ---------------------------------------------------... |
ALTER TABLE remotes
ADD COLUMN enabled BOOLEAN NOT NULL DEFAULT TRUE;
|
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1:3306
-- Thời gian đã tạo: Th5 11, 2020 lúc 08:18 AM
-- Phiên bản máy phục vụ: 5.7.26
-- Phiên bản PHP: 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!401... |
<gh_stars>0
CREATE TABLE `user`
(
`id` int PRIMARY KEY,
`first_name` text,
`last_name` text,
`email` text,
`password` text,
`img` text,
`role_id` int,
`created_at` bigint,
`is_active` boolean
);
CREATE TABLE `user_token`
(
`id` int PRIMARY KEY,
`email` text,
`token` text
);
CREATE TABLE `role`... |
create table HawksInSalesforce
(
bandNumber text,
salesforceID text primary key not null
);
|
/*
Aqui está o trabalho de Banco de dados, do meu estudo feito pelo material e projetos da universidade.
*/
create database spotmidt;
use spotmidt;
-- Tb Nacionalidade
CREATE TABLE Tb_Nacionalidade (
cod_nacionalidade INTEGER PRIMARY KEY,
nacionalidade VARCHAR(20)
);
-- Tb cidade
CREATE TABLE Tb_Cidade (
... |
<filename>database/best-remedies.sql
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 01, 2020 at 06:22 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET tim... |
<filename>additional/public_transport/setpublictransportwaitlinks.sql
CREATE FUNCTION setpublictransportwaitlinks() RETURNS void
LANGUAGE plpgsql
AS $$
/*
Add waiting links between public transport stops for connecting services.
Each waiting link is assumed to linking services that are between 5 and 20 minutes ... |
CREATE TABLE [dbo].[Images] AS FILETABLE FILESTREAM_ON [PastryFiles]
WITH (FILETABLE_COLLATE_FILENAME = Romanian_CI_AS, FILETABLE_DIRECTORY = N'Images');
|
<reponame>Eythorsson-dev/repo-pattern-template
CREATE TABLE [dbo].[LOG_TAB]
(
[LogId] BIGINT NOT NULL PRIMARY KEY IDENTITY,
[LogLevel] INT NOT NULL,
[LogType] INT NOT NULL,
[LogDate] DATETIME NOT NULL,
[Message] VARCHAR(MAX) NOT NULL,
[Stacktrace] VARCHAR(MAX) NULL,
[ReferanceId] BIGINT ... |
--Task - delete duplicates from table.
--Create table.
CREATE TABLE users(
id SERIAL PRIMARY KEY,
name VARCHAR(20));
--Add elements to the table.
INSERT INTO users(name) VALUES('Duke');
INSERT INTO users(name) VALUES('Alex');
INSERT INTO users(name) VALUES('Duke');
INSERT INTO users(name) VALUES('Kate');
INSERT INTO... |
<gh_stars>0
ALTER TABLE `product` ADD COLUMN `type` CHAR(10) DEFAULT "single" |
DROP FUNCTION IF EXISTS core.is_valid_office_id(integer);
CREATE FUNCTION core.is_valid_office_id(integer)
RETURNS boolean
AS
$$
BEGIN
IF EXISTS(SELECT 1 FROM core.offices WHERE office_id=$1) THEN
RETURN true;
END IF;
RETURN false;
END
$$
LANGUAGE plpgsql;
SELECT core.is_valid_office_id(1); |
#include "postgres.h"
...
char buffer[40]; /* our source data */
...
text *destination = (text *) palloc(VARHDRSZ + 40);
SET_VARSIZE(destination, VARHDRSZ + 40);
memcpy(destination->data, buffer, 40);
...
|
<reponame>Zhaojia2019/cubrid-testcases<gh_stars>1-10
create class test_class (date_col date, time_col time, timestamp_col timestamp, datetime_col datetimeltz);
insert into test_class(datetime_col) values (datetimeltz '1-1-1 00:00:00.000');
insert into test_class(datetime_col) values (datetimeltz '0001-01-01 00:00:00.0... |
<filename>pictionnary.sql
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : mar. 15 mai 2018 à 20:40
-- Version du serveur : 5.7.19
-- Version de PHP : 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone =... |
/* Leave this unchanged doe MS compatibility
l:see LICENSE file
g:utility
v:131117.1000\s.zaglio:more detailed dbg info and enlarged @files.key size
v:131021\s.zaglio:some correction near use of @kp
v:131018\s.zaglio:corrected a bug if under mssql2k5
v:131016.1000,131015,131014\s.zaglio: addin... |
<reponame>SachiraChin/Vulcan<filename>Vulcan.Core.Auth.Database/StoredProcedures/auth_Roles_GetByUserSystemId.sql
CREATE PROCEDURE [auth].[auth_Roles_GetByUserSystemId]
@userSystemId bigint
AS
select r.[Id], r.[Name], r.[Title], r.[IsHidden], r.[Type],
r.[CreatedDate], r.[CreatedByUserId], r.[CreatedByClientId],
... |
insert into usuarios(nome, email, idade) values(
"Usuario de Teste 4",
"<EMAIL>",
7
);
|
<filename>src/schemas/clans.sql<gh_stars>0
CREATE TABLE clans (
id SERIAL PRIMARY KEY,
name varchar(255) UNIQUE NOT NULL,
game varchar(255) NOT NULL
); |
-- initial schema
-- Migration SQL that makes the change goes here.
CREATE TABLE cs_users (
uid INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
ulogin VARCHAR(30) NOT NULL UNIQUE,
uemail VARCHAR(128) NOT NULL UNIQUE,
ufname VARCHAR(128) NOT NULL,
uname VARCHAR(128) NOT NULL,
ucryptsum VARCHAR(60) ... |
INSERT INTO eg_module(id, name, enabled, contextroot, parentmodule, displayname, ordernumber) VALUES (nextval('SEQ_EG_MODULE'), 'Registration Unit', true, 'mrs', (select id from eg_module where name='MR-Masters'), 'Registration Unit', 4);
INSERT INTO eg_action (id, name, url, queryparams, parentmodule, ordernumber, d... |
CREATE TABLE Ambient
(id INTEGER PRIMARY KEY AUTOINCREMENT,
Temperature REAL NOT NULL,
Humidity REAL NOT NULL,
Timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP)
CREATE TABLE Report
(id INTEGER PRIMARY KEY AUTOINCREMENT,
ReportName TEXT NOT NULL UNIQUE,
StartDate TIMESTAMP NOT NULL,
StopDate TIMESTAMP NOT ... |
--
-- Database v5
--
-- remove account start date column
ALTER TABLE moany.accounts DROP COLUMN start_date;
-- add budget
CREATE TABLE moany.budgetitems (
uuid varchar(255) NOT NULL,
amount decimal(19,2) NOT NULL,
day_of_period int(11) NOT NULL,
description varchar(255) DEFAULT NULL,
end_date date DEFAULT ... |
<gh_stars>1-10
ALTER TABLE user_programs DROP COLUMN record_id;
DROP TABLE user_program_pbs;
DROP TABLE user_program_records;
|
\set QUIET on
\echo 'INFO:Overriding some PG system settings'
-- Not strictly necessary for linting dev/CI.
-- We're not explicitly **not** targetting HDD-backed databases or
-- non-replicated databases BTW.
ALTER SYSTEM SET wal_compression = true;
ALTER SYSTEM SET wal_level = 'minimal';
ALTER SYSTEM SET max_wal_sende... |
<filename>src/test/resources/sql/create_type/e4b1c060.sql<gh_stars>10-100
-- file:alter_table.sql ln:2065 expect:true
CREATE TYPE mytype AS (a int)
|
<gh_stars>10-100
DROP TABLE IF EXISTS simulation_models; |
<filename>platform/migrations/migrations/20180903222426-views-field.sql
up:
alter table questions add views int unsigned not null default 0 after score;
down:
alter table questions drop column views;
|
<filename>App/WingtipSaaSDatabase/WingtipTenantDB/dbo/Views/rawTickets.sql
CREATE VIEW [dbo].[rawTickets] AS
SELECT v.VenueId, Convert(int, HASHBYTES('md5',c.Email)) AS CustomerEmailId,
tp.TicketPurchaseId, tp.PurchaseDate, tp.PurchaseTotal, tp.RowVersion AS TicketPurchaseRowVersion,
... |
<gh_stars>0
-- This is Greenplum dialect
-- Checks all magic squares with square numbers in center and corners
-- with the value in center <= 10**16
-- and the arithmetic progressions at the diagonals correspond to *primitive* pythagorean triples.
-- No such squares with seven square numbers :'(
drop table if exists nu... |
<reponame>madsenmj/iot-adventureworks
select
fc.ProductKey,
fc.CustomerKey,
fc.OrderDateKey,
fc.ShipDateKey,
fc.SalesOrderNumber,
REPLACE(dc.AddressLine1, ',' ,' ' ) as AddressLine1,
dc.AddressLine2,
dg.City,
dg.StateProvinceName,
dg.EnglishCountryRegionName
from FactInternetSales as fc
JOIN DimCustomer as... |
CREATE TABLE IF NOT EXISTS `spring_security`.`user` (
`id` INT NOT NULL AUTO_INCREMENT,
`username` VARCHAR(45) NOT NULL,
`password` TEXT NOT NULL,
`password_encoder_type` VARCHAR(45) NOT NULL,
PRIMARY KEY (`id`));
CREATE TABLE IF NOT EXISTS `spring_security`.`authority` (
`id` INT NOT NULL AUTO_INCREMENT,
... |
CREATE INDEX "CTNOMENCLATURAL_CODE_INDEX1" ON "CTNOMENCLATURAL_CODE" ("SORT_ORDER")
|
<gh_stars>1-10
-- MySQL Script generated by MySQL Workbench
-- Fri Mar 29 18:22:01 2019
-- 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_MOD... |
CREATE TABLE ${0} (id int, str text, num int);
|
<filename>packages/hasura/migrations/default/1619194326507_alter_table_public_tis_add_column_nb_mesures/up.sql
ALTER TABLE "public"."tis" ADD COLUMN "nb_mesures" integer NULL;
|
-- Begin the transaction
BEGIN;
-- The `multi_addresses` table keeps track of all ever encountered multi addresses
-- some of these multi addresses can be associated with a country or cloud provider.
CREATE TABLE multi_addresses
(
-- A unique id that identifies this multi_address
id SERIAL,
-- ... |
<gh_stars>0
CREATE TABLE classes (
cid SERIAL UNIQUE NOT NULL,
ancestors INT[] NOT NULL DEFAULT '{}'::int[],
classname TEXT NOT NULL,
module TEXT NOT NULL,
PRIMARY KEY (cid)
);
CREATE UNIQUE INDEX classes_lookup ON classes (module, classname);
CREATE INDEX classes_ancestors ON classes USING GIN(ancest... |
alter table "public"."ContentGroup" drop constraint "ContentGroup_originatingDataId_fkey";
|
<gh_stars>0
SELECT
TO_DATE(CONCAT(SPLIT_PART("8", ' ', 1), SPLIT_PART("8", ' ', 2)), 'Month YYYY') AS data_date
, processed_at
, document_id
FROM {{ source('tcjs_jail_population_report', 'serious_incidents') }}
WHERE "8" LIKE '%Serious Incident%'
|
<reponame>ioneone/junhong
create table post(
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
time_created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
title VARCHAR(255) NOT NULL,
body TEXT NOT NULL
); |
create database db_super_trunfo;
use db_super_trunfo;
-- MySQL dump 10.13 Distrib 5.7.12, for Win32 (AMD64)
--
-- Host: localhost Database: db_super_trunfo
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!401... |
CREATE TABLE IF NOT EXISTS {table_prefix}Languages (
`lastModified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`lastUserModified` mediumint(9) NULL DEFAULT 0,
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`languagena... |
<reponame>EDTestBank/edtestbank-service
-- --------------------------------------------------------
-- Host: 192.168.0.201
-- Server version: 10.3.22-MariaDB-0+deb10u1 - Raspbian 10
-- Server OS: debian-linux-gnueabihf
-- HeidiSQL Version: 11.1.0.6116... |
<reponame>DIBS-Payment-Services/opencart_dibseasy
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Vært: mysql14.gigahost.dk
-- Genereringstid: 13. 10 2020 kl. 06:15:45
-- Serverversion: 5.7.28
-- PHP-version: 5.6.27-0+deb8u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START... |
<gh_stars>100-1000
SELECT
*
FROM
superverylongtablenamereallyreally1
WHERE
long_varname_to_trigger_Rule_L016_id in (SELECT distinct id FROM superverylongtablenamereallyreally2 WHERE deletedat IS NULL)
|
Create Procedure [dbo].[uspApprenticeshipFrameworkDelete]
@frameworkId int
As
Begin
Delete From ApprenticeshipFramework
Where ApprenticeshipFrameworkId = @frameworkId
End |
<reponame>radrex/SoftuniCourses
USE master
GO
/*--- TASK 1 --------- EMPLOYEE SUMMARY ---------------------------*/
USE SoftUni
SELECT FirstName + ' ' + LastName AS [Full Name]
,JobTitle
,Salary
FROM Employees
/*--- TASK 2 --------- HIGHEST PEAK -------------------------------*/
USE Geography
CREATE VIE... |
CREATE EXTENSION IF NOT EXISTS pgcrypto;
CREATE TABLE "public"."samples"("id" uuid NOT NULL DEFAULT gen_random_uuid(), "url" text NOT NULL, "user_id" uuid NOT NULL, PRIMARY KEY ("id") , FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON UPDATE restrict ON DELETE restrict);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.