sql stringlengths 6 1.05M |
|---|
<filename>target/jpetstore/WEB-INF/classes/database/jpetstore-hsqldb-dataload.sql
--
-- Copyright 2010-2019 the original author or authors.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of th... |
CREATE TABLE FILE_SOURCE (
C_ID INT,
C_BOOLEAN BOOLEAN,
C_TINYINT TINYINT,
C_SMALLINT SMALLINT,
C_INT INT,
C_BIGINT BIGINT,
C_FLOAT FLOAT,
C_DOUBLE DOUBLE,
C_DECIMAL DECIMAL,
C_STRING STRING,
C_VARCHAR VARCHAR(255),
C_CHAR CHAR(255),
C_TIMESTAMP TIMESTAMP,
C_DATE ... |
<filename>src/EA.Iws.Database/scripts/Update/0001-Release1/Sprint24/20160104-165500-delete-multiple-import-submissions.sql
declare @BadNotifications table
(
ImportNotificationId uniqueidentifier,
ExporterId uniqueidentifier,
ImporterId uniqueidentifier,
ProducerId uniqueidentifier,
FacilityCollectionId uniqueiden... |
<gh_stars>0
DELETE FROM `bxlm_attribute` WHERE `model_name`='province';
DELETE FROM `bxlm_model` WHERE `name`='province' ORDER BY id DESC LIMIT 1;
DROP TABLE IF EXISTS `bxlm_province`;
DELETE FROM `bxlm_attribute` WHERE `model_name`='area';
DELETE FROM `bxlm_model` WHERE `name`='area' ORDER BY id DESC LIMIT 1;
DROP T... |
drop procedure if exists addMixedCodesToCodeSetNew;
DELIMITER //
CREATE PROCEDURE addMixedCodesToCodeSetNew (
IN codeSetId int,
IN mixed_codes varchar (5000)
)
BEGIN
WHILE (LOCATE(',', mixed_codes) > 0)
DO
SET @value = substring(mixed_codes, 1, LOCATE(',',mixed_codes)-1);
SET mixed_codes= SUBSTRING(mi... |
ALTER TABLE `sys_user` MODIFY `password` TEXT NULL;
|
SELECT SUM(TOTAL_COMPILATIONS) TOTAL_COMPILATIONS,
SUM(PKG_CACHE_INSERTS) PKG_CACHE_INSERTS,
SUM(PKG_CACHE_LOOKUPS) PKG_CACHE_LOOKUPS
FROM TABLE(MON_GET_SERVICE_SUBCLASS('','',-2)) as t;
|
<gh_stars>0
-- -----------------------------------------------------
-- Table `firealarm_DEVICE`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS firealarm_DEVICE (
firealarm_DEVICE_ID VARCHAR(45) NOT NULL ,
DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
PRIMARY KEY (firealarm_DE... |
<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 |
# What this script will do:
#
# - Create a table `map_merch_trade_name_merch_cat` to list the possible relations between a merchant_trade_name and a merchant.
# - Information about merchant_trade_names are stored in the table `data_merchant_trade_names`.
# - Information about merchants are stored in the table `data... |
<gh_stars>1-10
create input stream s (name string, id int)
SOURCE KafkaInput
PROPERTIES ( groupid = "gidkpi_1_1",topic="agg_1_1");
create output stream rs
(newName string, type1 int, type2 float)
SINK KafkaOutput properties(topic="agg_2");
-- 输出schema类大小不一致
create operator userOp as "com.huawei.streaming.cql.exec... |
CREATE KEYSPACE IF NOT EXISTS stress_zipkin2 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = false;
//-- same schema but remove all UDTs and collections (as cassandra-stress doesn't support them)
CREATE TABLE IF NOT EXISTS stress_zipkin2.span (
trace_id te... |
UPDATE Map_GreatPersonClasses SET MaxWorldInstances = 3; |
<filename>src/example/data.sql
INSERT INTO `user` (`user_name`, `user_password`) VALUES
('<PASSWORD>', '<PASSWORD>'),
('example', 'example');
INSERT INTO `user_messages` (`user_id`, `message_text`) VALUES
('1', 'Text for user 1 # 1'),
('1', 'Text for user 1 # 2'),
('1', 'Text for user 1 # 3'),
('1', 'Text for user 1... |
-- @testpoint: rtrim函数入参为字符串
SELECT rtrim('trimxxxx', 'x'); |
INSERT INTO "user" (username, password, first_name, last_name, email, phone) VALUES
('tom', 'XohImNooBHFR0OVvjcYpJ3NgPQ1qq73WKhHvch0VQtg=', 'tom', 'brown', '<EMAIL>', '+79990002351'),
('bob', 'XohImNooBHFR0OVvjcYpJ3NgPQ1qq73WKhHvch0VQtg=', 'bob', 'brown', '<EMAIL>', '+79990002352');
|
SET i=0;
loop1: REPEAT
SET i=i+1;
IF MOD(i,2)<>0 THEN /*Even number - try again*/
SELECT CONCAT(i," is an odd number");
END IF;
UNTIL i >= 10
END REPEAT;
|
<reponame>ken-tunc/bittrader
insert into product_code values ('BTC_JPY');
insert into product_code values ('ETH_JPY');
insert into duration values ('MINUTES');
insert into duration values ('HOURS');
insert into duration values ('DAYS');
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 30 Jun 2021 pada 07.49
-- Versi server: 10.4.16-MariaDB
-- Versi PHP: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SE... |
CREATE SCHEMA [If_then_else] |
<filename>DDLs/occurrences.sql
--------------------------------------------------------
-- DDL for Table OCCURRENCES
--------------------------------------------------------
CREATE TABLE "AUSEMON"."OCCURRENCES"
( "OCCURRENCE_NUMBER" NUMBER,
"SCIENTIFIC_NAME" VARCHAR2(200 BYTE),
"COMMON_NAME" VARCHAR2(200 BY... |
CREATE TABLE `user_setting_font_and_text` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`site_id` int(11) unsigned NOT NULL,
`module_id` tinyint(3) unsigned NOT NULL,
`font_family_id` tinyint(3) unsigned NOT NULL,
`text_weight_id` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `site_id` (`site_id`),
... |
SET DEFINE OFF;
CREATE INDEX AFW_37_GADGT_PARMT_FK1 ON AFW_37_GADGT_PARMT
(REF_GADGT)
LOGGING
/
|
CREATE SCHEMA IF NOT EXISTS api;
|
-- Table: public.step_action
-- DROP TABLE public.step_action;
CREATE TABLE public.step_action
(
id_step_action integer NOT NULL DEFAULT nextval('step_action_id_step_action_seq'::regclass),
id_stories integer,
is_open boolean,
id_user integer,
is_view boolean,
"time" timestamp without time zone,
is_lik... |
<gh_stars>10-100
--aaaaa
select
id
, serial_number
, active_status
, active_date
, max_active_session
, access_role
, service_status
, service_expiration
from
ums.active('11112222','bbbbbbbb','com.apple.liveTV');
select
id
, serial_number
, active_status
, active_date
, max_active_session
... |
WITH
dim_asset AS ( -- Filters out miscellaneous sites
SELECT asset_id, ip_address, host_name, operating_system_id, sites
FROM dim_asset
WHERE sites !~* '^((SERVICE)|(UNKNOWNS)|(TEST))'
),
dim_aggregated_credential_status AS ( -- Filters out 'N/A' descriptions
SELECT a... |
--======================================================
-- Usage: Lib: MoneyToWords in Polish
-- Notes: It DOES NOT support negative number.
-- Please concat 'negative word' into the result in that case
-- References:
-- https://www.languagesandnumbers.com/how-to-count-in-polish/en/pol/
-- History:
-- Date Auth... |
<gh_stars>1-10
CREATE TABLE Admitted_Patient(
Admitted_ID VARCHAR(8) NOT NULL PRIMARY KEY,
Patient_ID VARCHAR(8) NOT NULL,
Ward_No VARCHAR(8) NOT NULL,
Nurse_ID VARCHAR(8) NOT NULL,
Admitted_Date_Time DATETIME NOT NULL,
Room_No VARCHAR(20) NOT NULL,
FOREIGN KEY (Patient_ID) REFERENCES Patient(Patient_ID),
... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- 主机: localhost
-- 生成日期: 2020-05-19 08:54:37
-- 服务器版本: 5.7.26-log
-- PHP 版本: 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
<filename>Samples/PostgreSQL/Sport/Table/SportTable.sql
DROP TABLE IF EXISTS Sport;
DROP TABLE IF EXISTS Sport_fi;
DROP TABLE IF EXISTS Sport_de;
DROP TABLE IF EXISTS Sport_fr;
DROP TABLE IF EXISTS Sport_ja;
CREATE TABLE Sport
(
Id INTEGER NOT NULL,
Name VARCHAR(50) NOT NULL,
FieldPlayers INTEGER NOT NULL,
Go... |
# bed.sql was originally generated by the autoSql program, which also
# generated bed.c and bed.h. This creates the database representation of
# an object which can be loaded and saved from RAM in a fairly
# automatic way.
#Browser extensible data
CREATE TABLE bed (
chrom varchar(255) not null, # Human chromoso... |
<reponame>vipulnaik/donations<filename>sql/donations/donees/donor-lottery-2017-cea.sql
insert into donations(donor, donee, amount, donation_date, donation_date_precision, donation_date_basis, url, notes) values
('<NAME>','Donor lottery',97.5,'2017-12-16','day','transaction','https://app.effectivealtruism.org/lotter... |
<reponame>Epi-Info/Epi-Info-Database-Web
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[usp_read_canvasInfoGUID ]
@canvasGUID uniqueidentifier... |
USE mydb;
CREATE TABLE USERS(
ID INT NOT NULL,
NAME VARCHAR (32) NOT NULL,
AGE INT NOT NULL,
PRIMARY KEY (ID)
);
CREATE TABLE PETS(
ID INT NOT NULL,
NAME VARCHAR (32) NOT NULL,
AGE INT NOT NULL,
PRIMARY KEY (ID)
);
SHOW TABLES;
-- OUTPUT:
-- Tables_in_mydb
-- PETS
-- USE... |
-- MySQL dump 10.13 Distrib 5.6.24, for Win64 (x86_64)
--
-- Host: localhost Database: pets_house
-- ------------------------------------------------------
-- Server version 5.6.24-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ... |
CREATE PROCEDURE SP916(OUT MYCOUNT INTEGER) SPECIFIC SP916_65024 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE116;SELECT COUNT(*)INTO MYCOUNT FROM TABLE102;SELECT COUNT(*)INTO MYCOUNT FROM TABLE470;SELECT COUNT(*)INTO MYCOUNT FROM... |
<reponame>kuro-channel/knowledge-1<gh_stars>100-1000
SELECT * FROM USER_GROUPS
ORDER BY INSERT_DATETIME %s
LIMIT ? OFFSET ?;
|
create table "t_department"
(
"id" int not null primary key auto_increment,
"name" varchar(128) not null,
"location" varchar(128) not null,
"mixedCase" varchar(128)
);
create table "t_employee"
(
"id" int not null primary key auto_increment,
"name" ... |
CREATE TABLE installations (
id TEXT NOT NULL PRIMARY KEY
)
|
SELECT rel_users_exams.user_username AS rel_users_exams_user_username,
rel_users_exams.exam_id AS rel_users_exams_exam_id,
rel_users_exams.started_at AS rel_users_exams_started_at,
rel_users_exams.finished_at AS rel_users_exams_finished_at,
answer_1.id AS answer_1_id,
answer... |
<filename>tests/Nette/Database/mysql-nette_test1.sql
/*!40102 SET storage_engine = InnoDB */;
DROP DATABASE IF EXISTS nette_test;
CREATE DATABASE IF NOT EXISTS nette_test;
USE nette_test;
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS author;
CREATE TABLE author (
id int NOT NULL AUTO_INCREMENT,
name varchar(30)... |
<reponame>joshua-s/kitsune
CREATE TABLE `celery_taskmeta` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`task_id` varchar(255) NOT NULL UNIQUE,
`status` varchar(50) NOT NULL,
`result` longtext,
`date_done` datetime NOT NULL,
`traceback` longtext,
`hidden` bool NOT NULL
) ENGINE=InnoDB ... |
fullscreen #t
undecorated #t
win-origin 0 0 # note: use this to move the window to the location where you need it (on your virtual desktop)
win-size 1024 768 # note: set the size of the window here...
cursor-hidden #t |
-- @testpoint: to_date函数,将文本类型的值转换为指定格式的时间戳,中文参数测试,合理报错
select to_date('2018-01-15','年月日');
select to_date('时间','yyyy'); |
USE employeeDB
INSERT INTO Department (name)
VALUES ("Sales"), ("Engineering"), ("Finance"), ("Legal");
INSERT INTO Role (title, salary, department_id)
VALUES ("Sales Rep", 80000, 1),
("Sales Lead", 100000, 1),
("Lead Engineer", 150000, 2),
("Software Engineer", 120000, 2),
("Account Manager", 160000, 3),
("Accountan... |
<gh_stars>0
UPDATE OPENMM_SHOWS SET NAME = ?, DISPLAY_NAME = ?, TVDB_ID = ?, TVDB_LANG = ?,
IMDB_ID = ?, ZAP2IT_ID = ?, ACTIVE = ?, CONTENT_RATING = ?, BANNER_PATH = ?,
DESCRIPTION = ? WHERE SHOW_ID = ? |
<gh_stars>0
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`url` varchar(500) NOT NULL,
`cache_tags` varchar(1000) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
UNIQUE KEY `url` (`url`(191)),
KEY `cache_tags` (`cache_tags`(191)) |
<reponame>ibrahimalmagharee/UAE-qurum<filename>emirati_genome_v2.sql
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jul 12, 2021 at 02:56 PM
-- Server version: 5.7.28
-- PHP Version: 7.4.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;... |
<reponame>mpiorowski/nextjs-prisma<gh_stars>0
-- CreateTable
CREATE TABLE "categories" (
"id" TEXT NOT NULL,
"user_id" INTEGER NOT NULL,
"title" TEXT NOT NULL,
"description" TEXT,
"views" INTEGER NOT NULL DEFAULT 0,
"active" BOOLEAN NOT NULL DEFAULT true,
"created_at" TIMESTAMP(3) NOT NULL D... |
<reponame>wolf-mtwo/respondon-api<filename>config/respondon-v01.sql
-- phpMyAdmin SQL Dump
-- version 3.4.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 08, 2015 at 08:47 PM
-- Server version: 5.5.20
-- PHP Version: 5.3.9
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/... |
<gh_stars>0
create table Guest
(
guestId varchar(100) not null
primary key,
guestFirstName varchar(100) not null,
guestLastName varchar(100) not null,
guestAddress varchar(100) not null,
passportNumber varchar(100) not nul... |
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_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
-- -------------------------... |
CREATE TABLE SBI_I18N_MESSAGES (
LANGUAGE_CD INTEGER NOT NULL,
LABEL VARCHAR(200) NOT NULL,
MESSAGE TEXT,
PRIMARY KEY (LANGUAGE_CD, LABEL)
);
ALTER TABLE SBI_I18N_MESSAGES ADD CONSTRAINT FK_SBI_I18N_MESSAGES FOREIGN KEY (LANGUAGE_CD) REFERENCES SBI_DOMAINS(VALUE_ID) ON DELETE RESTRICT;
INSERT INTO ... |
<reponame>DenisBuserski/Softuni_Java_DB_MySQL
SELECT
`first_name`
FROM
`employees`
WHERE
`department_id` IN (3 , 10)
AND YEAR(`hire_date`) BETWEEN '1995-01-01' AND '2005-12-01'
ORDER BY `employee_id`; |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 20 Des 2020 pada 13.11
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
alter table users add column system boolean not null default false;
insert into users (system, name, primary_email, login)
values (true, 'root', '<EMAIL>', 'root');
update repositories set owner_id = users.id
from users
where repositories.name like 'General collection' and users.system;
|
SELECT CAST(MIN("MLB_17"."PA") AS BIGINT) AS "TEMP(none:PA:qk lower)(290714814)(1)", CAST(MAX("MLB_17"."PA") AS BIGINT) AS "TEMP(none:PA:qk upper)(290714814)(1)" FROM "MLB_17" HAVING (COUNT(1) > 0);
|
<reponame>flexsocialbox/una
-- SETTINGS
SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES
('modules', 'bx_organizations', '_bx_orgs', 'bx_organizations@modules/boonex/organizations/|std-mi.pn... |
ALTER SHADOW RULE shadow_rule(SOURCE=ds,SHADOW=ds_shadow,
t_order((simple_hint_algorithm, TYPE(NAME=SIMPLE_HINT, PROPERTIES("foo"="bar"))),(TYPE(NAME=REGEX_MATCH, PROPERTIES("operation"="insert","column"="user_id", "regex"='[1]')))),
t_order_item((TYPE(NAME=VALUE_MATCH, PROPERTIES("operation"="insert","column"="user_i... |
<filename>sql/packages.sql<gh_stars>10-100
--
-- Table structure for table `packages`
--
DROP TABLE IF EXISTS `packages`;
CREATE TABLE `packages` (
`id` int(11) NOT NULL default '0',
`name` varchar(80) NOT NULL default '',
`category` int(11) default NULL,
`stablerelease` varchar(20) default NULL,
`develrele... |
CREATE TABLE entry_type (
entry_type_id smallint GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY NOT NULL,
entry_type_name varchar(50) NOT NULL
);
INSERT INTO entry_type VALUES (1,'Object');
INSERT INTO entry_type VALUES (2,'Feature');
CREATE TABLE entry (
entry_id int GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY N... |
WITH crime_and_region AS
(SELECT "mysql"."promethium"."US_REGIONS"."US_STATE" AS "State Code",
"mysql"."promethium"."COMBINED_CRIME_INCIDENTS"."COMBINED_CRIME_INCIDENTS" AS "COMBINED_CRIME_INCIDENTS"
FROM "mysql"."promethium"."COMBINED_CRIME_INCIDENTS"
LEFT OUTER JOIN "mysql"."promethium"."US_REGIONS"... |
<gh_stars>1-10
CREATE PROCEDURE [dbo].[Log_Url]
@url nvarchar(255),
@ipaddress bigint,
@countrycode int,
@latitude float,
@longitude float
AS
BEGIN TRY
DECLARE @id int
SELECT @id = urlId FROM Log_Urls WHERE url=@url
IF @id IS NULL BEGIN
SET @id = NEXT VALUE FOR SequenceLogUrls
INSERT INTO Log_Urls (u... |
<reponame>exantech/monero-fastsync<gh_stars>1-10
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.14
-- Dumped by pg_dump version 9.5.14
-- Started on 2019-01-30 13:33:41 UTC
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELE... |
<reponame>alanfeng99/oracle-db-examples
@connect_admin
set echo on
--
-- WARNING - about to create SPM_TESTU user
--
pause p...
drop user spm_testu cascade;
create user spm_testu identified by spm_testu;
grant connect,resource to spm_testu;
grant unlimited tablespace to spm_testu;
grant select on v_$sqlarea to spm_... |
<reponame>jmgonzmart/ensembl-analysis
delete karyotype from attrib_type, seq_region_attrib, karyotype where attrib_type.code in ('patch_novel','patch_fix') and attrib_type.attrib_type_id = seq_region_attrib.attrib_type_id and seq_region_attrib.seq_region_id = karyotype.seq_region_id;
|
/* blah */
SELECT SUM(1) FROM my_table /* Comments should be preserved. */;
SELECT COUNT(DISTINCT organization.organization_id) FROM organizations;
SELECT /* bleeeeh */ GROUP_CONCAT(DISTINCT a, b, c * 4 ORDER BY blah ASC, blih ASC SEPARATOR ", ") OVER (bleh PARTITION BY a, b ORDER BY c ASC, d ASC);
/* UDF stuff: */
S... |
<reponame>slandry90/vinyldns
CREATE SCHEMA IF NOT EXISTS ${dbName};
USE ${dbName};
ALTER TABLE membership ADD COLUMN is_admin TINYINT(1) NOT NULL;
|
<reponame>66254264/Activiti<filename>activiti-core/activiti-engine/src/main/resources/org/activiti/db/upgrade/activiti.h2.upgradestep.50.to.51.engine.sql
alter table ACT_RU_VARIABLE
add TASK_ID_ varchar(64);
|
<reponame>pdv-ru/ClickHouse<filename>tests/queries/0_stateless/01414_low_cardinality_nullable.sql
DROP TABLE IF EXISTS lc_nullable;
CREATE TABLE lc_nullable (
order_key Array(LowCardinality(Nullable(UInt64))),
i8 Array(LowCardinality(Nullable(Int8))),
i16 Array(LowCardinality(Nullable(Int16))),
i32... |
<filename>pljava-setup.sql
-- PL/Java psql installation script
-- See https://tada.github.io/pljava/install/install.html
-- this lets us verify successful installation
-- we should see 'NOTICE: PL/Java loaded'
SET client_min_messages TO NOTICE;
CREATE EXTENSION pljava;
GRANT USAGE ON LANGUAGE java TO public;
|
-- Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (https://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
CREATE TABLE TEST(A INT CONSTRAINT PK_1 PRIMARY KEY);
> ok
SELECT CONSTRAINT_NAME, CONSTRAINT_TYPE FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS;
> CONSTRA... |
<gh_stars>0
USE iproject44
GO
INSERT INTO Land (naam)
VALUES (1, 'Nederland');
--Scenario 1, controle optie "creditcard" en geen creditcard nummer ingevuld en ook geen rekening nummer
INSERT INTO Gebruiker (gebruikersnaam, voornaam, achternaam, adresregel1, postcode, plaatsnaam, land, geboortedatum, email, wachtwoord,... |
<reponame>opengauss-mirror/Yat<filename>openGaussBase/testcase/KEYWORDS/octet_length/Opengauss_Function_Keyword_Octet_length_Case0021.sql
-- @testpoint: opengauss关键字octet_length(非保留),作为函数名,部分测试点合理报错
--关键字不带引号-成功
drop function if exists octet_length(i integer);
create function octet_length(i integer)
returns integer
as... |
<filename>cmd/create_sqlite_db/sync_init.sql
CREATE TABLE sync_log (
id INTEGER NOT NULL,
title TEXT,
modified DATETIME,
note TEXT,
PRIMARY KEY (id)
);
|
<reponame>Niloy1178/Plan-Healthy<filename>Main/PLAN HEALTHY/plan_healthy.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 09, 2021 at 05:57 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZE... |
<reponame>metrics-matcher/metrics-matcher
-- Select date
SELECT TO_DATE('2019-02-28', 'YYYY-MM-DD') FROM DUAL |
-- Copyright 2007, 2008, <NAME>, <NAME>
--
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program ... |
CREATE OR REPLACE FUNCTION UW_SIMPLE_A
(
p_number_a number
)
RETURN VARCHAR2 AS
L_VAR_A number := 100;
BEGIN
L_VAR_A := p_number_a * L_VAR_A;
RETURN L_VAR_A;
END;
|
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.4
-- Dumped by pg_dump version 13.3
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', fal... |
Insert into eg_action(id,name,url,parentmodule,ordernumber,displayname,enabled,contextroot,application) values(nextval('SEQ_EG_ACTION'),'New-Function','/function/new',(select id from eg_module where name='Function'),1,'New-Function',true,'EGF',(select id from eg_module where name='EGF' and parentmodule is null));
Inse... |
DROP TABLE IF EXISTS TweetDummy3;
CREATE TABLE TweetDummy3 (
Id VARCHAR(1023) NOT NULL,
Author VARCHAR(1023) NOT NULL,
CommitedAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
Content VARCHAR(1023) NOT NULL,
Count INT(64) NOT NULL,
CreatedAt TIMESTAMP NOT NULL,
Favos VARCHAR(1023) NOT NULL,... |
<filename>raw/ATM/swvw_accbal_3.sql<gh_stars>0
CREATE OR REPLACE FORCE VIEW "NFCSUP"."SWVW_ACCBAL" ("BRANCH_CODE", "SEPERATOR", "CUST_AC_NO", "CCY_CODE", "AC_TYPE", "AC_STAT", "DR_CR", "AVL_BAL", "BLCKD_AMT", "FCLTY_AMT", "BAL_DATE") AS
Select Distinct a_Rec.Branch_Code,
'|' As Seperator,
... |
--DROP TABLE cw_users IF EXISTS;
CREATE TABLE cw_users (
cw_users_id INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 100, INCREMENT BY 1) PRIMARY KEY,
name VARCHAR(50),
cw_id BIGINT,
password VARCHAR(100),
email VARCHAR(50),
role VARCHAR(100),
designation VARCHAR(100),
department VARCHAR... |
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 29, 2022 at 03:03 PM
-- Server version: 10.3.32-MariaDB-0ubuntu0.20.04.1
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... |
USE DBA_Util
GO
IF EXISTS (SELECT 1 FROM sys.procedures WHERE name = 'LogicalFileName_Standardize')
BEGIN
DROP PROCEDURE LogicalFileName_Standardize
END
GO
CREATE PROCEDURE LogicalFileName_Standardize (@first_run BIT = 0)
WITH ENCRYPTION
AS
BEGIN
DECLARE @sql VARCHAR(MAX)
SET @sql =... |
DROP INDEX "username";
DROP INDEX "date";
DROP INDEX "channelId";
CREATE INDEX "channelDateTime" ON "lines" ("channelId","time","date");
CREATE INDEX "usernameDateTime" ON "lines" ("time","date","username");
VACUUM;
|
--New table for property department
CREATE TABLE egpt_department (
id bigint primary key not null,
name character varying(200) not null,
category character varying(10) not null,
createddate timestamp without time zone,
code ... |
alter table "user" alter column activated set default false;
|
<filename>source/DatabaseProjects/trainingDW/trainingDW/dim/Tables/dim.DeliveryStatus.sql<gh_stars>10-100
CREATE TABLE [dim].[DeliveryStatus]
(
[DeliveryStatusId] INT IDENTITY (1, 1) NOT NULL,
[Status] varchar(15),
[LastUpdated] DATE NULL
)
Go
CREATE UNIQUE CLUSTERED INDEX [cix_DeliveryStatus_DeliveryStatusId... |
GO
CREATE TRIGGER unit_insert_log
ON a_unit FOR INSERT AS
BEGIN
INSERT INTO a_UnitLog(
userName,
logDate,
SerialNumber)
VALUES(
USER,
GETDATE(),
(SELECT serialNumber from INSERTED) )
END
INSERT INTO a_Unit VALUES(35649,212,getDate());
select * from a_UnitLog
|
# Write your MySQL query statement below
SELECT MAX(num) AS num
FROM
(SELECT num
FROM
`my_numbers`
GROUP BY num
HAVING COUNT(num) = 1) AS t;
|
-- CreateEnum
CREATE TYPE "Status" AS ENUM ('PENDING', 'CREATED', 'APPROVED', 'SCHEDULED', 'REJECTED');
-- CreateTable
CREATE TABLE "Transfer" (
"externalId" SERIAL NOT NULL,
"internalId" VARCHAR(255),
"status" "Status" NOT NULL DEFAULT E'PENDING',
"amount" INTEGER NOT NULL,
"expectedOn" TIMESTAMP(... |
<filename>scripts/postgres/tree/procedures.sql
select
'procedure' node_type,
p.oid id,
format(
'%I <span class="light">(%s)</span>', --<br/> -> %s</span>',
p.proname,
--pg_get_function_identity_arguments(p.oid),
oidvectortypes(p.proargtypes)
--pg_get_function_result(p.oid)
) ui_name,
quote_ident(p... |
-- This migration allows a faux devlocal certicate to have access to the Orders API locally.
-- Marine Corps devlocal certificate config/tls/devlocal-faux-marine-corps-orders.cer
INSERT INTO public.client_certs (
id,
sha256_digest,
subject,
allow_orders_api,
allow_air_force_orders_read,
allow_air_force_orders_wri... |
<gh_stars>1000+
INSERT INTO extension_sql VALUES ('single');
|
create table account (
id int primary key,
balance int
);
insert into account values(1,0),(2,100);
|
with table_row_counts as (
select distinct '_airbyte_raw_exchange_rate' as label, count(*) as row_count, 4 as expected_count
from {{ source('test_normalization', '_airbyte_raw_exchange_rate') }}
union all
select distinct 'exchange_rate' as label, count(*) as row_count, 17 as expected_count
from {{ ref('... |
SELECT * from system.query_log;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.