sql
stringlengths
6
1.05M
create type [schema_version].[t_application_name] from varchar(50) not null;
create table T(A integer); drop table T; drop table T;
DROP TABLE if exists b_dav_locks; DROP TABLE if exists b_dav_connections; DROP TABLE if exists b_dav_tokens;
<gh_stars>0 create table photos ( id serial not null primary key, version bigint not null default 0, name varchar(50) not null, description varchar(2000), camera_info varchar(100), date_uploaded timestamp not null default now(), date_updated timestamp not null default now(), date_taken timestamp, lat...
ALTER TABLE test_event ALTER COLUMN test_location_id TYPE character varying(256);
ALTER TABLE trip ADD COLUMN start_time_carryover boolean NOT NULL DEFAULT false;
/* Some remote commands are registered in the preinstall or upgrade scripts. Two remote commands are registered in the idempotent scripts which get run at the end of a fresh install and after every version upgrade. Thus, it's difficult to know where in the sequence these two will show up. This up...
-- // CB-79 show terminated clusters config -- Migration SQL that makes the change goes here. CREATE SEQUENCE IF NOT EXISTS showterminatedclusterspreferences_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE ...
CREATE TYPE [dbo].[AgentDefinitionList] AS TABLE ( [Index] INT PRIMARY KEY, [Id] INT NOT NULL DEFAULT 0, [Code] NVARCHAR(255), [TitleSingular] NVARCHAR (255), [TitleSingular2] NVARCHAR (255), [TitleSingular3] NVARCHAR (255), [TitlePlural] NVARCHAR (255), [Ti...
CREATE TABLE message_stored( indexId BIGINT( 20 ) NOT NULL AUTO_INCREMENT , msg_id VARCHAR( 200 ) NOT NULL , message BLOB NOT NULL , PRIMARY KEY ( indexId ) );
alter table invoice_payment_control_plugin_auto_pay_off drop column payment_method_id;
-- @testpoint:openGauss保留关键字ilike作为视图名 --不带引号-合理报错 CREATE or replace VIEW ilike AS SELECT * FROM pg_tablespace WHERE spcname = 'pg_default'; --加双引号-创建成功 CREATE or replace VIEW "ilike" AS SELECT * FROM pg_tablespace WHERE spcname = 'pg_default'; --清理环境 drop VIEW "ilike"; --加单引号-合理报错 CREA...
-- @testpoint: 模式匹配POSIX正则表达式,对数字进行匹配 DROP TABLE IF EXISTS type_char; CREATE TABLE type_char (string1 int); insert into type_char values (123456); SELECT * from type_char where string1 ~ '[0-9]'; DROP TABLE IF EXISTS type_char;
<reponame>test212122/l56<gh_stars>0 # Host: 127.0.0.1 (Version 5.5.45) # Date: 2018-04-26 15:03:00 # Generator: MySQL-Front 6.0 (Build 1.57) # # Structure for table "admin_group" # DROP TABLE IF EXISTS `admin_group`; CREATE TABLE `admin_group` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(2...
ALTER TABLE dbo.DimOrganization ADD CONSTRAINT [FK_DimOrganization_ParentOrganizationKey_DimOrganization] FOREIGN KEY ([ParentOrganizationKey]) REFERENCES DimOrganization([OrganizationKey])...
<gh_stars>0 -- MySQL Script generated by MySQL Workbench -- 06/09/18 21:52:45 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering 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_MOD...
CREATE OR REPLACE FUNCTION jsonb_update(base jsonb, replacement jsonb) RETURNS jsonb AS $$ BEGIN RETURN jsonb_filter(jsonb_merge(base, replacement)); END; $$ LANGUAGE plpgsql;
<gh_stars>0 DROP DATABASE IF EXISTS net_promoter_score; CREATE DATABASE net_promoter_score; USE net_promoter_score;
<gh_stars>0 --TABLA PARA GUARDAR LOS CURSOS CREATE TABLE Cursos( CodigoCurso VARCHAR(10), NombreCurso VARCHAR(30) NOT NULL, Precio DECIMAL(18,3), Activo BIT NOT NULL DEFAULT 1, FechaCreacion DATETIME NOT NULL DEFAULT GETDATE(), FechaModificacion DATETIME NULL, CreadoPor VARCHAR(60) NULL, ModificadoPor VARCHA...
/* Modernize the page meta data properties */ alter table Cofoundry.PageVersion modify column OpenGraphTitle nvarchar (300) null; alter table Cofoundry.PageVersion modify column MetaDescription nvarchar (300) null; alter table Cofoundry.PageVersion modify column Title nvarchar (300) not null; alter table Cofoundry.Pag...
SELECT `link_ds_dimvals`.`pos`, `dimvalues`.`exportid`, `dimensions`.`name`, ds.`code` FROM `link_ds_dimvals` INNER JOIN `dimvalues` USING ( `dimvalid` ) INNER JOIN `dimensions` USING ( `dimid` ) INNER JOIN `datasets_withUnit` ds USING ( `dsid` ) WHERE `dimensions`.`n...
<reponame>saefulmillah/hkdashboard SELECT x1.* FROM ( SELECT tanggal, SUM(tunai + mandiri + bri + bni + bca ) traffic, SUM(tunai) cash_traffic, SUM(mandiri + bri + bni + bca ) non_cash_traffic, SUM(rptunai) cash_revenue, SUM(rpbri + rpbni + rpbca) non_cash_revenue FROM eoj ...
<filename>backend/tools/spinup/src/privileges/1.schema.sql alter default privileges revoke execute on functions from guided_anonymous; alter default privileges revoke execute on functions from guided_user; alter default privileges revoke execute on functions from guided_postgraphile; grant all privileges on all functi...
<filename>episode04/review.sql<gh_stars>0 -- Review SQL (Notes from <NAME>) SELECT product_id , product_category_name , product_name_lenght , product_description_lenght , product_photos_qty , product_height_cm , product_weight_g , product_length_cm , product_weight_g ...
create function GetLastDayOfMonth(@year int, @month int) returns date as begin declare @last_day date = dateadd(day, -1, dateadd(month, 1, datefromparts(@year, @month, 1))) return @last_day end
IF OBJECT_ID('zsystem.Events_Insert') IS NOT NULL DROP PROCEDURE zsystem.Events_Insert GO CREATE PROCEDURE zsystem.Events_Insert @eventTypeID int, @duration int = NULL, @int_1 int = NULL, @int_2 int = NULL, @int_3 int = NULL, @int_4 int = NULL, @int_5 int = NULL,...
CREATE EVENT SESSION [Wait Statistics] ON SERVER ADD EVENT sqlos.wait_completed(SET collect_wait_resource=(1) ACTION(sqlserver.database_id,sqlserver.database_name,sqlserver.is_system,sqlserver.session_id) WHERE ([package0].[greater_than_uint64]([sqlserver].[database_id],(4)) AND [package0].[not_equal_boolean](...
<filename>MySQL/createtable.sql<gh_stars>1-10 create table Employee( id int not null, Salary int not null, primary key(id) )
-- file:domain.sql ln:560 expect:true select array_elem_check(-1)
CREATE DATABASE EnZonaRD USE EnZonaRD CREATE TABLE Usuarios ( IdUsuario INT PRIMARY KEY IDENTITY, Nombre VARCHAR(50) NOT NULL, Apellido VARCHAR(50) NOT NULL, Contrasena VARCHAR(50) NOT NULL, Email VARCHAR(50) NOT NULL UNIQUE, Telefono CHAR(10) NOT NULL, Genero char(1) NOT NULL, Direccion varchar(1...
INSERT INTO server_informations VALUES ("config_duel_questions_per_round",5); INSERT INTO server_informations VALUES ("config_duel_rounds_per_duel",5); INSERT INTO server_informations VALUES ("config_question_timer_duration",10);
CREATE DATABASE IF NOT EXISTS faygo DEFAULT CHARSET utf8 COLLATE utf8_general_ci; USE faygo; CREATE TABLE IF NOT EXISTS `faygo`.`client`( `client_id` INT NOT NULL AUTO_INCREMENT COMMENT 'client_id', `note_name` VARCHAR(1000), `wan_ip` VARCHAR(20), `lan_ip` VARCHAR(20), `os_type` VARCHAR(10), `client_m...
SELECT oldCode, currentCode, changeOccurred FROM %s WHERE CInt(changeOccurred) < %d;
create or replace package flow_boundary_events authid definer accessible by (flow_engine, flow_tasks, flow_timers_pkg, flow_subprocesses , flow_call_activities) is procedure set_boundary_timers ( p_process_id in flow_processes.prcs_id%type , p_subflow_id in flow_subflows.sbfl_id%type ); ...
<reponame>omegazip/dba_scripts -- ----------------------------------------------------------------------------------- -- File Name : http://www.oracle-base.com/dba/monitoring/index_extents.sql -- Author : <NAME> -- Description : Displays number of extents for all indexes belonging to the specified table, or a...
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- 主机: 127.0.0.1:3306 -- 生成日期: 2019-05-14 07:15:31 -- 服务器版本: 5.7.24 -- PHP 版本: 7.2.14 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_S...
<gh_stars>1-10 proc cfe_fsw_utils ; ; History: ; ; 02/02/05 <NAME> Added ut_sendappcmd directive ; 04/18/05 <NAME> Added headers between directives ; 04/28/05 <NAME> Changed "ut_sendresetcmd" tlm update ; wait time from 8 to 24 seconds...
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 11, 2018 at 04:59 PM -- Server version: 10.1.28-MariaDB -- PHP Version: 7.1.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
alter table ACT_RU_EXECUTION add column IS_MI_ROOT_ boolean; update ACT_GE_PROPERTY set VALUE_ = '6.0.0.1' where NAME_ = 'schema.version';
<reponame>sada3390/pipewrench<gh_stars>1-10 DROP TABLE IF EXISTS {{ conf.raw_database.name }}.{{ table.destination.name }}_avro; DROP TABLE IF EXISTS {{ conf.raw_database.name }}.{{ table.destination.name }}_partitioned; DROP TABLE IF EXISTS {{ conf.staging_database.name }}.{{ table.destination.name }};
CREATE TABLE `user_invite` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT `user_id` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '第一人称用户ID', `invite_userid` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '被邀请的用户ID', `invite_no` VARCHAR (25) UNSIGNED NOT NULL DEFAULT '0' COMMENT '邀请编号', `status` TINYINT(1) UN...
-- @testpoint: 事务块内部不可以创建tablespace,合理报错 --step1: 事务块内创建表空间;expect: 创建失败 drop tablespace if exists tsp_tbspc0013; begin;/ create tablespace tsp_tbspc0013 relative location 'tbspc0013_location'; end; --step2: 非事务块内创建表空间;expect: 创建成功 create tablespace tsp_tbspc0013 relative location 'tbspc0013_location'; --step3: 清理表空间;...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 07, 2016 at 06:06 PM -- Server version: 10.1.13-MariaDB -- PHP Version: 7.0.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 08, 2020 at 04:44 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.2.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
-- -- 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...
<reponame>AJ-Math/Simple-Q -- database creation CREATE DATABASE `simpleq`; use simpleq; -- users table CREATE TABLE `simpleq`.`users` ( `id` INT AUTO_INCREMENT PRIMARY KEY, `name` VARCHAR(100) NOT NULL, `email` VARCHAR(320) NOT NULL UNIQUE, `flag` INT DEFAULT 0 ); ALTER TABLE `simpleq`.`users` ADD COLUMN...
SET FOREIGN_KEY_CHECKS=0; LOCK TABLES `_of_sso_func` WRITE, `_of_sso_pack` WRITE, `_of_sso_permit` WRITE, `_of_sso_realm` WRITE, `_of_sso_role` WRITE, `_of_sso_user` WRITE; REPLACE INTO `_of_sso_func` (`id`,`realmId`,`name`,`state`,`lable`,`data`) VALUES ('1','1','userAdd','1','用户添加',''), ('2','1','userMod','1','用户修改',...
INSERT INTO `imssql`.`customers` (`first_name`, `surname`) VALUES ('Nijo', 'John'); INSERT INTO `imssql`.`customers` (`first_name`, `surname`) VALUES ('Jeny', 'John'); INSERT INTO `imssql`.`items` (`name`, `value`) VALUES ('Cricket bat', '100'); INSERT INTO `imssql`.`items` (`name`, `value`) VALUES ('Cricket b...
<gh_stars>0 begin; alter table users drop column deleted; alter table channels drop column deleted; alter table messages drop column deleted; commit;
DROP TABLE IF EXISTS sys_calendar; CREATE TABLE sys_calendar ( calendar_date DATE NOT NULL PRIMARY KEY, year SMALLINT NOT NULL, -- 2000 to 2070 month SMALLINT NOT NULL, -- 1 to 12 day SMALLINT NOT NULL, -- 1 to 31 quarter SMALLINT NOT NULL, -- 1 to 4 day_of_calendar SMALLINT NOT NULL, -- 1 to 32,142 day_o...
<gh_stars>1-10 CREATE TABLE `cms_category_section` ( `id` int(11) NOT NULL AUTO_INCREMENT, `category_type_id` int(11) NOT NULL, `key` varchar(64) COLLATE utf8_polish_ci NOT NULL, `name` varchar(64) COLLATE utf8_polish_ci NOT NULL, `order` int(11) NOT NULL DEFAULT 0, `required` tinyint(1) NOT NULL NOT NULL D...
<filename>spec/apps/db/functions.example.sql<gh_stars>1-10 CREATE OR REPLACE FUNCTION notify_on_users_insert_function() RETURNS trigger AS $BODY$ BEGIN RAISE NOTICE 'INSERT TRIGGER called on %', TG_TABLE_NAME; PERFORM pg_notify('users_insert', json_build_object('table', TG_TABLE_NAME, ...
WITH results AS (SELECT sum(ss_net_profit) AS total_sum, s_state, s_county, 0 AS gstate, 0 AS g_county FROM store_sales , date_dim d1 , store WHERE d1.d_month_seq BETWEEN 1200 AND 1200 + 11 AND d1.d_date_sk = ss_sold_date_sk AND s_store_sk = ss_s...
<gh_stars>1-10 /* Query the list of CITY names from STATION that either do not start with vowels or do not end with vowels. Your result cannot contain duplicates. */ select distinct CITY from STATION where (right(CITY, 1) not in ('a', 'i', 'e', 'o', 'u') or left(CITY, 1) not in ('a', 'i', 'e', 'o', 'u'));
USE [Antero] GO IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dw].[v_koski_opiskelijavuodet_cultures]')) EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dw].v_koski_opiskelijavuodet_cultures AS SELECT 1 AS a' GO ALTER VIEW [dw].[v_koski_opiskelijavuodet_cultures] AS SELECT d_organisa...
INSERT INTO case_data (uuid, created, type, reference, data, primary_topic_uuid, primary_correspondent_uuid, case_deadline, date_received, deleted) VALUES ('fbdbaeab-6719-4e3a-a221-d061dde469a1', '2018-12-14 12:00:00', 'TEST', 'TEST/9990191/18', '{"DateReceived": "2018-01-01"}', null, nul...
<reponame>zhouyiartemiswang/node_express_handlebars_burger_restaurant<gh_stars>0 ### Schema CREATE DATABASE `burger_db`; USE `burger_db`; CREATE TABLE `burgers` ( id INTEGER NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, isDevoured BOOLEAN DEFAULT false, PRIMARY KEY (id) );
SET statement_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET search_path = ecmdb, pg_catalog; -- account fake per comunicazioni segreteria INSERT INTO account (id, change_password, codice_fiscale, cognome, data...
<gh_stars>1000+ -- 12.10.2015 15:00:33 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,542906,0,'DESADV_SumPercentage',TO_TIMESTAMP('2015-10-12 15:0...
<reponame>dram/metasfresh -- 2017-06-01T16:38:17.962 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsSameLine='Y', SeqNo=24, SeqNoGrid=24,Updated=TO_TIMESTAMP('2017-06-01 16:38:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=548127 ; -- 2017-06-01T16:38:23.642 -- I ...
CREATE TABLE IACUC_PROTOCOL_SPECIES ( IACUC_PROTOCOL_SPECIES_ID NUMBER(12,0) NOT NULL, PROTOCOL_ID NUMBER(12,0) NOT NULL, PROTOCOL_NUMBER VARCHAR2(20) NOT NULL, SEQUENCE_NUMBER NUMBER(4,0) NOT NULL, SPECIES_ID NUMBER(3,0) NOT NULL, SPECIES_CODE NUMBER(4,0) NOT NULL, SPECIES_GROUP VARC...
<filename>db/dbbackup.sql -- MySQL dump 10.13 Distrib 8.0.12, for Win64 (x86_64) -- -- Host: localhost Database: dbuser -- ------------------------------------------------------ -- Server version 8.0.12 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHAR...
<filename>manual_populations/run_once/experiment_populations_fd60121c-172b-40e2-9e02-94a1420ec273.sql /* Marketing campaign to parents that receive or give more than 15 points in last 5 days Population kind is Parents experiment_id: fd60121c-172b-40e2-9e02-94a1420ec273 */ drop table if exists ab_platform.experim...
<filename>storage/postgres/migrations/000003_create_snapshots_protobuf_files_table.up.sql CREATE TABLE IF NOT EXISTS snapshots_protobuf_files( snapshot_id BIGINT, file_id BIGINT, CONSTRAINT fk_snapshot FOREIGN KEY(snapshot_id) REFERENCES snapshots(id), CONSTRAINT fk_file FOREIGN KEY(file_id) REFERENCES protobuf_fil...
-- -- Copyright 2020 The Android Open Source Project -- -- 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 -- -- https://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applica...
<reponame>SkygearIO/skygear-server -- Put upgrade SQL here ALTER TABLE cloud_code DROP COLUMN "config";
create procedure [dbo].[a_procedure] as if 1 = 2 begin select 100; end if 1 = 1 begin select 200; end begin begin begin select 500; end select 600; end end
<reponame>antarus/mystra-pve<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Client: localhost -- Généré le: Dim 21 Août 2016 à 15:12 -- Version du serveur: 5.5.50-0ubuntu0.14.04.1 -- Version de PHP: 5.5.9-1ubuntu4.19 SET FOREIGN_KEY_CHECKS=0; SET SQL_MODE = "NO_AUTO_VALUE_ON...
<gh_stars>0 autocommit off; alter vclass joe.inventory_v add method foo(integer) float; call foo(100) on class [joe.inventory_v]; rollback work; rollback;
<gh_stars>0 /* * AM_USER */ drop table AM_USER; create table AM_USER ( name VARCHAR2(100) primary key not null, password VARCHAR2(100) not null ); grant select on QT3QF8.AM_USER to PUBLIC; insert into AM_USER values ('admin', 'YWRtaW4='); insert into AM_USER values ('sandra', 'c<PASSWORD>HJh'); insert into A...
<gh_stars>0 CREATE DATABASE IF NOT EXISTS `chinese_class` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */; USE `chinese_class`; -- MySQL dump 10.13 Distrib 5.5.41, for debian-linux-gnu (i686) -- -- Host: 127.0.0.1 Database: chinese_class -- ------------------------------------------------------ -- S...
CREATE OR REPLACE FUNCTION isochrones(start_vertex INTEGER, boundaries NUMERIC []) RETURNS TABLE(distance NUMERIC, polygon GEOMETRY) AS $$ DECLARE start_vertex_geom GEOMETRY; max_boundary NUMERIC; BEGIN SELECT the_geom INTO start_vertex_geom FROM routing_segmented_vertices_pgr WHERE id = start_vertex...
ALTER TABLE Responses ADD COLUMN `questionnaire_id` int, ADD FOREIGN KEY (`questionnaire_id`) REFERENCES Questionnaires(`id`) ON DELETE CASCADE
/* Write your T-SQL query statement below */ select name as Customers from customers where id not in (select distinct customerid from orders)
<reponame>abraham-yusuf/coba-laravel -- phpMyAdmin SQL Dump -- version 3.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: May 01, 2014 at 04:57 PM -- Server version: 5.5.25a -- PHP Version: 5.4.4 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET...
<filename>app/migrations/2020-08-13-101908_publisher/down.sql drop table if exists publisher;
<reponame>buidaoanhvan/congdoanyte -- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 05, 2021 at 09:03 AM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.4.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /...
CREATE OR REPLACE FUNCTION physnet.stats( ) RETURNS TABLE(out_label text, out_value text) LANGUAGE 'plpgsql' COST 100 STABLE ROWS 1000 AS $BODY$ DECLARE v_rec record; v_intval integer; BEGIN out_label := 'number of arcs'; select count(*) into v_intval from arc where not rejected; out_valu...
<reponame>lovelysystems/apgdiff<gh_stars>0 DROP TABLE IF EXISTS radstg.asset_country_weight;
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: 26 Jul 2017 pada 12.51 -- Versi Server: 10.0.29-MariaDB-0ubuntu0.16.04.1 -- PHP Version: 7.0.18-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @...
<reponame>lucaleone/University-Roma-Tre-tests-and-exams set search_path to "esame2013"; --in SQL: i progetti a cui lavora un solo impiegato, mostrandone il codice select progetto from partecip group by progetto having count(impiegato) = 1
<reponame>kiri1701/sqlfluff SELECT ProductModelID, Name FROM Production.ProductModel WHERE ProductModelID=122 or ProductModelID=119 FOR XML RAW; SELECT ProductPhotoID, ThumbNailPhoto FROM Production.ProductPhoto WHERE ProductPhotoID=70 FOR XML AUTO; SELECT 1 as Tag FROM HumanResources.Employee AS E FOR XML EXP...
INSERT INTO `items` (`name`, `label`, `limit`, `rare`, `can_remove`) VALUES (NULL, 'yusuf', 'Luxury skin', -1, 0, 1); INSERT INTO `items` (`name`, `label`, `limit`, `rare`, `can_remove`) VALUES (NULL, 'grip', 'Handle', -1, 0, 1); INSERT INTO `items` (`name`, `label`, `limit`, `rare`, `can_remove`) VALUES (NULL, 'flashl...
whenever sqlerror continue prompt OK for these to fail for type not exists DROP TYPE app_dbms_sql_str_udt FORCE; DROP TYPE app_dbms_sql_udt FORCE; prompt OK if failed for type not exists --whenever sqlerror exit failure -- prompt beginning app_dbms_sql_udt.tps @@app_dbms_sql_udt.tps prompt beginning app_dbms_sql_udt.tp...
<gh_stars>1-10 CREATE DATABASE [codesanook-ef-note];
<reponame>timshadel/subdivision-list CREATE TABLE subdivision_GH (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "subdivision_GH" ("id", "name", "level") VALUES (E'GH-BA', E'Brong-Ahafo', E'region'); INSERT INTO "subdivision_GH" ("id", "name", "level") VALUES (E'GH...
<reponame>ahmedesh/Crud_with_Laravel<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Nov 20, 2021 at 10:48 AM -- Server version: 5.7.31 -- PHP Version: 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "...
DECLARE EXTERNAL FUNCTION DLLVERSION INTEGER RETURNS CSTRING(255) FREE_IT ENTRY_POINT 'DLLVersion' MODULE_NAME 'Fast';
<reponame>iuri/tutortronics -- -- drop SQL for survsimp package -- -- by <EMAIL> on 29th September 2000 -- -- $Id: simple-survey-drop.sql,v 1.1.1.1 2005/12/31 23:52:30 cvs Exp $ select drop_package('survsimp_response'); select drop_package('survsimp_question'); select drop_package('survsimp_survey'); drop table survs...
<reponame>goukaierzi/Alliance-Web drop table skin; create table skin; create table skin ( s_name varchar2(50) , hname varchar2(8) , price number(8) not null, constraint skin_sname primary key(sname), constraint fk_skin foreign key(hname) references hero(hname) ); insert into skin values ('科学大爆炸','亚索',78) i...
<filename>sql_metadb/derived_tables/holdings_notes.sql DROP TABLE IF EXISTS holdings_notes; CREATE TABLE holdings_notes AS WITH notes AS ( SELECT h.instanceid AS instance_id, h.id AS holding_id, jsonb_extract_path_text(h.jsonb, 'hrid') AS holding_hrid, jsonb_extract_path_te...
-- $Id$ -- Change SEC_FILTER.XML to Lob alter table SEC_FILTER alter XML type text;
define YearLiteral: @2014 define DateTimeYearLiteral: @2014T define UTCYearLiteral: @2014TZ define YearMonthLiteral: @2014-12 define DateTimeYearMonthLiteral: @2014-12T define UTCYearMonthLiteral: @2014-12TZ define DateLiteral: @2014-01-31 define DateTimeDateLiteral: @2014-01-31T define UTCDateLiteral: @2014-01-31TZ de...
<reponame>kachiden/almanac.httparchive.org #standardSQL # type of content_encoding SELECT client, mimeType, resp_content_encoding AS content_encoding, COUNT(0) AS freq, SUM(COUNT(0)) OVER (PARTITION BY client) AS total, COUNT(0) / SUM(COUNT(0)) OVER (PARTITION BY client) AS pct FROM `httparchive.almanac....
<filename>src/test/tinc/tincrepo/mpp/gpdb/tests/storage/filerep_end_to_end/ct/sql/skip/ct_heap_alter_part_split_partrange.sql -- start_ignore SET gp_create_table_random_default_distribution=off; -- end_ignore -- -- CT HEAP TABLE 1 -- create table ct_heap_alter_part_split_partrange1 (i int) partition by range(i) (start(...
/* * NOTE! This intentionally does NOT include testing a schema! */ CREATE TABLE test_object( seq serial PRIMARY KEY , object_type cat_tools.object_type NOT NULL , object_name text NOT NULL , secondary text -- NULL means don't create, ~ '^%' means suffix, '' ...
-- -- $Id: //Infrastructure/GitHub/Database/backup_and_sync/dbsync/primary_database_code/create_external_table_dbsync_logs.sql#2 $ -- CREATE OR REPLACE DIRECTORY DBSYNC_LOGS_1 as '/u01/db_backup/dbsync/logs/<host>__<standby_sid>' / CREATE TABLE DBAMGR.DBSYNC_LOGS_1 ( LOGFILE_NAME VARCHAR2(200 BYTE), STANDBY...
CREATE OR REPLACE FUNCTION postgres_air.booking_leg_select( p_booking_leg_id integer) RETURNS SETOF postgres_air.booking_leg_record LANGUAGE 'plpgsql' AS $BODY$ BEGIN RETURN QUERY SELECT bl.booking_leg_id, leg_num, bl.booking_id, (SELECT row(flight_id, flight_no, departure_airport, da.airport_name, arrival_...
-- write insert queries to populate the `burgers` table INSERT INTO burgers (burger_name, devoured) -- with at least three burger entries VALUES ("Bacon-Double-Cheeseburger", false), ("Chicken-Bacon-Ranch-Cheeseburger", false), ("Juicy Gouda Burger", false) ;
-- ---------------------------- -- Table structure for EMPREGADO -- ---------------------------- DROP TABLE IF EXISTS EMPREGADO; CREATE TABLE EMPREGADO ( ssn char(9) NOT NULL, pnome varchar(30) NOT NULL, inicialm char(1) default NULL, unome varchar(30) NOT NULL, sexo char(1) NOT NULL, endereco var...