sql
stringlengths
6
1.05M
<reponame>Shuttl-Tech/antlr_psql -- file:timestamptz.sql ln:85 expect:true INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997 -0800')
<gh_stars>10-100 CREATE TABLE [dbo].[Record]( CreatedDateTime DateTime NOT NULL)
<filename>data/adt/legacy/emptyadt.sql<gh_stars>1-10 delete from patient; delete from patientname; delete from patientaddress; delete from patientrace;
<gh_stars>0 REPLACE INTO `thinkox_hooks` (`id`, `name`, `description`, `type`, `update_time`, `addons`) VALUES (1, 'pageHeader', '页面header钩子,一般用于加载插件CSS文件和代码', 1, 0, 'ImageSlider'), (2, 'pageFooter', '页面footer钩子,一般用于加载插件JS文件和JS代码', 1, 0, 'ReturnTop,SuperLinks'), (3, 'documentEditForm', '添加编辑表单的 扩展内容钩子', 1, 0, 'Attachme...
CREATE USER 'console'@'%' IDENTIFIED BY 'defaultpass'; grant all privileges on saturn_console.* to 'console'@'%' identified by 'defaultpass' with grant option; flush privileges; # chang it in production: set password for 'console'@'%'=PASSWORD('<PASSWORD>'); flush privileges;
<filename>DataAccessLayer/ConcreteDataStore/SqlIndexDataStore/Scripts/StoredProcedures/update/update_UpdateEntityIndexEntry.sql SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: richa -- Create date: 2013-03-06 -- Description: Update Azure entity index entry -...
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- 主机: localhost -- 生成日期: 2016-12-06 08:20:22 -- 服务器版本: 5.5.53-0ubuntu0.14.04.1 -- PHP 版本: 5.5.9-1ubuntu4.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 08, 2020 at 11:54 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40...
-- -- PORTALS -- BEGIN; DECLARE foo1 CURSOR FOR SELECT * FROM tenk1; DECLARE foo2 CURSOR FOR SELECT * FROM tenk2; DECLARE foo3 CURSOR FOR SELECT * FROM tenk1; DECLARE foo4 CURSOR FOR SELECT * FROM tenk2; DECLARE foo5 CURSOR FOR SELECT * FROM tenk1; DECLARE foo6 CURSOR FOR SELECT * FROM tenk2; DECLARE foo7 CURSO...
USE [TrainTasker] GO /****** Object: Table [dbo].[UserRecord] Script Date: 05/19/2021 23:44:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[UserRecord]( [ID] [int] IDENTITY(1,1) NOT NULL, [userID] [varchar](128) NULL, [screenName] [varcha...
<filename>application/heyrehber.sql /* SQLyog Community v13.1.1 (64 bit) MySQL - 10.1.30-MariaDB : Database - heyrehber ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;...
REM ModeTest.sql REM Chapter 9, Oracle9i PL/SQL Programming by <NAME> REM This procedure illustrates different parameter modes and REM assignments to the parameters. CREATE OR REPLACE PROCEDURE ModeTest ( p_InParameter IN NUMBER, p_OutParameter OUT NUMBER, p_InOutParameter IN OUT NUMBER) IS v_LocalVariab...
<reponame>uk-gov-mirror/SkillsFundingAgency.das-employer-incentives<filename>src/SFA.DAS.EmployerIncentives.Database/Scripts/Update.AccountsSignedAgreementVersion.sql UPDATE dbo.Accounts SET SignedAgreementVersion = 4 FROM dbo.Accounts WHERE HasSignedIncentivesTerms = 1 AND SignedAgreementVersion IS NULL
-- MySQL dump 10.15 Distrib 10.0.36-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: wioc -- ------------------------------------------------------ -- Server version 10.0.36-MariaDB-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_...
<reponame>kunzhijia/mysqyl-maste-slave-model -- MySQL dump 10.13 Distrib 5.7.13, for Linux (x86_64) -- -- Host: localhost Database: test -- ------------------------------------------------------ -- Server version 5.7.13 CREATE DATABASE IF NOT EXISTS appbricks DEFAULT CHARSET utf8 COLLATE utf8_general_ci; use appbr...
<reponame>xyla-io/almacen<filename>preparing/sql/create_procedure_update_url_numbers.sql<gh_stars>1-10 -- -- procedure -- create or replace procedure {SCHEMA}update_url_numbers (table_name character varying, url_column character varying, number_column character varying, should_force bool) as $$ declare q character ...
SELECT * FROM Singers A HASH JOIN Singers B ON A.SingerID = B.SingerID APPLY JOIN Singer C ON B.SingerID = C.SingerID LOOP JOIN Singer D ON C.SingerID = D.SingerID
USE [ANTERO] GO /****** Object: StoredProcedure [dw].[p_lataa_d_amos_spl_opiskelijavuodet_hylkaamisperuste] Script Date: 2.8.2019 11:49:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dw].[p_lataa_d_amos_spl_opiskelijavuodet_hylkaam...
CREATE OR REPLACE PACKAGE BODY plex IS -------------------------------------------------------------------------------------------------------------------------------- -- CONSTANTS, TYPES, GLOBALS --------------------------------------------------------------------------------------------------------------------------...
-- ======================== -- Information -- ======================== -- Direct Link: https://www.hackerrank.com/challenges/the-company/problem -- Difficulty: Medium -- Max Score: 30 -- DBMS: mySQL -- ======================== -- Solution -- ======================== SELECT c.company_code, c.founder, ...
<reponame>dram/metasfresh -- 2021-06-28T12:40:55.955Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Help='', Description='Wenn ja, dann muss der betreffende Geschäftspartner eine Umsatzsteuer-ID haben, damit der Steuersatz matcht.',Updated=TO_TIMESTAMP('2021-06-28 14:40:5...
-- upgrade-5.0.1.0.0-5.0.1.0.1.sql SELECT acs_log__debug('/packages/intranet-confdb/sql/postgresql/upgrade/upgrade-5.0.1.0.0-5.0.1.0.1.sql',''); CREATE OR REPLACE FUNCTION inline_0 () RETURNS INTEGER AS $BODY$ declare v_count integer; begin select count(*) into v_count from pg_class where re...
update "Accounts" set "locations" = ${locations} where "id" = ${id};
/*************************************************************************/ -- Assigment: schema capacity data ddl -- Description: schema capacity data ddl -- Author: <NAME> -- Date: 11.Jan, 2020 -- Job name: schema capacity data ddl -- Language: MSSQL -- Target data: cdm -- /***********************************...
<gh_stars>1-10 select name, display_name from gcp.gcp_bigtable_instance where title = '{{ resourceName }}';
<reponame>blinkops/blink-aws-query<filename>aws-test/tests/aws_api_gatewayv2_integration/query.sql select integration_id from aws.aws_api_gatewayv2_integration where api_id = '{{output.api_id.value}}'
DECLARE id_seq VARCHAR2(255) := 'create sequence id_seq'; t_customer VARCHAR2(500) := 'create table customer(' || 'id int primary key,' || 'name varchar2(255) unique not null,' || 'birth_date varchar2(255) not null,' || 'phone_num v...
<gh_stars>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_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Sche...
<reponame>dorcastamatey/hostelManager<filename>key_management.sql -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 31, 2016 at 10:46 PM -- Server version: 10.1.9-MariaDB -- PHP Version: 5.6.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 25, 2021 at 05:27 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 29, 2021 at 05:58 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
with source as ( select * from {{ source('raw', 'ext_district') }} ), renamed as ( select district_id, pop, nmu500, nmu2k, nmu10k, nmuinf, ncit, rurba, avgsal, urat95, urat96, ent_ppt, ncri95, nc...
USE PeopleTracker GO /****** Object: Table dbo.Photo Script Date: 6/3/2018 4:55:48 PM ******/ IF OBJECT_ID('dbo.Photo', 'U') IS NOT NULL BEGIN ALTER TABLE dbo.Photo DROP CONSTRAINT FK_Photo_PhotoType DROP TABLE dbo.Photo END GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE dbo.Photo ( Phot...
<reponame>saiaku-gaming/quality-assurance ALTER TABLE crashes ADD COLUMN diagnostics VARCHAR;
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 03, 2020 at 01:10 AM -- Server version: 10.4.8-MariaDB-log -- 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 ...
CREATE TABLE `sca_subscriptions` ( `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, `subscriber` VARCHAR(255) NOT NULL, `aor` VARCHAR(255) NOT NULL, `event` INT DEFAULT 0 NOT NULL, `expires` INT(11) DEFAULT 0 NOT NULL, `state` INT DEFAULT 0 NOT NULL, `app_idx` INT DEFAULT 0 NOT NULL, `call_id` VARCHAR(255) NO...
<reponame>PacktPublishing/Creating-Reports-with-SQL-Server-2012-Reporting-Services --Pie chart query select t2.ProductCategory, sum(t1.amountSpent) as AmountSpentPerProduct, round(sum(t1.AmountSpent)/sum(sum(amountSpent)) over(), 2) as PercentagePerProduct from dbo.tblCustomerPurchases t1 inner join dbo.tblProdu...
<reponame>CSCfi/antero IF NOT EXISTS ( select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='sa' and TABLE_NAME='sa_maaluokitus' ) BEGIN CREATE TABLE sa.sa_maaluokitus( id bigint IDENTITY(1,1) NOT NULL, loadtime datetime2(4) NOT NULL, source nvarchar(255) NULL, username nvarchar(128) NOT NULL, kood...
<filename>problems/suspicious-bank-accounts/mysql_schemas.sql Create table If Not Exists Accounts (account_id int, max_income int); Create table If Not Exists Transactions (transaction_id int, account_id int, type ENUM('creditor', 'debtor'), amount int, day datetime); Truncate table Accounts; insert into Accounts (acco...
CREATE OR REPLACE FUNCTION pir_select_internal( state bytea, query bytea, col text) RETURNS bytea AS '$libdir/pir_select', 'pir_select_internal' LANGUAGE C IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION pir_final( state bytea ) RETURNS bytea AS '$libdir/pir_select', 'pir_final' LANGUAGE C IMMUTABLE STRICT; CREATE OR RE...
SELECT CONCAT( 'ALTER TABLE ',t1.TABLE_SCHEMA,'.',t1.TABLE_NAME,' ','ADD ', IF( t1.NON_UNIQUE = 1, CASE UPPER(t1.INDEX_TYPE) WHEN 'FULLTEXT' THEN 'FULLTEXT INDEX' WHEN 'SPATIAL' THEN 'SPATIAL INDEX' ELSE CONCAT('INDEX ',t1.INDEX_NAME,' USING ',t1.INDEX_TYPE) END, IF(UPPER(t1.INDEX_NAME)...
<gh_stars>10-100 CREATE TABLE "test_table" ( "id" BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY, "self_reference_id" BIGINT NOT NULL, CONSTRAINT "test_table_pk" PRIMARY KEY ("id") ); ALTER TABLE "test_table" ADD CONSTRAINT "test_table_self_reference_id_fk" FOREIGN KEY ("self_reference_id") REFERENCES "test_...
<gh_stars>1-10 SET DEFINE OFF; Insert into DZ_SWAGGER3_PARENT_SECSCHM_MAP (PARENT_ID, SECURITYSCHEME_ID, SECURITYSCHEME_NAME, SECURITYSCHEME_ORDER, VERSIONID) Values ('SAMPLE', 'SAMPLE.SEC.1', 'sample.security.apikey', 10, 'SAMPLE'); Insert into DZ_SWAGGER3_PARENT_SECSCHM_MAP (PARENT_ID, SECURITYSCHEME_ID, SE...
-- {"id":100,"name":"lb james阿道夫","money":293.899778,"datethree":"2020-07-30 10:08:22.123"} CREATE TABLE source ( id int, name varchar, money decimal, datethree TIMESTAMP(3), proctime as PROCTIME(), WATERMARK FOR datethree AS datethree - INTERVAL '3' SECOND ) WITH ( 'conne...
select e from Employee e where e.id = :id ---------------------------------------------------------------------------------- select e from Employee e where e.salary > 100000 ---------------------------------------------------------------------------------- select e.firstName from Employee e ----------------------------...
CREATE SCHEMA HR;
CREATE TABLE IF NOT EXISTS Customers( customerId INTEGER NOT NULL IDENTITY, firstName VARCHAR(300), lastName VARCHAR(300), registrationID INTEGER, creditLimit DOUBLE, country VARCHAR(300), PRIMARY KEY (customerId) ); / CREATE TABLE IF NOT EXISTS DataTypeTable( row_id INTEGER, int_type INT...
SELECT TRIM(both ' ' FROM SUBSTRING(oww.content FROM '^(.*)\([^()]+\)$')) AS vocabulary, oww.url, SUBSTRING(oww.content FROM '\(([^()]+)\)$') AS relationship FROM otx_weblink_weblink oww INNER JOIN otx_weblink_weblink_baskets owwb on oww.id = owwb.weblink_id WHERE owwb.basket_id = %%topic_id int%% ORDER BY voc...
print ' Generating update_columns decoder ring...' IF OBJECT_ID('[orm_meta].[decode_updated_columns_bitmask]', 'IF') IS NOT NULL drop function [orm_meta].[decode_updated_columns_bitmask] go create function [orm_meta].[decode_updated_columns_bitmask] ( @updated_columns varbinary(255) , @table_name varchar(100) ) re...
CREATE VIEW snowalert.rules.azure_cis_1_1_violation_query COMMENT='MFA must be enabled for all privileged users @id R6Q4AB22WH9 @tags cis, azure, iam' AS SELECT 'R6Q4AB22WH9' AS query_id , 'Azure CIS 1.1: Enable MFA for privileged users' AS title , OBJECT_CONSTRUCT( 'cloud', 'azure', '...
-- -- Base de datos: `db_asgard` -- USE `db_asgard`; -- -- Volcado de datos para la tabla `persona` -- INSERT INTO `persona` (`per_id`, `per_pri_nombre`, `per_seg_nombre`, `per_pri_apellido`, `per_seg_apellido`, `per_cedula`, `per_ruc`, `per_pasaporte`, `etn_id`, `eciv_id`, `per_genero`, `per_nacionalidad`, `pai_id_...
<gh_stars>1-10 create serial s start with 5 increment by 2 cache 5; create table t(i int) partition by hash(i) partitions 3; insert into t(i) values (s.next_value), (s.next_value), (s.next_value), (s.next_value), (s.next_value), (s.next_value), (s.next_value), (s.next_value); select * from t__p__p0 order by i; select *...
alter table "chat"."ReadUpToIndex" rename column "attendeeId" to "registrantId";
<reponame>dimagilg/commcare-hq<filename>corehq/blobs/sql_templates/restrict_legacy_attachment_metadata_insert.sql<gh_stars>100-1000 -- prevent inserts of legacy form and case attachments CREATE OR REPLACE FUNCTION insert_not_allowed() RETURNS TRIGGER AS $$ BEGIN RAISE EXCEPTION 'insert not allowed'; END; $$ LANGUAG...
select it.name as Tag, round((sum(quantity * unit_price) / ( select sum(quantity * unit_price) from sales_invoice as si1 left join sales_invoice_detail as sid1 on si1.id_sales_invoice = sid1.id_sales_invoic...
UPDATE STUDIO SET president = "M.G.Mayers" WHERE name="MGM"
CREATE TABLE stones ( id SERIAL PRIMARY KEY, game_id int REFERENCES games NOT NULL, x int NOT NULL, y int NOT NULL, color character varying(255) NOT NULL, inserted_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, UNIQUE (game_id, x, y) );
<reponame>ajmalhsn/survey_repo -- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 27, 2018 at 06:50 PM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
<reponame>HardyScheel/learn-MySQL -- Login: mysaql -u <your username> -p select database(); -- Which db is selected? show databases; -- Show all dbs. use <myDatabase>; -- Use a specific db. show tables; -- Show all tables of your selected db. describe <your db>.<your t...
-- CreateTable CREATE TABLE "Marriage" ( "marriageId" SERIAL NOT NULL, "maleId" INTEGER NOT NULL, "femaleId" INTEGER NOT NULL, "marriageDate" TIMESTAMP(3) NOT NULL, "remark" TEXT NOT NULL, PRIMARY KEY ("marriageId") );
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jan 23, 2021 at 02:46 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
<reponame>seba-m/University-Projects -- Table: public.Producto -- DROP TABLE public."Producto"; CREATE TABLE IF NOT EXISTS public."Producto" ( "IdProducto" character varying(40) COLLATE pg_catalog."default" NOT NULL, "IdCategoria" character varying(40) COLLATE pg_catalog."default" NOT NULL, "IdNegocio" ch...
alter table "public"."comments" add constraint "comments_pkey" primary key ("username");
-- INSERT INTO subscription_delivery_in_progress (id, claimant, claimed, claim_expires) VALUES ($(subscriptionId), $(claimant), now(), now() + $(claimTimeoutSeconds)::text::interval) ON CONFLICT (id) DO UPDATE SET claimant = $(claimant), claimed = now(), claim_expires = now() + $(claimTimeoutSeconds)::text::interval...
DROP TABLE IF EXISTS raster_pixelaspolygons; CREATE TABLE raster_pixelaspolygons ( rast raster ); CREATE OR REPLACE FUNCTION make_test_raster() RETURNS void AS $$ DECLARE width int := 10; height int := 10; x int; y int; rast raster; BEGIN rast := ST_MakeEmptyRaster(width, height, 0, 0, 1, -1, 0, 0, 0);...
<filename>eclipse-workspace/DemoSite/core/src/main/resources/sql/BLC_SKU_UPDATE_LONG_DESC.sql UPDATE BLC_SKU SET LONG_DESCRIPTION='The super-sized, slipcased Adamantium Collection format is back, and it''s the X-Men''s turn in the spotlight! It''s the best and brightest moments from the mighty mutants'' long and storie...
<filename>codes/data/orm/src/main/resources/sql/mysql/ddl.sql USE mydb; DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int(10) NOT NULL COMMENT '用户ID' AUTO_INCREMENT, `name` varchar(50) NOT NULL COMMENT '用户名', `sex` int(1) NOT NULL COMMENT '性别。1表示男,2表示女', `age` int(4) NOT NULL DEFAULT '18' COMMENT '年龄...
/* SQLyog Ultimate v11.25 (64 bit) MySQL - 5.5.20 : Database - spark_project ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_...
<reponame>devoteamgcloud/bvi -- meetings_per_calls_group (view) -- Review: 2018-03-21 SELECT meeting_calls_group, number_meetings, avg_time_spent_meetings, index FROM (SELECT '2 calls' AS meeting_calls_group, p_num_meetings_with_2_calls AS number_meetings, average_meeting_minutes_with_2_calls AS avg_time_spent_meeting...
<filename>hedera-mirror-importer/src/main/resources/db/migration/v1/V1.39.0__support_nfts.sql ------------------- -- Update and add tables for NFT support ------------------- -- Create the enums for the new token columns CREATE TYPE token_supply_type AS ENUM ('INFINITE', 'FINITE'); CREATE TYPE token_type AS ENUM ('FUN...
-- Adminer 4.7.7 MySQL dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; USE `bertiknet2`; SET NAMES utf8mb4; DROP TABLE IF EXISTS `gallery_images`; CREATE TABLE `gallery_images` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `category` varchar(255)...
<filename>migrations/20170205024638_unique_entries_digest/down.sql ALTER TABLE entries DROP CONSTRAINT entries_hash_unique;
/*L Copyright SAIC, Ellumen and RSNA (CTP) Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/national-biomedical-image-archive/LICENSE.txt for details. L*/ update general_image set general_series_pk_id = 403111936 where general_series_pk_id = 403144704; update general_ima...
<reponame>opengauss-mirror/Yat -- @testpoint:opengauss关键字exchange(非保留),作为字段数据类型(合理报错) --前置条件 drop table if exists exchange_test cascade; --关键字不带引号-合理报错 create table exchange_test(id int,name exchange); --关键字带双引号-合理报错 create table exchange_test(id int,name "exchange"); --关键字带单引号-合理报错 create table exchange_test(id i...
-- @testpoint: pg_stat_get_db_blocks_fetched(oid)函数的异常校验,合理报错 -- 先清理环境 drop table if exists sales; select pg_stat_reset(); --创建表sales CREATE TABLE sales (prod_id numeric(6), cust_id numeric, time_id DATE, channel_id CHAR(1), promo_id numeric(6), quantity_sold numeric(3), amount_sold numeric(10,2) ); INSERT INTO s...
CREATE DATABASE IF NOT EXISTS soaintranet; USE soaintranet: CREATE SEQUENCE public.users_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; CREATE TABLE public.users ( id bigint NOT NULL DEFAULT nextval('users_id_seq'::regclass), email character varying(255) NOT...
DROP DATABASE IF EXISTS ds_sharefile; CREATE DATABASE ds_sharefile; DROP USER IF EXISTS 'ds_sharefile'@'localhost'; CREATE USER 'ds_sharefile'@'localhost' IDENTIFIED BY 'ds_sharefile'; GRANT ALL ON ds_sharefile.* TO 'ds_sharefile'@'localhost'; USE ds_sharefile;
<gh_stars>0 CREATE DATABASE IF NOT EXISTS `blog` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `blog`; -- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64) -- -- Host: localhost Database: blog -- ------------------------------------------------------ -- Server version 5.6.35 /*!40101 SET @OLD_CHARACTER_SET_C...
CREATE DATABASE burgers_db; USE burgers_db; DROP DATABASE IF EXISTS burgers_db; CREATE TABLE burgers( id INT AUTO_INCREMENT NOT NULL, burger_name VARCHAR(255) NOT NULL, devoured BOOLEAN NOT NULL, PRIMARY KEY (id) );
<gh_stars>0 insert into bank.nasabah_perorangan(cif, nama, ktp, foto, created_date, created_by) values ('001', '<NAME>', '62641234', null, now(), 'migration'); insert into bank.nasabah_badan_usaha(cif, nama, npwp, siup, created_date, created_by) VALUES ('002', 'PT. Multipolar', '1234', '2343434', now(), 'migration');
<reponame>DeepSingh93/Grockart<filename>grockart/grockart/assets/database/CSCI5308_10_DEVINT_tbl_Login.sql -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: db-5308.cs.dal.ca Database: CSCI5308_10_DEVINT -- ------------------------------------------------------ -- Server version 5.5.5-10.0.35-Maria...
<filename>test_scripts/views/v_cohort_matching.sql CREATE OR REPLACE VIEW v_cohort_matching AS ( SELECT f_player_id, f_group_activity_id FROM t_player_group_activity_assignement );
<reponame>AusDTO/backchat SET statement_timeout = 0; SET lock_timeout ET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: - -- CREATE EXTENSION IF NOT EX...
<reponame>lalaithion/SeeYouInfo CREATE TABLE students ( id SERIAL PRIMARY KEY, username VARCHAR NOT NULL, password VARCHAR NOT NULL, displayname VARCHAR, joined DATE ); CREATE TABLE class_comments ( id SERIAL PRIMARY KEY, ranking INTEGER, comment VARCHAR, upvotes INTEGER DEFAULT 0, downvotes INTEGE...
<filename>upgrade/postgis/12.sql<gh_stars>1-10 create table lsrs_2016( CONSTRAINT __lsrs_2016_check CHECK(valid >= '2016-01-01 00:00+00'::timestamptz and valid < '2017-01-01 00:00+00')) INHERITS (lsrs); CREATE INDEX lsrs_2016_valid_idx on lsrs_2016(valid); CREATE INDEX lsrs_2016_wfo_idx on lsrs_2016...
<reponame>fatherjack/Sessions<filename>20190427 DataInDevon/PowerShell Medley/04 SQL Query.sql -- just some query activity Select * from adventureworks2016.sales.SalesOrderHeader
<reponame>propublica/il-ticket-loader<filename>sql/views/wards.sql create table if not exists wards as select ogc_fid, ward, shape_area, shape_leng, wkb_geometry, st_asgeojson(st_setsrid(st_extent(wkb_geometry), 3857))::jsonb as extent, st_asgeojson(st_setsrid(st_centroid(wkb_geometry), 38...
/*************************************** Polyglot Programming DC : October 2014 Manipulating Data in Style with SQL ************************************** Author: <NAME> Created: 2014-08-02 ************************************** This script uses common table expressions to explore employee reportin...
<filename>server/obsolete/database_old/admin.sql /* * tianyxu 2019-Sep-10 according discussion with xiaoting get this table * mysql -uroot -p123Xty1. -Dgrimm<./example.sql * or can use source in the mysql cli * create the admin Table for admin user */ CREATE TABLE admin ( id integer NOT N...
<reponame>BatteryAcid/dayz-private-server -- -- Table structure for table `vehicle_locations` -- DROP TABLE IF EXISTS `vehicle_locations`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `vehicle_locations` ( `ID` int(11) NOT NULL, `...
-- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date,,> -- Description: <Description,,> -- ============================================= CREATE PROCEDURE [srv].[ClearFullInfo] AS BEGIN /* очищает все собранные данные */ SET NOCOUNT ON; --truncate table [sr...
-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64) -- -- Host: localhost Database: universitydb -- ------------------------------------------------------ -- Server version 8.0.26 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */...
<gh_stars>10-100 -- file:updatable_views.sql ln:1290 expect:true insert into rw_view4 (aa,bb) values (1,'yyy') on conflict (aa) do update set bb = excluded.bb
<gh_stars>1000+ copy into mytable from @my_int_stage; copy into mytable from @my_int_stage file_format = (type = csv); copy into mytable from @my_int_stage file_format = (format_name = 'mycsv'); copy into mytable from @my_int_stage file_format = (type = 'CSV') pattern='.*/.*/.*[.]csv[.]gz'; copy into mytable fr...
-- 2017-09-04T21:26:41.367 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('ad_column','ALTER TABLE public.AD_Column ADD COLUMN SelectionColumnSeqNo NUMERIC(10)') ;
<reponame>smith750/kc DELIMITER / -- -- INSERT INTO KRCR_PARM_T (APPL_ID,EVAL_OPRTR_CD,NMSPC_CD,OBJ_ID,PARM_DESC_TXT,CMPNT_CD,PARM_NM,PARM_TYP_CD,VAL,VER_NBR) VALUES ('KC','A','KC-COIDISCLOSURE',UUID(),'Column header label for Coi FE conflict','Document','COI_DISCLOSURE_FE_CONFLICT_HEADER_LABEL','CONFG','Related',1)...
<gh_stars>0 -- Sccsid: @(#)dss.ddl 2.1.8.1 CREATE DATABASE IF NOT EXISTS TPCH; USE TPCH; CREATE TABLE IF NOT EXISTS nation ( N_NATIONKEY BIGINT NOT NULL, N_NAME CHAR(25) NOT NULL, N_REGIONKEY BIGINT NOT NULL, N_COMMENT V...
CREATE TABLE items ( id SERIAL PRIMARY KEY, name VARCHAR(255), description VARCHAR(2000), created TIMESTAMP );
<gh_stars>0 CREATE PROCEDURE [uspGetUsernameAndPasswordHash] @username VARCHAR(255) AS SELECT Username, PasswordHash FROM UserProfile WHERE Username = @username RETURN 0
ALTER TABLE user ADD `using2fa` BIT(1) DEFAULT 0; ALTER TABLE user ADD `totp_secret` VARCHAR(255) NULL; ALTER TABLE user_aud ADD `using2fa` BIT(1) DEFAULT 0; ALTER TABLE user_aud ADD `totp_secret` VARCHAR(255) NULL;