sql stringlengths 6 1.05M |
|---|
<filename>src/test/resources/sql/alter_text_search/8f35be93.sql
-- file:alter_generic.sql ln:477 expect:true
ALTER TEXT SEARCH DICTIONARY alt_ts_dict1 RENAME TO alt_ts_dict3
|
-- 2021-10-29T05:58:35.133Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2021-10-29 08:58:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=578098
;
-- 2021-10-29T05:58:36.180Z
-- I forgot to set the DICTIONARY_ID_COMMENTS Syst... |
<gh_stars>0
SET time_zone = "+00:00";
INSERT INTO `forum` (`id`, `title`, `description`, `forum_category_id`, `minimum_access`) VALUES
(1, 'Announcements', 'Public announcements and information', 1, 'member'),
(2, 'Introductions', 'Make your introduction here', 1, 'member'),
(3, 'The Pub', 'For general chat that doesn... |
/*
* Copyright (c) 2017 LabKey Corporation
*
* 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 the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
<filename>facebase/00_common_functions.sql
-- BEGIN transaction
BEGIN;
CREATE OR REPLACE FUNCTION public.unset_bulk_upload() RETURNS BOOLEAN AS $$
SELECT set_config('rbk.bulk_upload', 'False', False);
SELECT true;
$$ LANGUAGE SQL;
CREATE or REPLACE FUNCTION public.get_bulk_upload() RETURNS BOOLEAN AS $$
SEL... |
CREATE PROCEDURE dbo.TPW_SERVICE_RUN_PJOB
(
@inPJob_ID INT
)
AS
/* SET NOCOUNT ON */
DECLARE @tReturn INT;
EXEC @tReturn = dbo.TPW_SERVICE_ON_PJOB_EVENT @inPJob_ID, N'RUN';
IF @tReturn < 0
RETURN @tReturn;
UPDATE dbo.TPW_PJOB
SET START_TIME = GETDATE()
WHERE PJOB_ID = @inPJob_ID;
SELECT... |
UPDATE identity_verifiable_addresses SET code = substr(md5(random()::text), 0, 32) WHERE code IS NULL |
<gh_stars>1-10
-- Find service accounts
select *
from sys.dm_server_services; |
drop if exists t1;
create table t1(i int);
insert into t1 values(1);
insert into t1 values(3);
insert into t1 values(5);
with recursive cte as (
select 1 m,1 n,1 l
union all
select 1,avg(i) over(order by i),rownum from t1 where i<=1
union all
select m+1,n+1,l+1 from cte where l<5
)
select * from cte order by 1;
wit... |
<gh_stars>1-10
--+ holdcas on;
set system parameters 'dont_reuse_heap_file=yes';
create table t2(a integer not null, b integer, c integer, d varchar(256));
insert into t2 values
(4, 5, 6, '456'),
(3, 4, 5, '345'),
(2, 3, 4, '234'),
(5, 8, 7, '587'),
(5, 9, 9, '599');
create index i_t2_a_b on t2(a, b);
create in... |
set synchronous_commit=remote_apply;
show synchronous_commit;
synchronous_commit
--------------------
remote_apply
(1 row)
set synchronous_commit=2;
show synchronous_commit;
synchronous_commit
--------------------
remote_apply
(1 row) |
INSERT INTO turbo.pages (id, alias, created_at, updated_at) VALUES (1, '/', null, null);
INSERT INTO turbo.pages (id, alias, created_at, updated_at) VALUES (2, '/servoprivod', null, null);
INSERT INTO turbo.pages (id, alias, created_at, updated_at) VALUES (3, '/sale', null, null);
INSERT INTO turbo.pages (id, alias, cr... |
/** FOR DEVELOPMENT OF DATABASE CODES
USED FOR CREATING A NEW DATABASE FOR RPFP
BY DELETING THE OLD ONE
mysql -u root test < drop_rpfp.sql
mysql -u root test < rpfp.sql
*/
DROP DATABASE IF EXISTS rpfp;
DROP ROLE IF EXISTS no_scope;
DROP ROLE IF EXISTS rpfp_login;
DROP ROLE IF EXISTS itdmu;
DROP ROLE ... |
<reponame>kinpa200296/DB_labs
USE lab3;
SELECT Specification, Price, Residue
FROM Stock
WHERE (GoodId = 101) AND (Residue > 100); |
CREATE DATABASE T_Ssolve
USE T_Ssolve
CREATE TABLE Clientes
(
IdCliente Int PRIMARY KEY IDENTITY
,NomeFantasia VARCHAR (255) NOT NULL
,CNPJ VARCHAR (11) NOT NULL UNIQUE
,RazaoSocial VARCHAR (255) NOT NULL
,EnderecoCompleto VARCHAR (255) NOT NULL
);
CREATE TABLE Funcionarios
(
IdFuncionario INT PRIMARY KEY IDENTITY... |
<gh_stars>0
BEGIN;
CREATE TABLE services (
id SERIAL NOT NULL,
name TEXT NOT NULL,
description TEXT,
updated_by TEXT NOT NULL,
PRIMARY KEY (id),
UNIQUE (name)
);
CREATE TABLE notification_lists (
id SERIAL NOT NULL,
name TEXT NOT NULL,
recipients TEXT[] NOT NULL,
updated_by TEXT NOT NULL,
PRIMARY K... |
CREATE PROCEDURE [dbo].[StaffSearchCertificates_Count]
@Search nvarchar(50)
AS
BEGIN
SELECT SUM(ab.Count)
FROM
(
SELECT COUNT(ce1.Id) AS 'Count'
FROM Certificates ce1
JOIN Organisations org ON ce1.OrganisationId = org.Id
LEFT JOIN Ilrs il1 ON ce1.StandardCode = il1.StdCode AND ce1.Uln = il1.Uln
WHERE JS... |
/*
Warnings:
- Added the required column `messageBusId` to the `Tenant` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE `tenant` ADD COLUMN `messageBusId` VARCHAR(191) NOT NULL;
-- AddForeignKey
ALTER TABLE `Tenant` ADD CONSTRAINT `Tenant_messageBusId_f... |
<filename>src/db-from-phile-starter/schema/ex/revert/structure/counter.sql
-- Revert ex:structure/counter from pg
BEGIN;
DROP TABLE IF EXISTS ex.counter;
COMMIT;
|
<gh_stars>1-10
/**
* @signature 4bd47d94b10bd8a6bab35c119dadf41f
* @version v1.14.0
* @title Ticket Merge Patch
*
* This patch adds a new table, thread_entry_merge, to helpdesks if they
* have the field 'extra' in their thread_entry table
*
*/
-- Create a new table for merge data
CREATE TABLE IF NOT EXISTS `%TABLE_PREF... |
/******************************************************************************************/
/* Locale String Resources */
/* */
/* Summary: This will insert any missing resources for the BitShift FirstData plugi... |
CREATE TABLE `comment` (
`id` varchar(36) NOT NULL,
`content` varchar(100) DEFAULT NULL,
`post_user_name` varchar(20) DEFAULT NULL,
`image` varchar(100) DEFAULT NULL,
`article_id` varchar(36) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENG... |
select * from grasp where hand_name='SHADOW_HAND';
select * from original_model
where original_model_id in
(select original_model_id from scaled_model
where scaled_model_id in (select distinct scaled_model_id from grasp
where hand_name='SHADOW_HAND'));
select * from original_model
where original_model_id in
( s... |
<filename>conf/evolutions/default/58.sql
# --- !Ups
DELETE FROM issue_event WHERE event_type = 'ISSUE_REFERRED';
ALTER TABLE issue_event DROP CONSTRAINT IF EXISTS ck_issue_event_event_type;
ALTER TABLE issue_event ADD CONSTRAINT ck_issue_event_event_type check (event_type in ('NEW_ISSUE','NEW_POSTING','ISSUE_ASSIGNEE_C... |
-- file:domain.sql ln:461 expect:true
create domain ddtest1d as ddtest1[]
|
<reponame>cse-library/koha
INSERT INTO subscription_numberpatterns
(label, displayorder, description, numberingmethod,
label1, add1, every1, whenmorethan1, setto1, numbering1,
label2, add2, every2, whenmorethan2, setto2, numbering2,
label3, add3, every3, whenmorethan3, setto3, numbering3)
VALUES
('N... |
<reponame>DoctorMalitu/Proyectobaslab
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 09-02-2020 a las 23:08:26
-- Versión del servidor: 10.3.16-MariaDB
-- Versión de PHP: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START... |
create or replace function management.get_emis_extract_dates
()
returns table
(
extract_date varchar,
ex1 integer,
ex2 integer,
ex3 integer,
ex4 integer
)
as $$
with extracts as
(
select
configuration_id as extract_id,
substring(batch_identifier, 1, 10) as extract_date
from log.batch b
)
select
... |
<reponame>ciphergateway/securityinjava
drop table if exists RM_M_MESSAGE_USER;
drop table if exists RM_MESSAGE_RECEIVER;
drop table if exists RM_MESSAGE;
/*==============================================================*/
/* Table: RM_MESSAGE */
/*==========================... |
create table theTable(
aName nvarchar(200),
aValue nvarchar(200)
) |
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1063313632140779522', 'tag', '0', '[0],', '审批', '', '/tag', '99', '1', '1', NULL, '1', '0');
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `ico... |
create table tab_long
(
col00000000000000000 date,
col00000000000000001 date,
col00000000000000002 date,
col00000000000000003 date,
col00000000000000004 date,
col00000000000000005 date,
col00000000000000006 date,
col00000000000000007 date,
col00000000000000008 date,
col00000000000000009 date,
col0... |
<filename>dbicdh/MySQL/upgrade/46-47/001-auto.sql<gh_stars>0
-- Convert schema '/home/melmoth/amw/AmuseWikiFarm/dbicdh/_source/deploy/46/001-auto.yml' to '/home/melmoth/amw/AmuseWikiFarm/dbicdh/_source/deploy/47/001-auto.yml':;
;
BEGIN;
;
ALTER TABLE custom_formats ADD COLUMN bb_continuefootnotes smallint NULL DEFAUL... |
-- Created on Feb 3rd, 2014
-- @author: <NAME>
-- Feature 206: Lab Grade: Number of lab problems correct in a week's problems / number of lab problems in a week
-- Meant to be run in order to run after problem_populate_module_week.sql
set @current_date = cast('CURRENT_DATE_PLACEHOLDER' as datetime);
set @num_weeks = ... |
<reponame>Lopofsky/proterative<filename>src/scripts/schedule.sql<gh_stars>0
DROP TABLE IF EXISTS "Schedule2021";
DROP SEQUENCE IF EXISTS "Schedule_ID_seq1";
CREATE SEQUENCE "Schedule_ID_seq1" INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1;
CREATE TABLE "public"."Schedule2021" (
"ID" integer DE... |
--comment: changed file
CREATE TABLE Schema2.[LookupTable2](
[Lookup2Key] [int] NOT NULL,
[Lookup2Value] [nvarchar](50) NOT NULL,
CONSTRAINT [PK_LookupTable2] PRIMARY KEY CLUSTERED
(
[Lookup2Key] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS ... |
<reponame>moonafrose/LeetCode
/*
https://leetcode.com/problems/rising-temperature/
Given a Weather table, write a SQL query to find all dates' Ids with higher temperature compared to its previous (yesterday's) dates.
+---------+------------------+------------------+
| Id(INT) | RecordDate(DATE) | Temperature(INT) |
... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Apr 29, 2019 at 09:11 AM
-- Server version: 5.7.24
-- PHP Version: 7.1.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
CREATE TABLE organization (
id serial PRIMARY KEY,
name varchar(255) NOT NULL UNIQUE,
status integer NOT NULL
);
|
-------------------------------------------------------------------------------
--
-- Script: hidden_parameters.sql
-- Purpose: to list the hidden parameters
-- For: 7.3
--
-- Copyright: (c) Ixora Pty Ltd
-- Author: <NAME>
--
-------------------------------------------------------------------------------
@sa... |
SELECT ROUND(LONG_W, 4)
FROM STATION
WHERE LAT_N = (SELECT MAX(LAT_N)
FROM STATION
WHERE LAT_N < 137.2345); |
-- file:json.sql ln:251 expect:true
select (test_json->3) is null as expect_false
from test_json
where json_type = 'array'
|
<gh_stars>10-100
-- file:update.sql ln:95 expect:true
WITH aaa AS (SELECT 1 AS a, 'Foo' AS b) INSERT INTO upsert_test
VALUES (1, 'Bar') ON CONFLICT(a)
DO UPDATE SET (b, a) = (SELECT b, a FROM aaa) RETURNING *
|
<gh_stars>1-10
SELECT enumlabel FROM pg_catalog.pg_enum WHERE pg_enum.enumtypid = $1
;
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Base de données : ... |
--<snippetFS_Enable>
EXEC sp_filestream_configure
@enable_level = 3;
--</snippetFS_Enable>
--<snippetFS_CreateDB>
CREATE DATABASE Archive
ON
PRIMARY ( NAME = Arch1,
FILENAME = 'c:\data\archdat1.mdf'),
FILEGROUP FileStreamGroup1 CONTAINS FILESTREAM( NAME = Arch3,
FILENAME = 'c:\data\filestrea... |
create table roles
(
id bigserial not null
constraint roles_pk
primary key,
name varchar(255)
);
alter table roles owner to postgres;
|
<filename>install.sql
USE users;
CREATE TABLE `members` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`username` VARCHAR(50) NOT NULL,
`password` VARCHAR(45) NOT NULL,
PRIMARY KEY (`id`)
);
|
<filename>viki-home-core/db/migration/mi/V1.0.0__Extension_Mi_initialization.sql<gh_stars>0
/** XiaoMi Smart Home Protocol Extension **/
/** Gateway Information **/
CREATE TABLE ext_mi_gateway(
gid TEXT NOT NULL,
model TEXT NOT NULL,
protocol_version TEXT NOT NULL,
password TEXT,
token TEXT NOT NULL,
addre... |
<reponame>liangry/sqlparser
SELECT * FROM t1 WHERE name = "<NAME>"
UNION
SELECT * FROM t2 |
<gh_stars>1-10
create table notebook_history (
id bigint unsigned not null auto_increment
, notebook_id bigint unsigned not null
, title varchar(128) not null
, is_completed bool not null default false
, completed_at timestamp null
, creator_uid varchar(64) not null
, created_at timestamp not null default current_tim... |
-- practice1
SELECT
C.CategoryID,
C.CategoryName,
SUM(A.Quantity)
FROM
Sales AS A
JOIN
Products AS B
ON A.ProductID = B.ProductID
JOIN
Categories AS C
ON B.CategoryID = C.CategoryID
GROUP BY
C.CategoryID;
-- practice2
SELECT
SUM(A.Quantity) AS 合計数量,
C.PrefecturalID,
C.PrefecturalName AS 県名
FROM
Sales AS A
JOIN
Custome... |
<gh_stars>1-10
DELETE FROM waffle_switch_amo WHERE name='soft_delete';
DELETE FROM waffle_switch_mkt WHERE name='soft_delete';
|
<reponame>jxckUK/snaily-cadv4<filename>packages/api/prisma/migrations/20220521060146_/migration.sql
-- AlterTable
ALTER TABLE "OfficerLog" ADD COLUMN "emsFdDeputyId" TEXT,
ALTER COLUMN "officerId" DROP NOT NULL;
-- AddForeignKey
ALTER TABLE "OfficerLog" ADD CONSTRAINT "OfficerLog_emsFdDeputyId_fkey" FOREIGN KEY ("... |
{{ config(
materialized = 'incremental',
unique_key = "block_id",
incremental_strategy = 'delete+insert',
cluster_by = ['block_timestamp::DATE'],
) }}
WITH v AS (
SELECT
block_id,
count(block_id) AS num_votes
FROM {{ ref('silver__votes') }}
{% if is_incremental() %}
WHERE ingest... |
Create user telegram with encrypted password '<PASSWORD>' |
<reponame>suzonice15/insurence_company
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 25, 2019 at 12:17 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.2.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET ... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 21, 2018 at 04:11 PM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
CREATE TABLE [dbo].[Employee] (
[EmployeeID] INT NOT NULL,
[Name] VARCHAR (20) NOT NULL,
[Surname] VARCHAR (25) NOT NULL,
[Gender] VARCHAR (6) NULL,
[Email] VARCHAR (50) NULL,
[PhoneNumber] VARCHAR (20) NULL,
[PESEL] CHAR (11) NOT NULL,
[... |
create table practice_log (
practice_log_id INT NOT NULL AUTO_INCREMENT,
practice_date date,
kind varchar(32),
body text,
primary key (practice_log_id),
index (practice_date)
); |
CREATE FUNCTION fnEstadoDeReparacion_SeleccionarTodo ()
RETURNS TABLE
AS
RETURN
SELECT * FROM vwEstadoDeReparaciones_SeleccionarTodo |
<reponame>du48s03/AWSOME-TF2-DATA-SCANNER<gh_stars>1-10
INSERT INTO Team(id,name) VALUES(1,'Reason Gaming');
INSERT INTO Team(id,name) VALUES(2,'The Last Resort');
INSERT INTO Team(id,name) VALUES(3,'nerdRage.tf2');
INSERT INTO Team(id,name) VALUES(4,'Hello <NAME>!');
INSERT INTO Team(id,name) VALUES(5,'top5rocket');
I... |
<gh_stars>1-10
select a,v from Answer as a join a.votes as v where v.author = :author and a.question = :question
CREATE TABLE `News_Flags` ( `News_id` bigint(20) NOT NULL, `flags_id` bigint(20) NOT NULL, UNIQUE KEY `UK_s0ugdfyknbgui197dcioqqovi` (`flags_id`), KEY `FK_s0ugdfyknbgui197dcioqqovi` (`flags_id`), KEY `FK_fr0... |
DELETE FROM gamle_utbetalinger;
ALTER TABLE gamle_utbetalinger DROP COLUMN maksdato;
ALTER TABLE gamle_utbetalinger ADD COLUMN gjenstaende_sykedager INT;
|
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 08 Apr 2020 pada 16.37
-- Versi Server: 5.6.43-log
-- PHP Version: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... |
<filename>DatabaseScripts/EasyNetQ.Scheduler/mssql/uspGetNextBatchOfMessages.sql
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[uspGetNextBatchOfMessages]') AND type_desc IN ('SQL_STORED_PROCEDURE'))
BEGIN
PRINT 'Dropping procedure [dbo].[uspG... |
DROP TABLE IF EXISTS "users";
CREATE TABLE "users" (
"id" bigserial,
"nickname" varchar(255) NOT NULL UNIQUE,
"email" varchar(100) NOT NULL UNIQUE,
"password" varchar(100) NOT NULL,
"created_at" timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
"updated_at" timestamp with time zone DEFAULT CUR... |
--
-- CzechIdM 11 Flyway script
-- BCV solutions s.r.o.
--
-- Script fixing wrong V10_04_004__delegations.sql where was used public schema. That script was removed and replaced by this one.
-- Delegations
CREATE TABLE IF NOT EXISTS idm_delegation (
id bytea NOT NULL,
created timestamp NOT NULL,
creator varchar(25... |
ALTER TABLE task_message CHARACTER SET = 'utf8mb4';
ALTER TABLE task_message MODIFY message VARCHAR(1023) CHARACTER SET utf8mb4 NOT NULL;
ALTER TABLE issue_message CHARACTER SET = 'utf8mb4';
ALTER TABLE issue_message MODIFY message VARCHAR(1023) CHARACTER SET utf8mb4 NOT NULL;
ALTER TABLE project_message CHARACTER SE... |
-- 2018-07-27T16:42:56.205
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_EntityType (EntityType,Processing,AD_Client_ID,IsActive,CreatedBy,ModelPackage,AD_EntityType_ID,IsDisplayed,AD_Org_ID,Name,UpdatedBy,Created,Updated) VALUES ('de.metas.vertical.cables','N',0,'Y',100,'de.metas.ver... |
\. ./mysql/dml/KR_DML_01_KCCOI-102_B000.sql
\. ./mysql/dml/KR_DML_01_KCCOI-107_B000.sql
\. ./mysql/dml/KR_DML_01_KCCOI-182_B000.sql
\. ./mysql/dml/KR_DML_01_KCCOI-200_B000.sql
\. ./mysql/dml/KR_DML_01_KCCOI-27_B000.sql
\. ./mysql/dml/KR_DML_01_KCCOI-46_B000.sql
\. ./mysql/dml/KR_DML_01_KCCOI-47_B000.sql
\. ./mysql/dml/... |
-- Receptionist Marta
insert into SEC_USER
(ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, LOGIN, LOGIN_LC, PASSWORD, PASSWORD_ENCRYPTION, NAME, FIRST_NAME, LAST_NAME, MIDDLE_NAME, POSITION_, EMAIL, LANGUAGE_, TIME_ZONE, TIME_ZONE_AUTO, ACTIVE, CHANGE_PASSWORD_AT_LOGON, GROUP_ID, GRO... |
DROP TABLE IF EXISTS Test;
CREATE TABLE Test (
createdDate Date,
str String,
key Enum8('A' = 0, 'B' = 1, 'ALL' = 2),
a Int64
)
ENGINE = MergeTree(createdDate, str, 8192);
INSERT INTO Test VALUES ('2000-01-01', 'hello', 'A', 123);
SET max_threads = 1;
CREATE VIEW TestView AS
SELECT str, key, sumI... |
-- 用户表
CREATE TABLE tb_user (
user_id bigint NOT NULL IDENTITY(1,1),
username varchar(50) NOT NULL,
mobile varchar(20) NOT NULL,
password varchar(64),
create_time datetime,
PRIMARY KEY (user_id),
UNIQUE (username)
);
-- 账号:13612345678 密码:<PASSWORD>
INSERT INTO tb_user (username, mobile, pass... |
<filename>flink-connector-mysql-cdc/src/test/resources/ddl/column_type_test.sql<gh_stars>10-100
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The AS... |
<reponame>kuro-channel/knowledge-1
SELECT * FROM USER_CONFIGS
ORDER BY INSERT_DATETIME %s;
|
<reponame>fossabot/automate-1
CREATE OR REPLACE FUNCTION test_user_tokens_table()
RETURNS SETOF TEXT
LANGUAGE plpgsql
AS $$
BEGIN
RETURN QUERY SELECT has_table('user_tokens');
-- Columns
RETURN QUERY SELECT columns_are('user_tokens', ARRAY['id',
'auth_token',... |
-- Here we ensure that we clean up resource queue in-memory state gracefully
-- in the face of deadlocks and statement cancellations, when there is more than
-- one active portal in the session.
0:CREATE RESOURCE QUEUE rq_multi_portal WITH (active_statements = 2);
0:CREATE ROLE role_multi_portal RESOURCE QUEUE rq_multi... |
------------------------------
-- Archivo de base de datos --
------------------------------
DROP TABLE IF EXISTS roles CASCADE;
CREATE TABLE roles
(
id BIGSERIAL PRIMARY KEY
, rol VARCHAR(255) NOT NULL
);
DROP TABLE IF EXISTS estados CASCADE;
CREATE TABLE estados
(
id BIGSERIAL PRIMARY KEY
, est... |
<reponame>all-of-us/research<filename>api/tools/src/main/resources/bigquery/es_person.sql<gh_stars>10-100
SELECT p.person_id _id,
DATE(p.birth_datetime) birth_datetime,
cbp.age_at_consent,
cbp.age_at_cdr,
p.gender_concept_id,... |
<filename>src/app/voltdb/voltdb_src/tests/sqlcoverage/template/string/advanced-strings.sql<gh_stars>10-100
<configure-for-string.sql>
<advanced-template.sql>
-- patterns in set 1 contain '%'
{_patterns1 |= "'abc%'"}
-- Uncomment after ENG-9449 is fixed:
--{_patterns1 |= "'%'"}
{_patterns1 |= "'!%'"}
{_patterns1 |= "'a... |
COMMENT ON SCHEMA
arp_naturschutzobjekte
IS
'Erfassungsmodell für die Naturschuztobjekte. Fragen: <EMAIL>'
;
CREATE ROLE arp_naturschutzobjekte_read
;
CREATE ROLE arp_naturschutzobjekte_write
;
GRANT arp_naturschutzobjekte_read TO barpa, bjsvw
;
GRANT arp_naturschutzobjekte_write TO barpabur, barparuf, gdi_wri... |
-- Код создания
CREATE TABLE application_area (
aa_area VARCHAR(20) PRIMARY KEY
);
-- Пример ввода данных
INSERT INTO application_area ( aa_area ) VALUES ( 'тест обл' );
-- Код создания
CREATE TABLE programs (
prog_contract NUMBER(10) PRIMARY KEY
REFERENCES products ( prod_contract ),
prog_ar... |
<gh_stars>0
CREATE TABLE
INSERT INTO USERS(USER_ID,USERNAME,PASSWORD,ENABLED)
VALUES ('1', 'admin1','$2y$12$xueuMR.pK9QLeXC653apTu4DCSU4JCdM97/I9Rdr0Zjxwp79bxgk.','1');
INSERT INTO USERS(USER_ID,USERNAME,PASSWORD,ENABLED)
VALUES ('2', 'admin2','$2y$12$xueuMR.pK9QLeXC653apTu4DCSU4JCdM97/I9Rdr0Zjxwp79bxgk.',... |
<gh_stars>0
CREATE OR REPLACE VIEW vw_psa_uat_wfp_instances_dbg AS
WITH
-- 03-Mar-2021,R.Donakonda: created UAT test dbg view for WorkFlowProcessInstance table
new_op AS
(
SELECT --+ materialize
DISTINCT psl.psuid,wfpi.*
FROM vw_psa_plan_sponsor_list psl
JOIN ahmadmi... |
<filename>shoes.sql
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Jul 22, 2017 at 01:39 AM
-- Server version: 5.6.35
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... |
use iproject19
GO
/*
Insert items manually!
*/ |
<filename>banco-de-dados-2/indices/json.sql
create table students (info jsonb);
do $$
declare
vartype varchar[] = '{"quiz", "exam", "homework"}';
begin
for i in 1..1000000 loop
for j in 1..3 loop
insert into students values (('
{
"student" : ' || i || ',
"type" : "' || vartype[j] || '",
"score" : ' || round(random()*... |
<filename>JobExecutionFramework/SSISDB/catalog/Views/folders.sql<gh_stars>1-10
CREATE VIEW [catalog].[folders]
AS
SELECT [folder_id],
[name],
[description],
[created_by_sid],
[created_by_name],
[created_time]
FROM [internal].[folders]
WHERE [f... |
rem
rem Drops Quilt schema
rem
rem Usage
rem sql @drop.sql <environment>
rem
set verify off
define g_environment = "&1"
prompt init sqlsn
@sqlsnrc
--we need sqlsn run module to traverse directory tree during install
prompt require sqlsn-run module
@&&sqlsn_require sqlsn-run
prompt define action and script
define... |
<filename>DQE 1.0.7/DQECodeDeployment/0 Database Deployment/300_Tables/MDS.DQAppDataTypeConversion.sql
USE [DataQualityDB]
GO
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'DQAppDataTypeConversion'
AND TABLE_SCHEMA = 'MDS' )
BEGIN
CREATE TABLE [MDS].[DQAppDataTypeConversion](
[ID] [... |
-- --------------------------------------------------------
-- Host: phobos
-- Server version: 10.1.23-MariaDB-9+deb9u1 - Raspbian 9.0
-- Server OS: debian-linux-gnueabihf
-- HeidiSQL Version: 9.5.0.5196
-- ---------------------------------------... |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 14, 2015 at 05:38 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
<reponame>Foxpips/LayeredArchitecture<gh_stars>1-10
CREATE PROCEDURE dbo.h3giDepoitAmountRemove
@amount float
AS
UPDATE h3giDepositAmounts
SET isValid = 0
WHERE amount = @amount
GRANT EXECUTE ON h3giDepoitAmountRemove TO b4nuser
GO
GRANT EXECUTE ON h3giDepoitAmountRemove TO reportuser
GO
|
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 05, 2019 at 09:53 AM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<filename>migrations/committed/000002.sql
--! Previous: sha1:6bcafce6ca0ba83238a17cab5b7969bc743146a3
--! Hash: sha1:dab308c7224d3cec95bef45d5cf87e620351e52d
-- Enter migration here
-- Tests for #48
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
DROP TABLE IF EXISTS app_public.profile;
CREATE TABLE app_public.profile... |
<gh_stars>10-100
-- file:drop_if_exists.sql ln:228 expect:true
DROP OPERATOR FAMILY IF EXISTS test_operator_family USING no_such_am
|
<gh_stars>0
CREATE SEQUENCE SEQ_PROTO_STUDY_GRP_SPC_ID INCREMENT BY 1 START WITH 1 NOCACHE
/
|
--
-- Create new table and indices for monitoring
--
create table JIReportMonitoringFact (
id numeric(19,0) identity not null,
date_year smallint not null,
date_month tinyint not null,
date_day tinyint not null,
time_hour tinyint not null,
time_minute tinyint not nul... |
<reponame>sqitchers/sqitch-mysql-intro
-- Verify insert_list
BEGIN;
SELECT sqitch.checkit(COUNT(*), 'Procedure "insert_list" does not exist')
FROM mysql.proc
WHERE db = database()
AND specific_name = 'insert_list';
ROLLBACK;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.