sql stringlengths 6 1.05M |
|---|
CREATE FUNCTION func90() RETURNS integer
LANGUAGE plpgsql
AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE446);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE81);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE423);val:=(SELECT COUNT(*)INTO MYCOUNT... |
set grammar to oracle;
set datestyle='ISO,YMD';
set timezone=8;
select to_char(sessiontimezone,'hh24:mi:ss') from dual;
set timezone=0;
select to_char(sessiontimezone,'hh24:mi:ss') from dual;
set timezone=-8;
select to_char(sessiontimezone,'hh24:mi:ss') from dual;
set timezone=4.5;
select to_char(sessiontimezone,'hh24:... |
<reponame>medukr/test_slotegrator
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Хост: localhost:3306
-- Время создания: Сен 09 2019 г., 11:50
-- Версия сервера: 5.7.27-0ubuntu0.18.04.1
-- Версия PHP: 7.2.19-0ubuntu0.18.04.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00... |
INSERT INTO waffle_flag (name, everyone, percent, testing, superusers, staff, authenticated, languages, rollout, note, created, modified)
VALUES ('automatic-validation', 0, NULL, 0, 0, 0, 0, '', 0, "Guards the automatic validation/review/signing or unlisted add-ons when they're submitted.", NOW(), NOW());
|
USE NBNData;
SELECT
ITN.TAXON_LIST_ITEM_KEY,
ITN.COMMON_NAME,
ITN.PREFERRED_NAME,
ITN.SORT_ORDER,
TXG.SORT_ORDER AS GROUP_SORT_ORDER,
TLI.SORT_CODE
FROM
INDEX_TAXON_NAME ITN
INNER JOIN
TAXON_LIST_ITEM TLI ON
ITN.TAXON_LIST_ITEM_KEY = TLI.TAXON_LIST_ITEM_KEY
INNER JOIN
TAXON_VERSION TX... |
<reponame>joyfinder/HackerRank-solutions
SELECT *
FROM CITY
WHERE POPULATION >= 100000 AND COUNTRYCODE = 'USA'; |
<reponame>jackingyu/One
-- 物料
INSERT INTO `material` (id, material_name, material_description, material_code, material_group_code, one_time_flag, create_by, create_time)
VALUES ('6ad7e77fd7b6418db75a6d20d5da2777','purchase_contract_m_001', 'purchase_contract_m_001_d', 'PM001', 1, 0, 'materialadmin', now());
INSERT INT... |
USE [rewardsdb]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (
SELECT [name]
FROM sys.tables
WHERE [name] = 'Customers'
)
CREATE TABLE [dbo].[Customers](
[CustomerId] [int] IDENTITY(1,1) NOT NULL,
[Email] [nvarchar](128) NOT NULL UNIQUE,
[RowVersion] [timestamp] NOT NULL,
[Ac... |
select
(case
when mod(id,2)!=0 and counts!=id then id+1
when mod(id,2)!=0 and counts=id then id
else id-1
end) as id,student
from seat,
(
select count(*) as counts from seat
) as tmp
order by id asc |
--9. Write a SQL query to find all different employee salaries.
SELECT DISTINCT Salary AS Salary, FirstName +' '+ LastName AS FullName
FROM dbo.Employees |
<gh_stars>0
DROP TABLE continua;
CREATE TABLE continua (
t_rec TIMESTAMP WITH TIME ZONE ,
rx NUMERIC,
rvaluemin NUMERIC ,
rvaluemax NUMERIC ,
rvalueavg NUMERIC ,
usfluxmin NUMERIC ,
usfluxmax NUMERIC ,
usfluxavg NUMERIC ,
classemin TEXT ,
classemax TEXT
) |
<reponame>Potterfu/springboot-mybatis2datasource-demo
CREATE TABLE `user` (
`id` int(13) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(33) DEFAULT NULL COMMENT '姓名',
`age` int(3) DEFAULT NULL COMMENT '年龄',
`money` double DEFAULT NULL COMMENT '账户余额',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 D... |
<reponame>dreammarker/PL_SQL
declare
cursor v_salary is select salary from employees order by salary desc;
v_top_dogs top_dogs%rowtype;
begin
open v_salary;
loop
fetch v_salary into v_top_dogs;
exit when v_salary%rowcount>5;
insert into top_dogs
values(v_top_dogs.salary);
end loop;
close v_salary;
end;
/... |
<reponame>Roy9102/bk-ci<gh_stars>1-10
INSERT INTO devops_ci_project.T_MESSAGE_CODE_DETAIL (`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MESSAGE_DETAIL_ZH_CN`, `MESSAGE_DETAIL_ZH_TW`, `MESSAGE_DETAIL_EN`) VALUES
('40fb0ad10a8a11e9b8da14050aafaa15', '2100001', '00', '系统内部繁忙,请稍后再试', '系統內部繁忙,請稍後再試', 'System busy, please try ag... |
##################
# Reserved words #
#################################################################
# #
# Head #
# Resource #
# Sensor ... |
-- P39H. FAMILY TYPE BY PRESENCE AND AGE OF RELATED CHILDREN (HISPANIC OR LATINO HOUSEHOLDER)
-- designed to work with the IRE Census bulk data exports
-- see http://census.ire.org/data/bulkdata.html
CREATE TABLE ire_p39h (
geoid VARCHAR(11) NOT NULL,
sumlev VARCHAR(3) NOT NULL,
state VARCHAR(2) NOT NULL,
county... |
<gh_stars>1-10
CREATE OR REPLACE FUNCTION MOSCH.hv_to_date (p_table_owner IN VARCHAR2,
p_table_name IN VARCHAR2,
p_partition_name IN VARCHAR2)
RETURN DATE
AS
l_high_value VARCHAR2(32767);
l_date DATE;
BEGIN
S... |
create user sibyl identified by Or4cl3;
grant connect, resource, unlimited tablespace, select_catalog_role to sibyl;
begin
for r in (
select owner, table_name
from all_tables
where owner in ('HR', 'OE', 'PM', 'IX', 'SH', 'BI')
and nested = 'NO'
and external... |
<filename>tests/root/query_checksum/03/test.sql
call query_checksum('select n, n+1, n*2 from numbers where n <= 410');
|
/****** Object: StoredProcedure [GetDocumentEdit] ******/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[GetDocumentEdit]') AND type in (N'P', N'PC'))
DROP PROCEDURE [GetDocumentEdit]
GO
CREATE PROCEDURE [GetDocumentEdit]
@DocumentId int
AS
BEGIN
SET NOCOUNT ON
/* Ge... |
-- Local test migration.
-- This will be run on development environments. It should mirror what you
-- intend to apply on production, but do not include any sensitive data.
-- New local user with password
CREATE USER ecs_user WITH PASSWORD '<PASSWORD>';
-- rds_iam is an empty role in development
GRANT rds_iam TO ecs_u... |
<gh_stars>0
--CREATE SCHEMA long name;--ERROR: syntax error at or near "name"
CREATE SCHEMA "long name";
DROP SCHEMA "long name"; |
--ruleid 44 DQ rule
--uses iris measure: patients with at least 1 Meas, 1 Dx and 1 Rx
select *
into #serial_hr_@hrNewId
from
(
select * from #serial_hr_@hrOldId
union all
SELECT
cast(null as int) as analysis_id,
CAST('NOTIFICATION: Percentage of patients with at least 1 Measurement, 1 Dx and 1 Rx... |
<filename>Hub.Legacy/Gcpe.Hub.Database/media/Tables/Company.sql
CREATE TABLE [media].[Company] (
[Id] UNIQUEIDENTIFIER NOT NULL,
[ParentCompanyId] UNIQUEIDENTIFIER NULL,
[CompanyName] VARCHAR (250) NOT NULL,
[CompanyDescription] VARCHAR (2500) NOT NULL,
... |
<gh_stars>1-10
-- Bad Alter Syntax Error
ALTER TABLE `test` ADD COLUMN 中文 INT;
|
<filename>openGaussBase/testcase/KEYWORDS/bigint/Opengauss_Function_Keyword_Bigint_Case0044.sql
-- @testpoint:插入左边界范围外整数值,应该报错:超出范围
drop table if exists bigint07;
create table bigint07 (name bigint);
insert into bigint07 values (-9223372036854775809 );
select * from bigint07;
drop table if exists bigint07; |
<filename>ms_sql/beforeMigrate.sql
/*
Panko
Copyright (c) 2020 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, mod... |
<reponame>France-ioi/algorea-backend
-- +migrate Up
ALTER TABLE `groups`
COMMENT 'A group can be either a user, a set of users, or a set of groups.',
MODIFY COLUMN `sTextId` varchar(255) NOT NULL DEFAULT '' COMMENT 'Internal text ID for special groups. Used to refer o them and avoid breaking features if an admin re... |
<reponame>mertnuhoglu/study_psk
create or replace view clients as
select id, name, address, created_on, updated_on from data.client;
create or replace view projects as
select id, name, client_id, created_on, updated_on from data.project;
create or replace view tasks as
select id, name, completed, project_id, created_... |
<reponame>sogis/oereb-gretljobs
-- Grant privileges on schemas
GRANT USAGE
ON SCHEMA ada_denkmalschutz, ada_denkmalschutz_oereb
TO public, gretl;
-- Grant read privileges
GRANT SELECT
ON ALL TABLES IN SCHEMA ada_denkmalschutz, ada_denkmalschutz_oereb
TO public;
-- Grant write privileges
GRANT SELECT, INSERT, UPDATE, ... |
CREATE TABLE list (id VARCHAR(64) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "list" ("id", "value") VALUES (E'az', E'acerbaixano');
INSERT INTO "list" ("id", "value") VALUES (E'az_AZ', E'acerbaixano (Acerbaixán)');
INSERT INTO "list" ("id", "value") VALUES (E'az_Cyrl_AZ', E'acerbaixano (ciríli... |
-- Drop the function 'FN_TrimWord' in schema 'dbo'
IF EXISTS (
SELECT *
FROM INFORMATION_SCHEMA.ROUTINES
WHERE SPECIFIC_SCHEMA = N'dbo'
AND SPECIFIC_NAME = N'FN_TrimWord'
)
DROP FUNCTION dbo.[FN_TrimWord]
GO |
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.17.32
-- Generation Time: Nov 29, 2020 at 07:34 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... |
-- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Dim 27 Avril 2014 à 15:34
-- Version du serveur : 5.6.16
-- Version de PHP : 5.5.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_... |
<reponame>Anoble25/BandTracker<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 11, 2018 at 09:32 PM
-- Server version: 5.6.38
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
-- CreateEnum
CREATE TYPE "user_type" AS ENUM ('USER', 'ADMIN', 'DEVELOPER');
-- CreateEnum
CREATE TYPE "idea_state" AS ENUM ('IDEA', 'PROPOSAL', 'PROJECT');
-- CreateTable
CREATE TABLE "report" (
"id" SERIAL NOT NULL,
"email" TEXT NOT NULL,
"description" TEXT NOT NULL,
"created_at" TIMESTAMP(3) NOT N... |
select
Cohort
, sum(m0) Month0
, sum(m1) Month1
, sum(m2) Month2
, sum(m3) Month3
, sum(m4) Month4
, sum(m5) Month5
, sum(m6) Month6
, sum(m7) Month7
, sum(m8) Month8
, sum(m9) Month9
, sum(m10) Month10
, sum(m11) Month11
from
(SELECT
Clients.CreatedAt Cohort
,(SELECT IIF(COUNT... |
CREATE TABLE IF NOT EXISTS client_component_texts (
clientId uuid,
locale text,
rating jsonb,
landingPage jsonb,
selectionPopup jsonb,
confirmation jsonb,
aftersales jsonb,
CONSTRAINT client_component_texts_pkey PRIMARY KEY (clientId, locale),
FOREIGN KEY (clientId) REFERENCES client... |
<reponame>ckmessi/ds-course-project<gh_stars>0
CREATE TABLE dsproject_user(
user_id int NOT NULL AUTO_INCREMENT COMMENT "用户ID",
student_id varchar(16) COMMENT "学号",
user_name varchar(16) COMMENT "姓名",
dsproject_key varchar(64) COMMENT "数据结构实验密钥",
user_role int NOT NULL DEFAULT 0 COMMENT "用户角色:0学生;1管理员",
created_a... |
<gh_stars>0
-- Bases de Datos 2
-- Proyecto 1
-- <NAME> - 201113769
-- Script de creacion de usuarios y base de datos
--ELIMINAR TABLESPACES
DROP TABLESPACE LALIGA INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
--ELIMINAR USUARIO OWNER
DROP USER LALIGA CASCADE;
--CREAR TABLESPACE
CREATE TABLESPACE LALIG... |
<gh_stars>0
CREATE TABLE `posts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`category_id` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`body` text NOT NULL
,
`author` varchar(255) NOT NULL,
`created_at` datetime NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT C... |
<filename>base de datos/eliza1.sql
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 17-03-2019 a las 23:08:58
-- Versión del servidor: 10.1.37-MariaDB
-- Versión de PHP: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRAN... |
<filename>aguascalientes/state_aguascalientes.sql<gh_stars>1-10
insert into state(id, name)
values(UUID_TO_BIN('e5ac2d55-3112-49a1-b486-7247908b86c6'), 'Aguascalientes');
|
<reponame>jeanmamelo/teif<filename>public/codigo_bd.sql
-- <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME> e <NAME> --
-- criando o BD--
create database teif
default character set utf8mb4
default collate utf8mb4_general_ci;
use teif;
-- criando / alterando as tabelas e inserindo valores --
create tab... |
create or replace package body names_data
as
begin
dbms_application_info.set_client_info('names_data');
dbms_session.set_identifier('names_data');
-- Init data
init_data := names_data_dk.npg_version;
init_data := names_data_cn.npg_version;
-- Init the US collection.
r_country_names('US').male_first_n... |
<filename>pgsmo/objects/schema/templates/ppas/9.2_plus/delete.sql
{#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2017, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#}
DROP SCHEMA {{ conn|qtIdent(name) }} {% if cascade %}CASCADE{%endif%};
|
<gh_stars>1-10
/* Count of sequential scans by table descending by order */
SELECT
relname AS name,
seq_scan as count
FROM
pg_stat_user_tables
ORDER BY
seq_scan DESC;
|
DROP DATABASE IF EXISTS ET_db;
CREATE DATABASE ET_db;
USE ET_db;
CREATE TABLE Departments (
id INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
name VARCHAR(30) NOT NULL
);
CREATE TABLE Roles (
id INT(10) PRIMARY KEY AUTO_INCREMENT NOT NULL,
title VARCHAR(30) NOT NULL,
salary DECIMAL(10,2) NOT NULL,
... |
<filename>sql-scripts/ddl-sqlite.sql
-- Drop tables
drop table if exists variant_img;
drop table if exists variant;
drop index if exists media_ref_external_idx;
drop table if exists media_ref;
drop index if exists media_owner_id_idx;
drop table if exists media;
-- Create tables
create table media (
media_id intege... |
/* Drop column certificate. It's never been used and has been removed from DAOs for some time. */
ALTER TABLE clients DROP COLUMN IF EXISTS certificate;
|
DROP TABLE "person"; |
<reponame>erthalion/timescaledb
-- This file and its contents are licensed under the Timescale License.
-- Please see the included NOTICE for copyright information and
-- LICENSE-TIMESCALE for a copy of the license.
------------------------------------
-- Set up a distributed environment
------------------------------... |
alter table ACT_HI_PROCINST
add SUPER_PROCESS_INSTANCE_ID_ NVARCHAR2(64);
|
ALTER TEXT SEARCH CONFIGURATION pg
ALTER MAPPING FOR asciiword, asciihword, hword_asciipart,
word, hword, hword_part
WITH pg_dict, english_ispell, english_stem;
|
<filename>Banco/Sp_UpdateCategory.sql<gh_stars>0
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Sp_UpdateCategory] (
@Id_Category INT
, @Ds_Category VARCHAR(50)
)
AS
BEGIN
UPDATE Category
SET Ds_Category = @Ds_Category
WHERE Id_Category = @Id_Category
END;
GO
|
select * from cliente |
<filename>build/full-db-v3.sqlite.sql<gh_stars>0
/*
-- Table structure for table `owner_bookmarks`
--*/
CREATE TABLE IF NOT EXISTS `owner_bookmarks` (
`id` INTEGER NOT NULL NULL PRIMARY KEY AUTOINCREMENT,
`name` VARCHAR(255) NOT NULL,
`url` VARCHAR(255) NOT NULL,
`revision` INTEGER NOT NULL,
`type` VARCHAR(50... |
CREATE FUNCTION @extschema@.create_role(
name TEXT,
in_role TEXT[] DEFAULT NULL,
role TEXT[] DEFAULT NULL,
admin TEXT[] DEFAULT NULL
) RETURNS TEXT AS
$$
DECLARE
_query TEXT := '';
BEGIN
RETURN (SELECT format(
'CREATE ROLE "%s"%s%s%s;',
name,
(CASE (in_role IS NOT NULL AND array_length(i... |
<reponame>nguyenphuocnhatthanh/Codebase
INSERT INTO `department_accessory` (`department_id`, `accessory_id`) VALUES
(1, 1),
(1, 3),
(1, 5),
(1, 6),
(1, 7),
(1, 8),
(1, 10),
(1, 11),
(1, 13),
(1, 14),
(1, 15),
(1, 16),
(1, 4),
(2, 1),
(2, 2),
(2, 3),
(2, 4),
(2, 5),
(2, 6),
(2, 7),
(2, 8),
(2, 9),
(2, 10),
(2, 11),
(2,... |
<reponame>yvv4git/erp-fglaw<gh_stars>0
-- +migrate Up
CREATE TABLE IF NOT EXISTS clients (
ID INTEGER PRIMARY KEY AUTOINCREMENT,
number VARCHAR(100) NOT NULL,
address VARCHAR(255),
cuit_customer VARCHAR(255),
client_phone VARCHAR(50),
client_type_id INTEGER,
FOREIGN KEY (client_type_id) REF... |
SELECT Email
FROM Person
Group BY Email
HAVING Count(Email) > 1
|
DROP USER 'insert_objects'@'localhost';
DROP PROCEDURE arbiter_data.store_site;
DROP PROCEDURE arbiter_data.store_observation;
DROP PROCEDURE arbiter_data.store_forecast;
DROP PROCEDURE arbiter_data.store_observation_values;
DROP PROCEDURE arbiter_data.store_forecast_values;
|
dellstore2=# ALTER TABLE ONLY orders_2004_q1 ADD CONSTRAINT orders_2004_q1_pkey PRIMARY KEY (orderid);
dellstore2=# ALTER TABLE ONLY orders_2004_q2... |
<filename>model/mab.sql
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 24, 2021 at 09:56 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... |
-- file:macaddr8.sql ln:74 expect:true
SELECT b::macaddr <> '08:00:2b:01:02:03'::macaddr FROM macaddr8_data WHERE a = 1
|
<filename>static/sql/insert_fileparents.sql
INSERT INTO {{.Owner}}.FILE_PARENTS
(this_file_id, parent_file_id)
VALUES
(:this_file_id, :parent_logical_file_name)
|
-- 2018-09-27T17:52:11.573
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_SysConfig SET Value='Y',Updated=TO_TIMESTAMP('2018-09-27 17:52:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=541241
;
-- 2018-09-27T18:15:19.480
-- I forgot to set the DICTIONARY_ID_COMMENTS System... |
CREATE TEMPORARY TABLE _time AS SELECT now() t;
CREATE FUNCTION _timecheck(label text, tolerated interval) RETURNS text
AS $$
DECLARE
ret TEXT;
lap INTERVAL;
BEGIN
lap := now()-t FROM _time;
IF lap <= tolerated THEN ret := label || ' interrupted on time';
ELSE ret := label || ' interrupted late: ' || lap;
... |
<gh_stars>1-10
SELECT * FROM postinumero.pnro LIMIT 10
|
<gh_stars>1-10
/*******************************************************************
Achilles - database profiling summary statistics generation
SQL for OMOP CDM v5
*******************************************************************/
-- 0 Number of persons
insert into ACHILLES_results (analysis_id, stratum_1, count_... |
<reponame>BrettPWRE/HDB
CREATE OR REPLACE TYPE DATEARRAY as table of date;
/
CREATE OR REPLACE TYPE NUMBER_ARRAY as table of number;
/
CREATE OR REPLACE TYPE T_TF_ROW AS OBJECT (
row_dates DATE,
row_values NUMBER
);
/
CREATE OR REPLACE TYPE T_TF_TAB IS TABLE OF t_tf_row;
/
|
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS user_roles;
DROP TABLE IF EXISTS users_departments;
DROP TABLE IF EXISTS departments;
CREATE TABLE users (
user_name VARCHAR(100) NOT NULL ,
password VARCHAR(100) NOT NULL ,
enabled boolean NOT NULL ,
PRIMARY KEY (user_name));
CREATE TABLE user_roles (
user_... |
<reponame>d4peng/roc-cloud
DROP TABLE if EXISTS test;
CREATE TABLE test
(
id bigint(20) NOT NULL COMMENT '主键ID',
test VARCHAR(30) NULL DEFAULT NULL COMMENT '测试字段',
created_time TIME NOT NULL COMMENT '创建时间',
updated_time TIME NOT NULL COMMENT '更新时间',
deleted_time TIME COMMENT '删除时间... |
<filename>sqlqueries/14.sql
--All the capital cities in a continent organised by largest population to smallest.
SELECT city.name, country.name, city.population
FROM city JOIN country ON city.id=country.capital
WHERE continent = 'Europe'
ORDER BY population DESC
;
|
INSERT INTO PATIENT(ID,PATIENT_ID,BIRTH_DATE,GIVEN_NAME,FAMILY_NAME,ADDITIONAL_NAME,GENDER,EMAIL,HEIGHT,WEIGHT)
(SELECT * FROM CSVREAD('classpath:patients-uuid-char.csv'));
INSERT INTO MEDICATION(ID,RX_NORM_CODE,GENERIC_NAME,TRADE_NAME,VALUE,UNIT)
(SELECT * FROM CSVREAD('classpath:medications.csv')); |
<reponame>kevin-at-datical/liquibase-test-harness
CREATE TABLE public."datatypes.network_test_table" (cidr CIDR, inet INET, macaddr MACADDR) |
<reponame>turbot/steampipe-mod-gcp-compliance
select
-- Required Columns
self_link resource,
case
when master_authorized_networks_config -> 'enabled' = 'true' then 'ok'
else 'alarm'
end status,
case
when master_authorized_networks_config -> 'enabled' = 'true' then title || ' master authorized net... |
SELECT sleep(nan); -- { serverError 36 }
SELECT sleep(inf); -- { serverError 36 }
|
<filename>lsst.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 07-06-2018 a las 18:31:07
-- Versión del servidor: 10.1.25-MariaDB
-- Versión de PHP: 7.0.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACT... |
<gh_stars>0
DROP TABLE IF EXISTS sc_akrifwz.tr_aktifitas;
DROP TABLE IF EXISTS sc_akrifwz.master_aktifitas;
DROP TABLE IF EXISTS sc_akrifwz.master_kategori_aktifitas;
-- Table: sc_akrifwz.master_kategori_aktifitas
CREATE TABLE sc_akrifwz.master_kategori_aktifitas
(
kategori_id serial NOT NULL,
kategori_nama chara... |
<filename>postgresql-dev/sql/conduct_kizai.sql
create table conduct_kizai (
conduct_kizai_id integer generated by default as identity primary key,
conduct_id integer not null references conduct (conduct_id),
kizaicode integer not null check (kizaicode > 0),
amount decimal(6,2) not null check (amount > 0)
);
create... |
CREATE DATABASE loadwave CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
|
CREATE PROCEDURE [dbo].[Dymbnails_GetList]
AS
BEGIN
SELECT
ID,
Title,
Description,
RatingUp AS [Rating.Up],
RatingDown AS [Rating.Down]
FROM
dbo.Dymbnails
WHERE
ID >= 1000
END |
<gh_stars>1-10
ALTER TABLE "tableA" SET WITH OIDS |
CREATE DATABASE ColonialJourney
GO
USE ColonialJourney
GO
------
--1 DDL
CREATE TABLE Planets
(Id INT PRIMARY KEY IDENTITY NOT NULL,
[Name] NVARCHAR(30) NOT NULL)
CREATE TABLE Spaceports
(Id INT PRIMARY KEY IDENTITY NOT NULL,
[Name] NVARCHAR(50) NOT NULL,
PlanetId INT REFERENCES Planets(Id) NOT NULL)
CREAT... |
<filename>src/test/resources/sql/alter_policy/00243887.sql
-- file:rowsecurity.sql ln:561 expect:true
ALTER POLICY p2 ON s2 USING (x % 2 = 0)
|
-- file:alter_table.sql ln:1621 expect:true
alter table alter1.t1 set schema alter2
|
<gh_stars>10-100
create table re_task_order_fees
(
id uuid
constraint re_task_order_fees_pkey primary key,
contract_year_id uuid not null
constraint re_task_order_fees_contract_year_id_fkey references re_contract_years,
service_id uuid not null
constraint re_task_order_fees_service_id_fkey references re_servic... |
--########### READ ME ################
-- The default way to set hive options is doing it globally for your whole cluster (e.g. cloudera manager, ambari, hive-site.xml, ...)
-- However, if for some reasons you cant or wont change your cluster global config, you can enable hive specific tuning options in this file.
-- ... |
<reponame>Chewy-Inc/iglu-central<gh_stars>0
CREATE SCHEMA IF NOT EXISTS atomic;
CREATE TABLE IF NOT EXISTS atomic.com_chewy_user_attribute_change_1 (
schema_vendor varchar(128) not null encoding rle,
schema_name varchar(128) not null encoding rle,
schema_format va... |
--+ holdcas on;
set names utf8;
CREATE TABLE test_cn(
id INT NOT NULL AUTO_INCREMENT,
ch CHAR collate utf8_gen DEFAULT NULL,
vc VARCHAR(32) collate utf8_gen DEFAULT NULL,
str STRING collate utf8_gen DEFAULT NULL
);
-- Latin chars
INSERT INTO test_cn(ch, vc, str) VALUES(UPPER('a'), UPPER('a'), CONCAT(' ', UPPER('a')... |
<filename>medium/_05_err_x/cases/deriv4.sql
autocommit off;
select *
from product_v p
, (select price
from inventory_v i
where p.product_code=i.product_code) as baa(code,price);
rollback;
|
/*
Navicat Premium Data Transfer
Source Server : MY SQL - LOCAL
Source Server Type : MySQL
Source Server Version : 100421
Source Host : localhost:3306
Source Schema : pos
Target Server Type : MySQL
Target Server Version : 100421
File Encoding : 65001
Date: 25/12/2021... |
<reponame>AryanshMahato/todo-nest-prisma
CREATE TABLE "public"."Todo" {
id SERIAL PRIMARY KEY NOT NULL
title VARCHAR(255)
done BOOLEAN NOT NULL DEFAULT false
} |
<filename>user_menu_sb_admin2.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 25, 2020 at 12:03 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION... |
DROP TABLE IF EXISTS `messages`;
CREATE TABLE `messages` (
`author` varchar(32) NOT NULL,
`mail` varchar(32) NOT NULL,
`msg` text NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `news`;
CREATE TABLE `news` (
`id... |
<reponame>mbustamanteAseinfo/configManager<filename>Eva Version 1/01 - Planilla Quincenal/03 - Factores/07 - EvoData - GastoRepresentacion.sql
/* Script Generado por Evolution - Editor de Formulación de Planillas. 16-01-2017 11:40 AM */
begin transaction
delete from [sal].[fac_factores] where [fac_codigo] = '5170a1c5... |
-- Massa de testes
-- cleanup
DELETE FROM `pagamentos`;
DELETE FROM `parcelamentos`;
DELETE FROM `liquidacoes`;
DELETE FROM `users`;
|
<gh_stars>0
DROP TABLE IF EXISTS `actions`;
CREATE TABLE `actions` (
`id` int NOT NULL AUTO_INCREMENT,
`idle` int NOT NULL DEFAULT '1',
`scavenging` int NOT NULL DEFAULT '0',
`training` int NOT NULL DEFAULT '0',
`on_mission` int NOT NULL DEFAULT '0',
`mission_name` varchar(255) COLLATE utf8mb4_unicode_ci DE... |
-- CreateTable
CREATE TABLE "users" (
"id" TEXT NOT NULL PRIMARY KEY,
"tenant_id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"email" TEXT NOT NULL,
"password_hash" TEXT NOT NULL,
"is_AccountConfirmed" BOOLEAN NOT NULL DEFAULT false,
"is_active" BOOLEAN NOT NULL DEFAULT false,
"last_login" DATE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.