sql stringlengths 6 1.05M |
|---|
create table Classes(
class_id int,
subject_id int foreign key references subjects(subject_id),
teacher_id int foreign key references Teachers(teacher_id),
class_code varchar(20),
class_name varchar(100),
date_from date,
date_to date
primary key(class_id)
) |
<reponame>MikeKutz/Data-Dictionary-Searcher
create or replace package "dd"
authid current_user
as
subtype "param_t" is number(4);
subtype "search_option_t" is int;
subtype "boolean_t" is varchar2(3);
TRUE_VALUE constant "boolean_t" := 'YES';
FALSE_VALUE constant "boolean_t" := '... |
/*****************************************************************************/
/* Archivo: 04_insert_oauth_client.sql */
/* Base de datos: oreciprocas */
/* Producto: Operaciones Reciprocas */
... |
<reponame>create-ware/webcms
# ************************************************************
# Sequel Ace SQL dump
# Version 20019
#
# https://sequel-ace.com/
# https://github.com/Sequel-Ace/Sequel-Ace
#
# Host: 0.0.0.0 (MySQL 5.5.5-10.6.4-MariaDB-1:10.6.4+maria~focal)
# Database: webcms
# Generation Time: 2021-12-24 2:... |
<filename>make_database/User.sql
load data local infile 'User.csv' into table User
fields terminated by ','
enclosed by '\''
lines terminated by '\n'
(user_id, username, password);
select * from User;
|
-- StagingTurkey / StatingFiltered / MosaicFiltered and MosaicFiltered
-- =============================================================================================================
-- Created By: <NAME>
-- Usage: Generate TSQL Script to move databases from Old path to New Path
-- https://dba.stackexchange.com/q... |
USE [ANTERO]
GO
/****** Object: StoredProcedure [dw].[p_lataa_f_koski_perusopetus_ainevalinnat] Script Date: 31.1.2022 15:28:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dw].[p_lataa_f_koski_perusopetus_ainevalinnat] AS
DROP TABLE IF EXISTS dw.f_koski_perusopetus_ainevalinnat
... |
CREATE TABLE Users(
Id INT PRIMARY KEY IDENTITY,
Username NVARCHAR(30) NOT NULL UNIQUE,
[Password] NVARCHAR(50) NOT NULL,
[Name] NVARCHAR(50),
Gender VARCHAR CHECK(Gender IN('M', 'F')),
BirthDate DATETIME2,
Age INT,
Email NVARCHAR(50) NOT NULL
)
CREATE TABLE Departments(
Id INT PRIMARY KEY IDENTITY,
[Name] NVARCHAR(50... |
SELECT *
FROM employee
WHERE name='Jones'; |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 05, 2020 at 09:58 AM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.1.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
/*
<<property_start>>Description
* property_value of xref:dhw:sqldb:property.repoobjectproperty.adoc[] is splitted in lines and these lines are splitted in rows
* Where property_name = 'additional_reference_csv'
<<property_end>>
*/
CREATE View [property].[RepoObjectProperty_SelectedPropertyName_split]
As
Select
R... |
ALTER TABLE orders
DROP COLUMN coupon_code_id;
DROP TABLE coupon_codes; |
-- Module 5 Demonstration 1 File 1
-- Step 1: Switch this query window to use the AdventureWorksLT database
-- Step 2: Switch the Demo 1b - concurrency 2.sql query to use the AdventureWorksLT database
-- Step 3: Demonstrate the settings for ALLOW_SNAPSHOT_ISOLATION and READ_COMMITTED_SNAPSHOT
SELECT name, sn... |
<reponame>steinitzu/humblebee
/* This is the schema for the local tv database */
PRAGMA journal_mode = WAL;
CREATE TABLE IF NOT EXISTS episode (
id INTEGER PRIMARY KEY NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
modified_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
... |
-- Adminer 4.2.5 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP DATABASE IF EXISTS `anytunnel_base`;
CREATE DATABASE `anytunnel_base` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `anytunnel_base`;
DROP TABLE IF EXISTS `at_area`;
CREATE TAB... |
<filename>database/src/ddl/monthly_production_elt.sql
drop table if exists monthly_production_elt;
create table monthly_production_elt (
month varchar(255),
calendar_year varchar(255),
land_class varchar(255),
land_category varchar(255),
commodity varchar(255),
volume varchar(255)
)
|
--
-- Copyright 2004-2014 The Kuali Foundation
--
-- Licensed under the Educational Community License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.opensource.org/licenses/ecl2.php
--
-- Unless requi... |
DROP TABLE B_MAIL_MAILBOX
GO
DROP TABLE B_MAIL_FILTER
GO
DROP TABLE B_MAIL_FILTER_COND
GO
DROP TABLE B_MAIL_MESSAGE
GO
DROP TABLE B_MAIL_MESSAGE_UID
GO
DROP TABLE B_MAIL_MSG_ATTACHMENT
GO
DROP TABLE B_MAIL_SPAM_WEIGHT
GO
DROP TABLE B_MAIL_LOG
GO
DROP TABLE B_MAIL_MAILSERVICES
GO
DROP TABLE B_MAIL_USER_RELATIONS
GO
DR... |
/*
-- Dumping data for table `mouse_model_gene_ortholog`
-- Dump completed on 2014-01-17 9:47:53
*/
INSERT INTO mouse_model_gene_ortholog VALUES
-- Gp1bb
(5917,5916,'MGI:107852'),
(5918,5917,'MGI:107852'),
(15731,15724,'MGI:107852'),
(15732,15725,'MGI:107852'),
-- Serpind1
(4404,4404,'MGI:96051'),
(12... |
/* Drop Tables */
DROP TABLE IF EXISTS js_gen_table_column;
DROP TABLE IF EXISTS js_gen_table;
/* Create Tables */
-- 代码生成表
CREATE TABLE js_gen_table
(
table_name varchar(64) NOT NULL,
class_name varchar(100) NOT NULL,
comments varchar(500) NOT NULL,
parent_table_name varchar(64),
parent_t... |
-- Verify ggircs:swrs/transform/function/load_implied_emission_factor on pg
begin;
select pg_get_functiondef('swrs_transform.load_implied_emission_factor()'::regprocedure);
rollback;
|
DROP FUNCTION IF EXISTS inventory.get_store_id_by_store_name(_store_name text);
CREATE FUNCTION inventory.get_store_id_by_store_name(_store_name text)
RETURNS integer
AS
$$
BEGIN
RETURN store_id
FROM inventory.stores
WHERE inventory.stores.store_name = _store_name
AND NOT inventory.stores.delet... |
-- Name: GetStructureSetsByActivityTimepoint
-- Schema: posda_files
-- Columns: ['file_id', 'path', 'patient_id']
-- Args: ['activity_timepoint_id']
-- Tags: ['Structure Sets', 'sops', 'LinkageChecks']
-- Description: Get List of file_ids for structure sets in an activity timepoint
--
select
file_id, root_path || ... |
<gh_stars>1000+
drop index ACT_IDX_TASK_CREATE;
drop index ACT_IDX_TASK_SCOPE;
drop index ACT_IDX_TASK_SUB_SCOPE;
drop index ACT_IDX_TASK_SCOPE_DEF;
drop table ACT_HI_TSK_LOG; |
SELECT
tourney_hand_player_statistics.id_tourney,
tourney_hand_player_statistics.id_player,
tourney_hand_player_statistics.id_hand,
player.player_name,
player.player_name_search,
tourney_hand_summary.hand_no,
tourney_hand_player_statistics.flg_hero,
tourney_hand_player_statistics.positio... |
<filename>migrations/models/34_20211020062817_update.sql
-- upgrade --
CREATE TABLE IF NOT EXISTS "clinicverification" (
"id" SERIAL NOT NULL PRIMARY KEY,
"created" TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated" TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
"name" VARCHAR(700) NOT NULL,
... |
DROP DATABASE IF EXISTS pubs;
CREATE DATABASE pubs;
USE pubs;
CREATE TABLE authors
(
au_id varchar(11) NOT NULL,
au_lname varchar(40) NOT NULL,
au_fname varchar(20) NOT NULL,
phone char(12) NOT NULL DEFAULT 'UNKNOWN',
address v... |
CREATE TABLE USER (
id BIGINT NOT NULL AUTO_INCREMENT,
active BOOLEAN DEFAULT NULL,
name VARCHAR(255) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
PRIMARY KEY(id)
); |
CREATE TABLE domains (domain varchar(50) NOT NULL, PRIMARY KEY (domain) );
CREATE TABLE forwardings (source varchar(80) NOT NULL, destination TEXT NOT NULL, PRIMARY KEY (source) );
CREATE TABLE users (email varchar(80) NOT NULL, password varchar(20) NOT NULL, PRIMARY KEY (email) );
CREATE TABLE transport ( domain varch... |
-- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 06-04-2019 a las 03:14:26
-- Versión del servidor: 10.1.31-MariaDB
-- Versión de PHP: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... |
select * from Facilities
where facid in (1,5)
|
CREATE DATABASE SweetnSalty;
CREATE TABLE Person
(
);
CREATE TABLE Flavor
(
);
CREATE TABLE PersonFlavorJunction
(
); |
-- project."transaction" definition
-- Drop table
-- DROP TABLE project."transaction";
CREATE TABLE project."transaction" (
id int4 NOT NULL DEFAULT nextval('project.transaction_account_sequence'::regclass),
bank_sender_id int4 NOT NULL,
bank_receiver_id int4 NOT NULL,
amount numeric(10,2) NOT NULL,
status varc... |
-- Codez deux procédures stockées correspondant aux requêtes 9 et 10. Les procédures stockées doivent prendre en compte les éventuels paramètres.
-- 9 – Depuis quelle date le client « Du monde entier » n’a plus commandé ?
DROP PROCEDURE IF EXISTS date_lastorder
DELIMITER //
CREATE PROCEDURE date_lastorder (
IN ... |
<reponame>finne132/burger
INSERT INTO burgers (
burger_name,
devoured
) VALUES
(
"Hawaiian Volcano Burger",
0
),
(
"2lb Juicy Lucy",
0
),
(
"Peanut Butter and Jelly Burger",
0
); |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 02, 2019 at 03:58 PM
-- Server version: 10.1.33-MariaDB
-- PHP Version: 7.2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
PROMPT ALTER TABLE grupo ADD CONSTRAINT grupo_pk PRIMARY KEY
ALTER TABLE grupo
ADD CONSTRAINT grupo_pk PRIMARY KEY (
grupo_id
)
USING INDEX
STORAGE (
NEXT 1024 K
)
/
|
<reponame>andwilson36/Employee_Tracker
-- to show all info
SELECT employee.id AS ID, CONCAT(first_name, ' ', last_name) AS Name, title AS Title, department.name AS Department, salary AS Salary, manager_id AS Manager_ID
FROM employee
INNER JOIN role
ON role.id = employee.role_id
INNER JOIN department
ON role.departm... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5ubuntu0.5
-- https://www.phpmyadmin.net/
--
-- Client : localhost:3306
-- Généré le : Ven 11 Décembre 2020 à 16:56
-- Version du serveur : 5.7.32-0ubuntu0.18.04.1
-- Version de PHP : 7.2.32-1+ubuntu18.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zo... |
<filename>dbdump/lsapp.sql
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 25, 2021 at 05:02 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 ... |
<filename>src/SFA.Apprenticeships.Data.AvmsPlus/Scripts/Data/dbo.County.Upsert.sql
SET IDENTITY_INSERT [dbo].[County] ON
GO
MERGE INTO [dbo].[County] AS Target
USING (VALUES
(0, N'NA', N'NA', N'Please Select...'),
(1, N'BED', N'BED', N'Bedfordshire'),
(2, N'BER', N'BER', N'Berkshire'),
(3, N'BUC', N'BUC', N... |
/* interactive-complex-6 */
select t_name, count(*)
from tag, message_tag, message,
( select k_person2id
from knows
where
k_person1id = 35184372093720
union
select k2.k_person2id
from knows k1, knows k2
where
k1.k_person1id = 35184372093720 and k1.k_person2id = k2.k_person1id and k2.k_person2id... |
drop view if exists PEROBOBBOT.PLATFORM_USER_VIEW;
drop view if exists PEROBOBBOT.USER_TOKEN_VIEW;
drop view if exists PEROBOBBOT.SAFE_VIEW;
create view PEROBOBBOT.PLATFORM_USER_VIEW (ID,PLATFORM,USER_ID,LOGIN) as
select pu.ID, pu.PLATFORM, pu.USER_ID, (case
when pu.PLATFOR... |
-- file:sequence.sql ln:368 expect:true
SELECT lastval()
|
DELETE FROM KRCR_PARM_T WHERE NMSPC_CD = 'KC-PD' AND PARM_NM = 'pessimisticLocking.timeout'
/
UPDATE KRCR_PARM_T SET NMSPC_CD = 'KC-SYS', CMPNT_CD = 'All' WHERE NMSPC_CD = 'KC-PD' AND PARM_NM in ('pessimisticLocking.cronExpression', 'pessimisticLocking.expirationAge')
/ |
-----
-- category links
-----
create table category_links (
link_id integer not null
constraint category_links_pk primary key,
from_category_id integer not null
constraint category_links_from_fk
references categories on delete cascade,
to_category_id integer not null
constraint category_links_to_... |
<filename>CiklumTask/spring-petclinic-master/src/main/resources/db/hsqldb/updateDB_visitReason.sql<gh_stars>0
ALTER TABLE visits ADD COLUMN reason VARCHAR(255) DEFAULT '' NOT NULL; |
-- =======================================================================================
-- Basic
-- =====
-- PostgreSQL's function needs a parameter... |
<filename>luciddb/test/sql/analyze/analyze.sql
!set headerinterval 0
set schema 'analyzetest';
-- System sampling should cause the same results across runs. If row insertion
-- order changes, this test may produce different results. If row insertion
-- order becomes non-deterministic, this test will become non-dete... |
UPDATE [user]
SET password = <PASSWORD>
WHERE (username = @org_username) |
<gh_stars>10-100
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50553
Source Host : localhost:3306
Source Database : tp5_pro
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2019-08-23 11:34:54
*/
SET FOREIGN_KE... |
<reponame>ElmarDott/TP-CORE<filename>src/main/resources-filtered/org/europa/together/sql/mail-configuration.sql
--- #### #######################################################################
--- #### POPULATE CONFIGURATION TABLE
--- #### ###############################################################... |
{Source_to_Standard}
SELECT distinct SOURCE_CODE, TARGET_CONCEPT_ID
FROM CTE_VOCAB_MAP
WHERE lower(SOURCE_VOCABULARY_ID)='read' and lower(TARGET_VOCABULARY_ID)='snomed' and lower(TARGET_DOMAIN_ID)='observation' AND (TARGET_INVALID_REASON IS NULL or TARGET_INVALID_REASON = '') |
-----------------------------------------------------------------------------
-- (c) Copyright IBM Corp. 2007 All rights reserved.
--
-- The following sample of source code ("Sample") is owned by International
-- Business Machines Corporation or one of its subsidiaries ("IBM") and is
-- copyrighted and licensed, not... |
set trims on pagesize 100 linesize 250
column table_name format a25
column partition_or_global format a25
column index_name format a25
alter session set NLS_DATE_FORMAT = 'HH24:MI:SS YYYY-MM-DD';
drop table stale_test1 purge;
drop table stale_test2 purge;
create table stale_test1 (col1 number(10));
create table st... |
-- Schema 19 unfortunately got the order of the columns in the primary key wrong
CREATE INDEX libraryTrackIndex ON library_track (library);
--
-- Table: library_album
--
DROP TABLE IF EXISTS library_album;
CREATE TABLE library_album (
album int(10) unsigned,
library char(8),
PRIMARY KEY (library,album),
FOREI... |
<gh_stars>0
CREATE TABLE community (
community_id UUID NOT NULL PRIMARY KEY DEFAULT gen_random_uuid(),
channel_id UUID NOT NULL UNIQUE,
community_show_notice_n INTEGER NOT NULL DEFAULT 3,
CONSTRAINT channel_community__channel_id_fk
FOREIGN KEY (channel_id... |
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: db_eca
-- ------------------------------------------------------
-- Server version 5.7.21-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... |
<reponame>bogdanghita/public_bi_benchmark-master_project
SELECT "Redfin1_1"."region" AS "region" FROM "Redfin1_1" GROUP BY 1 ORDER BY "region" ASC;
|
-- -----------------------------------------------------------------
-- File name: IndexStorageExample.sql
-- Author: <NAME>
-- Date: 10/26/2017
-- Class: CS445
-- Assignment: Class Example, Index & Storage Engines
-- Purpose: Create a small database; inspect how queries are
-- solved. -- print in 10... |
<reponame>ajeng173040091/ci-app
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 07 Okt 2019 pada 17.37
-- Versi server: 10.3.16-MariaDB
-- Versi PHP: 7.1.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = ... |
<reponame>sbenten/osm_routing_import
/*
A loose collection of scripts to load data accident data from DfT.
1. COPY the CSV files into PostgreSQL one at a time as NULL values and additional columns make for errors.
Uncomment and comment the lines as you go.
2. Then create a point for the accident in the accidents_ex... |
<reponame>GopalNG/Flask_webapplication_and_restful_Curd
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 02, 2018 at 04:08 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TR... |
<reponame>rivaisali/ATK-Kantor-Pajak
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 21 Jun 2021 pada 06.47
-- Versi server: 10.4.13-MariaDB
-- Versi PHP: 7.3.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
<reponame>yadavswap/Madni-International-
-- phpMyAdmin SQL Dump
-- version 4.9.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jun 29, 2020 at 03:09 AM
-- Server version: 10.3.23-MariaDB-log-cll-lve
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START ... |
CREATE TABLE IF NOT EXISTS `product_category` (
`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
`name` varchar(100) NOT NULL,
`description` varchar(100)
); |
<filename>closedaydata/OLD/IAT1711191002.sql
INSERT INTO pos_itemtemp VALUES("IATT190003861","193007","191001","192001","37000","1","37000","0","37000","1","1","1","IAT1711191002","NHO2018000007","PAID","","PEDAS"),
("IATT190003861","193007","191001","192001","37000","1","37000","0","37000","2","1","1","IAT1711191002",... |
create or replace function insert_or_get_archetype(input varchar)
returns setof integer
as $$
begin
return query
with new_archetype as (
insert into archetypes(name) values(input)
on conflict do nothing
returning id
)
select * from new_archetype
union
select id from archetypes where name = input;
... |
INSERT INTO author VALUES (next value for s_author_id, 'George', 'Orwell', '1903-06-25', 1903, null)
INSERT INTO book VALUES (3, 2, null, null, 'O Alquimista', 1988, 4, null, null, 1, null)
INSERT INTO book VALUES (4, 2, null, null, 'Brida', 1990, 2, null, null, null, null)
INSERT INTO book VALUES (2, 1, null, null, 'A... |
<filename>src/test/resources/sql/reindex/2fb956b8.sql
-- file:create_index.sql ln:1033 expect:true
REINDEX (VERBOSE) TABLE reindex_verbose
|
<reponame>fragilefamilieschallenge/metadata_app<filename>ffmeta/data/ffmetadata_ddl.sql
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.5.64-MariaDB - MariaDB Server
-- Server OS: Linux
-- HeidiSQL Version: ... |
/*
-- DROP TABLES
drop table if exists fruit;
*/
/*
-- DROP SCHEMA
drop schema if exists dev;
-- CREATE DATABASE
create schema dev;
*/
--------------------------------------------------------------------------------
-- Table : fruit
create table fruit (
id integer not null
, name character var... |
CREATE TABLE "public"."resources" ("id" serial NOT NULL, "address" text, "contact_name" text NOT NULL, "contact_number" text NOT NULL, "description" text, "resource_type_id" integer NOT NULL, "district_id" integer NOT NULL, "upvote_count" integer, "downvote_count" integer, "verified_at" timestamptz, "created_at" timest... |
<reponame>SemanticComputing/yasgui
-- --------------------------------------------------------
--
-- Table structure for table `Bookmarks`
--
CREATE TABLE IF NOT EXISTS `Bookmarks` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`UserId` int(11) NOT NULL,
`Endpoint` text CHARACTER SET utf8,
`Query` text CHARACTER S... |
<filename>dvd_rental_store/triggers/drs_language_biu.sql
prompt - trigger drs_language_biu
create or replace trigger drs_language_biu
before insert or update on drs_language for each row
begin
:new.last_update := current_date;
end;
/ |
<filename>pahma/mediaAllImages.sql
SELECT
h2.name AS objectcsid,
cc.objectnumber,
h1.name AS mediacsid,
regexp_replace(mc.description,E'[\\t\\n\\r]+', ' ', 'g') AS description,
bc.name,
mc.creator ... |
<gh_stars>0
-- Create index on Patients name in the PMD document.
CREATE INDEX ?SCHEMA?.NameIndex ON ?SCHEMA?.out_patient_data (PMD)
GENERATE KEY USING XMLPATTERN
'/patient_document/patient/name/first'
AS SQL VARCHAR(20);
-- Collect statistics for table 'out_patient_data' on XML column PMD.
C... |
-- VERSION 1.3.0
BEGIN;
DROP TYPE IF EXISTS location_class_item CASCADE;
CREATE TYPE location_class_item AS (
id int,
class text,
authoritative bool,
entity_classes int[]
);
DROP FUNCTION IF EXISTS location_list_class();
CREATE OR REPLACE FUNCTION location_list_class()
RETURNS SETOF location_class_item AS
$$
SELEC... |
<reponame>FANsZL/hive
SELECT * FROM a where 1=1 and not exists (select * from b)--abc;
SELECT *
FROM a
where not exists
(
select * from b
);
SELECT
*
FROM
tab
WHERE FILE_DATE > (
SELECT
MAX(FILE_DATE) AS MX_C_FI... |
<reponame>goldmansachs/obevo-kata
CREATE PROCEDURE SP911(OUT MYCOUNT INTEGER) SPECIFIC SP911_92652 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE205;SELECT COUNT(*)INTO MYCOUNT FROM TABLE311;SELECT COUNT(*)INTO MYCOUNT FROM TABLE39... |
<reponame>sophia-IV/devstats<gh_stars>100-1000
select
count(distinct pl.comment_id) as cnt
from
gha_payloads pl,
gha_pull_requests pr
where
pl.pull_request_id = pr.id
and pl.comment_id is not null
and pr.created_at >= '{{from}}'
and pr.created_at < '{{to}}'
group by
pl.pull_request_id
union select 0 as ... |
SET search_path = pg_catalog;
DROP POLICY test_policy_1 ON public.t1;
CREATE POLICY test_policy_2 ON public.t1;
DROP POLICY test_policy_3 ON public.t1;
DROP POLICY test_policy_5 ON public.t1;
DROP POLICY test_policy_6 ON public.t1;
DROP POLICY test_policy_8 ON public.t1;
ALTER POLICY test_policy_9 ON public.t1
... |
CREATE TABLE oauth2AuthorizationConsent (
registeredClientId varchar(100) NOT NULL,
principalName varchar(200) NOT NULL,
authorities varchar(1000) NOT NULL,
PRIMARY KEY (registeredClientId, principalName)
);
|
<gh_stars>1-10
ALTER TYPE midgard.transaction_clearing_state ADD VALUE 'FATAL'; |
<filename>master/static/migrations/20210513134524_updates-for-push-api.tx.up.sql
CREATE TYPE public.run_type AS ENUM (
'TRIAL'
);
CREATE TABLE public.runs (
id integer NOT NULL,
start_time timestamp without time zone NOT NULL DEFAULT now(),
end_time timestamp without time zone NULL,
run_type run_ty... |
CREATE INDEX ON client_authorizations USING HASH ( authorization_code_value ) ;
CREATE INDEX ON client_authorizations USING HASH ( access_token_value ) ;
CREATE INDEX ON client_authorizations USING HASH ( refresh_token_value ) ; |
SET client_min_messages TO ERROR;
SET client_encoding = 'UTF8';
DROP SCHEMA IF EXISTS musicthoughts CASCADE;
BEGIN;
CREATE SCHEMA musicthoughts;
SET search_path = musicthoughts;
-- composing, performing, listening, etc
CREATE TABLE musicthoughts.categories (
id serial primary key,
en text,
es text,
fr text,
de t... |
-- SINGLE-ROW-TABLES
DROP TABLE NUM_WORKERS(REFERENCE TEXT NOT NULL,
COUNT INTEGER NOT NULL,
PRIMARY KEY(REFERENCE));
INSERT INTO NUM_WORKERS(REFERENCE, VALUE) VALUES ("ME", 1);
DROP TABLE AGENT_HEARTBEAT;
CREATE TABLE AGENT_HEARTBEAT(REFERENCE TEXT NOT NULL,
... |
-- create class and add FOREIGN key on time data type
create class aoo ( a time primary key, b int, c int );
select attr_name, is_nullable from db_attribute where class_name = 'aoo' order by 1,2;
select * from db_index where class_name = 'aoo';
select * from aoo;
create class boo (b time ,a time );
ALTER TABLE bo... |
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
ALTER TABLE TISSUE_CODE
DROP PRIMARY KEY CASCADE
/
DROP TABLE TISSUE_CODE CASCADE CONSTRAINTS PURGE
/
--
-- TISSUE_CODE (Table)
--
CREATE TABLE TISSUE_CODE ( TISSUE_CO... |
<gh_stars>1-10
-- This SQL code was generated by sklearn2sql (development version).
-- Copyright 2018
-- Model : CaretClassifier_nnet
-- Dataset : BinaryClass_100
-- Database : monetdb
-- This SQL code can contain one or more statements, to be executed in the order they appear in this file.
-- Model deployment co... |
-- @testpoint:opengauss关键字window(保留),作为函数名
--关键字不带引号-合理报错
create function window(i integer)
returns integer
as $$
begin
return i+1;
end;
$$ language plpgsql;
/
--关键字带双引号-成功
create function "window"(i integer)
returns integer
as $$
begin
return i+1;
end;
$$ language plpgsql;
/
--清理环境
drop function "window";
... |
<filename>openGaussBase/testcase/SQL/INNERFUNC/bit_length/Opengauss_Function_Innerfunc_Bit_Length_Case0003.sql
-- @testpoint: 特殊字符
select bit_length('#%$#');
select bit_length('*&^%$#@?|');
|
SET TIME ZONE 'Australia/Sydney';
CREATE TABLE stops
(stop_id int, stop_code int, stop_name TEXT, stop_lat double precision, stop_lon double precision);
/* remove header rows when COPYING */
COPY stops FROM '/Users/thomjoy/code/turftest/gtfs/stops.txt' DELIMITER ',' CSV;
CREATE TABLE stop_times
(trip_id VARCHAR, ar... |
CREATE TABLE IF NOT EXISTS accounts (
id CHAR(27) PRIMARY KEY,
name VARCHAR(24) NOT NULL,
email VARCHAR(56),
social_id VARCHAR(100),
photoURL VARCHAR(100),
locationURL VARCHAR (100),
createtime DATE,
last_updated DATE
);
|
SELECT sku, COUNT(*)
FROM customers INNER JOIN orders ON customers.cid = orders.cid
INNER JOIN items ON orders.oid = items.oid
INNER JOIN parent ON orders.oid = parent.id
WHERE customers.name = 'Smith'
GROUP BY sku
ORDER BY sku
|
<filename>sql.sql<gh_stars>0
CREATE TABLE menu (
kode_makanan_minuman INT PRIMARY KEY AUTO_INCREMENT,
nama_makanan_minuman VARCHAR(60) NOT NULL,
harga_makanan_minuman INT NOT NULL,
diskon DOUBLE
)ENGINE = INNODB;
CREATE TABLE pesanan (
id_pesanan VARCHAR(11) NOT NULL,
kode_makanan_minuman INT,
nomor_meja INT(2),
jum... |
<filename>auth/src/main/resources/studio/crud/feature/auth/db/migration/V20210512140449__CreateTokenMetadataTable.sql<gh_stars>0
create table auth_token_metadata
(
id bigint auto_increment,
creation_time datetime not null,
last_update_time datetime not null,
token TEXT not null,
entity_uuid varchar(... |
<filename>pricing-service/target/classes/data.sql<gh_stars>0
INSERT INTO price (id, vehicle_id, currency, price) VALUES (1, 1, 'EUR', 999), (2, 2,'EUR', 1980), (3, 3, 'EUR', 12000), (4, 4, 'BRL', 45000), (5, 5, 'BRL', 95000) |
<reponame>eaglestorm/servicebase
create table Example (
id bigserial primary key,
property1 varchar(255) not null,
property2 varchar(255) not null
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.