sql stringlengths 6 1.05M |
|---|
<reponame>laingsimon/vcdb<gh_stars>1-10
ALTER TABLE [dbo].[Person]
DROP CONSTRAINT [FK_Person_FavouriteCar]
GO
EXEC sp_rename
@objname = 'dbo.Person.FavouriteCar',
@newname = 'FavouriteCarId',
@objtype = 'COLUMN'
GO
ALTER TABLE [dbo].[Car]
DROP CONSTRAINT [PK__Car__3214EC07/[A-Z0-9]{8}/]
GO
EXEC sp_rename
... |
DELETE from task;
INSERT INTO task(`id`, `description`, `completed`) values
(1, 'Task no 1', false),
(2, 'Task no 2', false),
(3, 'Task no 3', true),
(4, 'Task no 4', true);
|
<reponame>kll5h/ShinetechOA<filename>src/main/resources/dbmigrate/mysql/keyvalue/V0_0_0_2__kv_prop.sql<gh_stars>1-10
-------------------------------------------------------------------------------
-- kv property
-------------------------------------------------------------------------------
CREATE TABLE KV_PROP... |
<reponame>johnLee1501/faster-arquitectura-hexagonal
select c.id, c.identificador_usuario,c.direccion,c.ciudad,c.tipo_usuario,c.producto_id,p.codigo_producto,p.nombre as nombre_producto,p.valor_producto,c.fecha_compra,c.fecha_entrega
from compra c
JOIN producto p
ON c.producto_id = p.id
Where c.identificador_usuario =:i... |
with custom_roles as (
select
role_name,
role_type,
subscription_id
from
azure_role_definition
where
role_type = 'CustomRole'
)
select
-- Required columns
cr.subscription_id as resource,
case
when count(*) > 0 then 'alarm'
else 'ok'
end as status,
'There are ' || count(*) || ... |
<filename>gpMgmt/bin/gppylib/test/behave/mgmt_utils/steps/data/gptransfer/pre/dml/select_with_index_scan.sql
\c gptest;
-- start_ignore
drop table if exists test;
-- end_ignore
create table test (a integer, b integer);
insert into test select a, a%25 from generate_series(1,100) a;
create index test_b on test (b);
|
<filename>dbicdh/MySQL/upgrade/60-61/001-auto.sql
-- Convert schema '/home/marco/amw/AmuseWikiFarm/dbicdh/_source/deploy/60/001-auto.yml' to '/home/marco/amw/AmuseWikiFarm/dbicdh/_source/deploy/61/001-auto.yml':;
;
BEGIN;
;
ALTER TABLE `whitelist_ip` ADD COLUMN `user_editable` smallint NOT NULL DEFAULT 0;
;
COMMIT;... |
<reponame>opengauss-mirror/Yat
-- @testpoint: min输入存在空值
--step1:创建表; expect:成功
drop table if exists t_min_case0016;
create table t_min_case0016(c cidr, i inet);
--step2:插入数据; expect:空
insert into t_min_case0016 values(NULL, NULL);
select min(c) from t_min_case0016;
select min(i) from t_min_case0016;
--step3:插入数据; ... |
<filename>dbcatalog.sql
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 24 Mar 2022 pada 09.00
-- Versi server: 10.4.19-MariaDB
-- Versi PHP: 7.4.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... |
<gh_stars>0
SELECT s FROM sum(
SELECT 39 as x, 3 as y
);
|
SET DEFINE OFF;
create or replace package body afw_13_regn_piltb_pkg
as
function obten_contn_page_courn (pva_code in varchar2
,pva_code_lang in varchar2 default null
,pva_indic_etend_page_zero in varchar2 default 'N... |
-- <Dolibase extrafields table>
-- Copyright (C) <2018> <AXeL>
ALTER TABLE llx_books_extrafields ADD INDEX idx_books_extrafields (fk_object);
|
<gh_stars>10-100
-- file:alter_generic.sql ln:44 expect:true
ALTER FUNCTION alt_func1(int) RENAME TO alt_func3
|
<filename>deploy/trigger_add_job.sql<gh_stars>0
-- Deploy postgraphile_utility_functions:trigger_add_job to pg
-- requires: postgraphile_schemas:schemas
BEGIN;
create function app_private.tg__add_job() returns trigger as $$
begin
perform graphile_worker.add_job(tg_argv[0], json_build_object('id', NEW.id));
return... |
<filename>CCDB/database/main_db/world_rebase/spell_script_names.sql
/*!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 */;
/*!40103 SET @OLD_TIME_... |
<gh_stars>0
-- Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
-- SPDX-License-Identifier: Apache-2.0
CREATE TABLE participant_events_create_filter (
event_sequential_id BIGINT NOT NULL,
template_id INTEGER NOT NULL,
party_id INTEGER NOT NULL
);
SELECT 'Ad... |
<reponame>marat-gainullin/septima
CREATE TABLE APP_VERSION
(
VERSION_VALUE DECIMAL NOT NULL,
CONSTRAINT app_version_pk PRIMARY KEY (VERSION_VALUE)
)
#GO
INSERT INTO APP_VERSION (VERSION_VALUE) VALUES (0)
#GO
#GO |
<reponame>SevDan/reports
alter table REPORT_REPORT add ROLES_IDX varchar2(1000)^
alter table REPORT_REPORT add SCREENS_IDX varchar2(1000)^
alter table REPORT_REPORT add INPUT_ENTITY_TYPES_IDX varchar2(1000)^
|
<reponame>wiltonlazary/snappydata
select count(*) from colTable;
select count(*) from colTable where COMPANY='company_name_12345';
select count(*) from colTable where COMPANY='company1094';
select count(*) from rowPartitionedTable;
select count(*) from rowPartitionedTable where COMPANY='company_name_12345';
select coun... |
<gh_stars>1000+
SELECT * FROM zdb_highlight(
'so_posts',
'( title:"* non * programmers" )',
'id IN (1,4,9)',
'{"title"}'::TEXT[])
ORDER BY "primaryKey", "fieldName", "arrayIndex", "position"; |
<reponame>Freso/musicbrainz-server<filename>t/sql/edit_medium.sql
SET client_min_messages TO 'warning';
INSERT INTO artist (id, gid, name, sort_name, comment)
VALUES (1, '82a72730-792f-11de-8a39-0800200c9a66', 'Artist', 'Artist', 'Artist 1'),
(2, '92a72730-792f-11de-8a39-0800200c9a66', 'Artist', 'Artist... |
<gh_stars>0
WITH event_ AS (
INSERT INTO event (task_id, success)
VALUES (1, false)
RETURNING event_id
),
files_ AS (
SELECT create_file_instance('42ae5', 'container_log', 's3://log_file')
)
INSERT INTO event_file_instance (file_instance_id, event_id)
SELECT * FROM files_ CROSS JOIN event_
|
<filename>database/scripts/updates/fase_1/update_plans.sql<gh_stars>0
USE `bitel_ecommerce` ;
ALTER TABLE tbl_plan MODIFY plan_unlimited_calls INT(11) NOT NULL DEFAULT '1';
ALTER TABLE tbl_plan MODIFY plan_unlimited_sms INT(11) NOT NULL DEFAULT '1';
ALTER TABLE tbl_plan MODIFY plan_data_cap VARCHAR(255) NOT NULL;
UPD... |
<filename>pencatatan_penjualan.sql
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 14 Jan 2019 pada 03.25
-- Versi server: 10.1.37-MariaDB
-- Versi PHP: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone =... |
--This script shows default DB collation + all tables and columns with collation other than default one
--Adjust target DB name as necessary
USE K2
DECLARE @DatabaseCollation VARCHAR(100)
SELECT
@DatabaseCollation = collation_name
FROM
sys.databases
WHERE
database_id = DB_ID()
SELECT
@DatabaseCo... |
<filename>P2Project/MySQLDB.sql<gh_stars>0
-- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64)
--
-- Host: localhost Database: dat2c1_03
-- ------------------------------------------------------
-- Server version 5.7.30-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 ... |
select * from employee
where salary between 40000 and 70000; |
<gh_stars>0
/*
--- KYSYMYS ---
(Käytä tehtävässä LIKE tai REGEXP -operaattoria)
9. Tulevaa viikonlopun kampanjaa varten tarvitaan lista niiden elokuvien nimistä,
vuokran hinnasta ja luokituksesta, joiden nimi alkaa merkeillä 'pri'?
*/ |
<filename>db/views/vw_dowlookup.sql<gh_stars>0
create view dowlookup as
select
to_char((date_trunc('week',current_date)::date) + i,'Dy') as wkday,
to_char((date_trunc('week',current_date)::date) + i,'ID')::integer as isodow
from generate_series(0,6) i
order by isodow; |
<filename>Database/taan.sql
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 12, 2020 at 06:31 PM
-- 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 = "... |
INSERT INTO MOVIE_LISTENER("ID", "NAME", "ACTORS") VALUES (1, 'The Matrix', '<NAME>, <NAME>, <NAME>')
INSERT INTO MOVIE_LISTENER("ID", "NAME", "ACTORS") VALUES (2, 'The Lord of The Rings', '<NAME>, <NAME>, <NAME>')
INSERT INTO MOVIE_LISTENER("ID", "NAME", "ACTORS") VALUES (3, 'Inception', '<NAME>')
INSERT INTO MOVIE_LI... |
<reponame>xhackax47/AXEL_WEB
INSERT INTO public."WebAXEL_documentcategory"(categorie) VALUES
('Actes de colloques (proceedings)'),
('Archives'),
('Articles de journaux (presse)'),
('Articles de revues scientifiques'),
('Documentaires / Films'),
('Brevets'),
('Cartes'),
('Dictionnaires / Encyclopédies'),
('Données / St... |
<reponame>Ryyyyannnn/UmbracoDev
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[uCommerce_PurchaseOrder]') AND name = N'IX_uCommerce_PurchaseOrder_CompletedDate')
BEGIN
DROP INDEX IX_uCommerce_PurchaseOrder_CompletedDate ON [dbo].[uCommerce_PurchaseOrder];
END
GO
CREATE NONCLUSTERED INDEX [IX_uC... |
<filename>parte001/ex317_libros_alter_table_modify_modificar_campos_tabla.sql
-- 1. Elimine la tabla, si existe:
DROP TABLE IF EXISTS peliculas;
-- 2. Cree la tabla con la siguiente estructura:
CREATE TABLE peliculas(
codigo INT UNSIGNED,
nombre VARCHAR(20) NOT NULL,
actor VARCHAR(20),
director VARCHAR(25),
... |
CREATE OR REPLACE FUNCTION ti.getpublicationtypestable()
RETURNS SETOF ndb.publicationtypes
LANGUAGE sql
AS $function$
SELECT *
FROM ndb.publicationtypes;
$function$
|
-- TODO: add 2020
-- for filers_using_exemption_by_agency
CREATE materialized VIEW hmda_user.exemptions_2018 tablespace pg_default AS
SELECT ts.agency,
lar.lei
FROM transmittalsheet2018 ts
JOIN loanapplicationregister2018 lar
ON lar.lei::text = ts.lei::text
WHERE length(lar.uli::text) < 23
OR lower... |
<reponame>Ambal/mangos
ALTER TABLE character_db_version CHANGE COLUMN required_9630_01_characters_characters required_9632_01_characters_characters bit;
ALTER TABLE characters
ADD COLUMN `knownTitles` longtext AFTER ammoId;
|
CREATE ALIAS magicNumberFor FOR "org.ihtsdo.snomed.rf2torf1conversion.RF1Constants.getMagicNumber";
CREATE ALIAS magicNumberDebug FOR "org.ihtsdo.snomed.rf2torf1conversion.RF1Constants.getMagicNumberDebug";
CREATE ALIAS moduleSourceFor FOR "org.ihtsdo.snomed.rf2torf1conversion.RF1Constants.getModuleSource";
CREATE ... |
<reponame>ramriddlez/SQL-Employee-Tracker
DROP DATABASE IF EXISTS employees_db;
CREATE DATABASE employees_db;
USE employees_db;
CREATE TABLE departments (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30) NOT NULL
);
CREATE TABLE roles (
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VA... |
<gh_stars>0
CREATE TABLE account (
license VARCHAR(36) PRIMARY KEY,
email_address VARCHAR NOT NULL,
pin VARCHAR(9) NOT NULL,
activated INT NOT NULL,
deactivated INT NOT NULL
);
CREATE TABLE pool (
id SERIAL PRIMARY KEY,
license VARCHAR(36) REFERENCES account(license),
name VARCHAR(24) NOT NULL,
built... |
CREATE TABLE messages (
id SERIAL primary key,
ts timestamp,
t1 character varying(50),
t2 character varying(50),
t3 character varying(50),
t4 character varying(50),
t5 character varying(50),
t6 character varying(50),
t7 character varying(50),
t8 character varying(50),
t9 character varying(50),
... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50716
Source Host : localhost:3306
Source Database : project2
Target Server Type : MYSQL
Target Server Version : 50716
File Encoding : 65001
Date: 2016-12-25 16:50:04
*/
SET FOREIGN_KEY... |
--CREATE TABLE UM_DOMAIN
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[dbo].[UM_DOMAIN]') AND TYPE IN (N'U'))
CREATE TABLE UM_DOMAIN(
UM_DOMAIN_ID INTEGER IDENTITY(1,1) NOT NULL,
UM_DOMAIN_NAME VARCHAR(255),
UM_TENANT_ID INTEGER DEFAULT 0,
PRIM... |
ALTER TABLE "_selfservice_verification_requests_tmp" RENAME TO "selfservice_verification_requests"; |
CREATE OR REPLACE PROCEDURE wso2_session_cleanup_sp IS
-- ------------------------------------------
-- DECLARE VARIABLES (DO NO CHANGE THESE VALUES)
-- ------------------------------------------
deletedsessions INT := 0;
deletedstoreoperations INT := 0;
unixtime ... |
<filename>core/lib/storage/migrations/2020-08-31-140338_witness_storage/up.sql<gh_stars>1000+
-- Stored generated witness for block.
CREATE TABLE block_witness
(
block BIGINT REFERENCES blocks (number) ON UPDATE CASCADE ON DELETE CASCADE,
witness jsonb NOT NULL,
PRIMARY KEY (block)
);
|
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE view [RDF.].[vwTripleValue] as
select t.TripleID, t.ViewSecurityGroup, t.Subject, t.Predicate, t.Object, t.TripleHash,
t.SortOrder, t.Weight, t.Reitification,
s.value SubjectValue, p.value PredicateValue,
o.value ObjectValue, o.Language, o.DataType,
s... |
<gh_stars>1-10
--cast TIME(L)TZ constant values to character string data types
set timezone 'Asia/Seoul';
--test: cast ts constant values to character string types
select cast(time'12:00:01' as char(10));
select cast(time'12:00:01' as char(20));
select cast(time'12:00:01' as varchar(10));
select cast(time'12:00:01' ... |
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
TRUNCATE TABLE clone_relative_location reuse storage;
CREATE INDEX CLONE_IDX on zstg_clone(CLONE_ID, RELATIVE_TYPE);
CREATE INDEX CLONE_REL_TYPE_IDX on zstg_clone(RELATIVE... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 23 Jan 2020 pada 05.42
-- Versi server: 10.1.40-MariaDB
-- Versi PHP: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
INSERT INTO burgers
(burger_name)
VALUES
('Cheese burger'),
('Spicy jalapeno Baja');
|
SELECT "YaleLanguages_3"."Patron Group" AS "Patron Group" FROM "YaleLanguages_3" GROUP BY 1 ORDER BY "Patron Group" ASC;
|
<filename>incasebd.sql
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 25-Maio-2020 às 22:00
-- Versão do servidor: 10.4.8-MariaDB
-- versão do PHP: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+... |
create or replace package body pit_admin
as
/************************* TYPE DEFINITIONS *********************************/
type predefined_error_rec is record(
source_type pit_util.ora_name_type,
owner pit_util.ora_name_type,
package_name pit_util.ora_name_type,
error_name pit_util.ora_name_typ... |
<filename>employes.sql
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 07, 2020 at 06:13 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00... |
<reponame>ugate/sqler-odbc
INSERT INTO "dbo.TEST" (ID, NAME, CREATED_AT, UPDATED_AT)
VALUES (:id, :name, :created, :updated);
INSERT INTO "dbo.TEST2" (ID, NAME, REPORT, CREATED_AT, UPDATED_AT)
VALUES (:id2, :name2, :report2, :created2, :updated2); |
<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : 12345
Source Server Version : 50561
Source Host : localhost:3306
Source Database : mywms
Target Server Type : MYSQL
Target Server Version : 50561
File Encoding : 65001
Date: 2020-03-16 17:12:14
*/
SET FOREIGN_KEY_CHECKS=0;... |
<filename>assets/sql/menu.sql
CREATE TABLE `menu`
(
`id` int PRIMARY KEY,
`name` text,
`icon` text,
`url` text
);
CREATE TABLE `dropdown_menu`
(
`id` int PRIMARY KEY,
`name` text,
`icon` text
);
CREATE TABLE `dropdown_sub_menu`
(
`dropdown_menu_id` int,
`menu_id` int
);
CREATE TABLE `access_menu`
(... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.127.12
-- Generation Time: Jul 03, 2019 at 10:53 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 S... |
<reponame>gurfinkel/codeSignal
CREATE PROCEDURE validPhoneNumbers()
BEGIN
SELECT name, surname, phone_number
FROM phone_numbers
where phone_number regexp '^((1\-)|\\(1\\))[0-9]{3}\-[0-9]{3}\-[0-9]{4}$'
order by surname;
END
|
<gh_stars>10-100
DROP VIEW IF EXISTS hoejde_importer_afventer_view CASCADE;
create view hoejde_importer_afventer_view AS(
SELECT hn.id as husnummerid, ap.id as adgangspunktid from dar1_husnummer_current hn
JOIN dar1_adressepunkt_current ap ON hn.adgangspunkt_id = ap.id
LEFT JOIN hoejde_importer_resultater r O... |
create or replace function update_gc_txn_insert_fn() returns trigger as $$
begin
insert into gift_card_transactions_view
select
-- Gift Card Transaction
new.id,
new.debit,
new.credit,
new.available_balance,
new.state,
to_json_timestamp(new.created_at) ... |
-- randexpr1.test
--
-- db eval {SELECT ((select -case min(17 | (abs(a)/abs(case (select max(a) from t1)+13+t1.c when c then (abs(case when 17<>a and t1.c=d then ((17)) else e end)/abs(t1.b)) else 17 end)) | f*a) when abs(~(count(distinct t1.e))-abs((~max(c)))-count(*) | min(t1.f)+max(11)) then -cast(avg((b)) AS int... |
-- file:jsonb.sql ln:385 expect:true
SELECT jsonb_object('{}', '{}')
|
<gh_stars>10-100
-- Table logentries_types
SET NAMES 'utf8';
TRUNCATE TABLE `logentries_types`;
INSERT INTO `logentries_types` (`id`, `module`, `eventname`) VALUES ('1', 'watchlist', 'owner_notify');
INSERT INTO `logentries_types` (`id`, `module`, `eventname`) VALUES ('2', 'watchlist', 'sendmail');
INSERT INTO `logentr... |
/* Replace with your SQL commands */
ALTER TABLE "crm_v2"."companies"
DROP CONSTRAINT unique_external_id;
ALTER TABLE "crm_v2"."companies"
ALTER COLUMN type SET NOT NULL;
ALTER TABLE "crm_v2"."contacts"
DROP CONSTRAINT unique_contact_external_id;
ALTER TABLE "crm_v2"."contacts"
DROP COLUMN initials;
DELETE ... |
alter table feed add constraint UNI_FEED_URL unique (url); |
-- POCOR-3449
-- drop table
DROP TABLE `staff_training_applications`;
-- delete workflow_models
SET @modelId := 10;
DELETE FROM `workflow_models` WHERE `id` = @modelId;
-- delete workflows
SET @workflowId := 0;
SELECT `id` INTO @workflowId FROM `workflows` WHERE `code` = 'TRN-5001' AND `workflow_model_id` = @modelId;... |
<filename>migrations/1528395643_create_indexes_on_event_logs.down.sql
BEGIN;
DROP INDEX IF EXISTS event_logs_source;
DROP INDEX IF EXISTS event_logs_timestamp_at_UTC;
COMMIT;
|
CREATE TABLE `tb_kyvyqhwcpi` (
`col_pesoyggsjl` mediumblob,
`col_hctgmkmyxs` datetime DEFAULT '2019-07-04 00:00:00',
`col_kkvhrfifbo` longtext CHARACTER SET utf8,
`col_ewyzkapekq` longblob,
UNIQUE KEY `uk_jvoonsdsfr` (`col_pesoyggsjl`(32)),
UNIQUE INDEX `col_kkvhrfifbo` (`col_kkvhrfifbo`(31))
) ENGINE=InnoD... |
-- MySQL dump 10.16 Distrib 10.3.8-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: d_task_tracker_adv
-- ------------------------------------------------------
-- Server version 10.3.8-MariaDB-1:10.3.8+maria~bionic-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4010... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 22, 2018 at 10:27 PM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
-- @testpoint: opengauss关键字constraint_name(非保留),作为角色名,部分测试点合理报错
--关键字不带引号-成功
drop role if exists constraint_name;
create role constraint_name with password '<PASSWORD>' valid until '2020-12-31';
--关键字带双引号-成功
drop role if exists "constraint_name";
create role "constraint_name" with password '<PASSWORD>' valid until '... |
<filename>visible-invisible-column.sql
#1 drop table
DROP TABLE IF EXISTS `users`
#2 create table
CREATE TABLE `users` (
uid BINARY(16) not null default (UUID_TO_BIN(UUID())) primary key ,
username varchar(255) default null,
email varchar(255) invisible
);
#3 insert datas
insert into users(username, email) v... |
-- SetupConfig: {}
--
-- Destroys an existing trait (does nothing if the trait does not exist).
-- If the trait is atomic and its value is currently used in a composite
-- trait of the same context an error is raised.
--
-- To remove an atomic trait, all composite traits that use it must
-- already be des... |
SET SCHEMA 'public';
CREATE TYPE transaction_status AS ENUM (
'wait_buy', 'hanging', 'wait_sale', 'completed'
);
CREATE TYPE currency AS ENUM (
'UAH', 'USD'
);
CREATE TYPE fund_type AS ENUM (
'trade', 'invest'
);
CREATE TABLE IF NOT EXISTS resource(
id SERIAL NOT NULL,
name ... |
-- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64)
--
-- Host: localhost Database: bd_intec
-- ------------------------------------------------------
-- Server version 8.0.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*... |
<reponame>xinggaojian/shop
/*
SQLyog Ultimate v11.24 (32 bit)
MySQL - 5.5.53 : Database - shop
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET... |
--
-- Create database `bp_48`
--
DROP DATABASE IF EXISTS `bp_48`;
CREATE DATABASE IF NOT EXISTS `bp_48`;
USE `bp_48`;
--
-- Table structure for table `manufacture`
--
DROP TABLE IF EXISTS `manufacture`;
CREATE TABLE `manufacture` (
`id` int(4) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(25) NOT NULL,
`cou... |
<filename>db/db/4init_param/MB/MB_ACCT_CLOSE_REASON.sql
TRUNCATE TABLE mb_acct_close_reason;
INSERT INTO mb_acct_close_reason (REASON_CODE, REASON_CODE_DESC, COMPANY, TRAN_TIMESTAMP, TRAN_TIME) VALUES ('1', '账户清理', NULL, NULL, NULL);
INSERT INTO mb_acct_close_reason (REASON_CODE, REASON_CODE_DESC, COMPANY, TRAN_TIMESTA... |
<reponame>tushartushar/dbSmellsData
select ST_IsEmpty(null) from onerow
select ST_Y(null) from onerow
select ST_MinX(null) from onerow
select ST_MaxM(null) from onerow
SELECT ST_Aggr_Union(geometry) FROM source;
select ST_MinM(null) from onerow
select ST_MinZ(null) from onerow
SELECT _FUNC_(geometry) FROM source;
selec... |
<filename>2019 notes which may be obsolete/06 IP2CityRegionCountry Setup&Populate/03 CountryNametoPagesRead/BloomReaderTest/brt_AddCountryNameColumn.sql
-- Column: bloomreadertest.pages_read.country_name
-- ALTER TABLE bloomreadertest.pages_read DROP COLUMN country_name;
ALTER TABLE bloomreadertest.pages_read
ADD... |
<reponame>tkocjan/JEEventStore_es_JEEventStore<filename>persistence-jpa/src/main/sql/mysql.sql<gh_stars>10-100
CREATE TABLE `event_store` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`bucket_id` varchar(255) DEFAULT NULL,
`stream_id` varchar(255) DEFAULT NULL,
`stream_version` bigint(20) DEFAULT NULL,
`change_... |
CREATE TYPE [employer_financial].[AccountTransferTable] AS TABLE
(
SenderAccountId BIGINT NOT NULL,
SenderAccountName NVARCHAR(100) NOT NULL,
ReceiverAccountId BIGINT NOT NULL,
ReceiverAccountName NVARCHAR(100) NOT NULL,
ApprenticeshipId BIGINT NOT NULL,
CourseName VARCHAR(MAX) NOT NULL,
CourseLevel INT,
Amoun... |
INSERT INTO public.tags (tag)
VALUES ('Профілактика');
INSERT INTO public.tags (tag)
VALUES ('Комплекс');
INSERT INTO public.tags (tag)
VALUES ('Ковід');
INSERT INTO public.tags (tag)
VALUES ('Допомога');
INSERT INTO public.tags (tag)
VALUES ('Міокард');
INSERT INTO public.tags (tag)
VALUES ('ЕКГ');
INSERT INTO public... |
<gh_stars>1-10
/* Formatted on 12-19-2018 8:58:13 AM (QP5 v5.126.903.23003) */
DROP TABLE EPAY.EPAY_PSB9_TRNS CASCADE CONSTRAINTS PURGE;
CREATE TABLE EPAY.EPAY_PSB9_TRNS (
TRANSACTIONS_ID NUMBER NOT NULL,
CATIND_ID NUMBER, -- OLD: INDICATOR_ID
PSB_HDR_ID N... |
<filename>src/test/resources/randexpr1.test_857.sql
-- randexpr1.test
--
-- db eval {SELECT case when (11+19 | t1.e-e*17=t1.e*~d+t1.a+ -d | a-~(abs((abs((case when 13 not in (b,((t1.a)),f) then t1.d else t1.a end+e))/abs(t1.f))*b+t1.b)/abs(17))+t1.e+t1.a) then 11 else t1.a end FROM t1 WHERE case (case when (select +~ ... |
<reponame>Shuttl-Tech/antlr_psql
-- file:alter_table.sql ln:1209 expect:true
alter table altwithoid set without oids
|
--
-- Load and run QueryScript code from file
--
delimiter //
drop procedure if exists run_file //
create procedure run_file(
in query_script_file_name text
)
comment 'Run given QueryScript file'
language SQL
deterministic
modifies sql data
sql security invoker
main_body: begin
call run(LOAD_FILE(query_script_f... |
<gh_stars>100-1000
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.2
-- Dumped by pg_dump version 9.6.2
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = fa... |
<gh_stars>0
CREATE TABLE k_companies
(
gu_company CHAR(32) NOT NULL,
dt_created DATETIME DEFAULT CURRENT_TIMESTAMP,
nm_legal VARCHAR(70) NOT NULL,
gu_workarea CHAR(32) NOT NULL,
bo_restricted SMALLINT DEFAULT 0,
nm_commercial VARCHAR(70) NULL,
dt_modified DATETIME NU... |
INSERT INTO rtms_order
(order_id, product_id, customer_id, delivery_address, contact_phone, quantity)
values
(?, ?, ?, ?, ?, ?) |
<filename>sql/2019/01_JavaScript/01_12.sql<gh_stars>1-10
#standardSQL
# 01_12: Percent of pages that include script[type=module]
SELECT
_TABLE_SUFFIX AS client,
ROUND(COUNTIF(JSON_EXTRACT_SCALAR(JSON_EXTRACT_SCALAR(payload, '$._almanac'), "$['01.12']") = '1') * 100 / COUNT(0), 2) AS pct_module
FROM
`httparchive.p... |
CREATE UNIQUE INDEX "PKEY_CTLENGTH_UNITS" ON "CTLENGTH_UNITS" ("LENGTH_UNITS")
|
--
-- DB script for creating necessary tables (PostgreSQL 9.x)
--
-- PREREQUISITE for successful flyway run with PostgreSQL:
-- there is user/role (e.g. openhubusr)
-- there is database (e.g. openhubdb)
-- there is schema openhub
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conform... |
<reponame>vicky-demansol/mattermost-server
CREATE INDEX IF NOT EXISTS idx_oauthauthdata_client_id ON oauthauthdata (code);
DROP TABLE IF EXISTS oauthauthdata;
|
<gh_stars>100-1000
CREATE TABLE HT_DEPLOYMENT_UNIT (id BIGINT NOT NULL, CHECKSUM VARCHAR(255) NOT NULL, DEPLOYED_ON DATETIME, DEPLOY_DIR VARCHAR(255) NOT NULL, NAME VARCHAR(255) NOT NULL, PACKAGE_NAME VARCHAR(255) NOT NULL, STATUS VARCHAR(255) NOT NULL, TENANT_ID BIGINT NOT NULL, VERSION BIGINT NOT NULL, PRIMARY KEY (i... |
<filename>regression/sql/HiveSmokeTest.sql
-- data prep
{{ GPDB_REMOTE }}\!ssh {{ PGHOST }} mkdir -p {{ TEST_LOCATION }}
\!mkdir -p {{ TEST_LOCATION }}
COPY (
SELECT format('row_%s',i::varchar(255)),
i,
i*0.0001,
i*100000000000,
CASE WHEN (i%2) = 0 THEN 'true' ELSE 'false' END
from generate_series(1, 100) s(... |
<filename>tests/queries/0_stateless/01527_bad_aggregation_in_lambda.sql
SELECT arrayMap(x -> x * sum(x), range(10)); -- { serverError 47 }
|
-- --------------------------------------------------------
-- -
-- テーブルの構造`testee`
-- -
CREATE TABLE testee (
`testee_id` int(11) NOT NULL default '0',
`room_id` int(11) NOT NULL default '0',
`testee_name` varchar(255) NOT NULL default '',
`active_flag` tinyint(1) NOT NULL default '0',
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.