sql
stringlengths
6
1.05M
<reponame>opengauss-mirror/openGauss-graph \o query_mem_col.txt set current_schema=vector_engine; set explain_perf_mode=summary; set query_dop=0; -- Test on hashjoin set enable_hashjoin=on; set enable_mergejoin=off; set enable_nestloop=off; -- $ID$ -- TPC-H/TPC-R Pricing Summary Report Query (Q1) -- Functional Query ...
<gh_stars>0 -- MySQL dump 10.14 Distrib 5.5.52-MariaDB, for Linux (x86_64) -- -- Host: localhost Database: troyhsco_sweettime -- ------------------------------------------------------ -- Server version 5.5.52-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_...
/* 175. Combine Two Tables https://leetcode-cn.com/problems/combine-two-tables/ Create table Person (PersonId int, FirstName varchar(255), LastName varchar(255)); Create table Address (AddressId int, PersonId int, City varchar(255), State varchar(255)); Truncate table Person; insert into Person (PersonId, LastName, F...
<reponame>uptonking/datable TRUNCATE TABLE `user`; INSERT INTO `user` VALUES ('1', 'admin', 'admin');
CREATE SEQUENCE IF NOT EXISTS tb_product_id_seq; CREATE TABLE IF NOT EXISTS TB_PRODUCT( ID INTEGER PRIMARY KEY NOT NULL DEFAULT NEXTVAL('tb_product_id_seq'), BRAND_ID INTEGER NOT NULL REFERENCES TB_BRAND(ID), MEASUREMENT_UNIT_ID INTEGER NOT NULL REFERENCES TB_MEASUREMENT_UNIT(ID), NAME VARCHAR(255) NOT...
<reponame>uk-gov-mirror/hmcts.am-judicial-booking-service DELETE FROM role_assignment_request; INSERT INTO public.role_assignment_request (id, correlation_id, client_id, authenticated_user_id, requester_id, request_type, status, process, reference, replace_existing, last_updated, created) VALUES('11334a2b-79ce-44eb-91...
-- Highest budget movie by year by country WITH expensive_movies AS ( SELECT release_year, country_id, MAX(budget) AS max_budget FROM movies GROUP BY release_year, country_id ) SELECT c.country_name, m.release_year, m.title, m.budget FROM movies m JOIN expensive_movies em ON m.release_year =...
<gh_stars>1-10 SET DEFINE OFF; CREATE INDEX AFW_21_PLUGN_ARBRE_FK2 ON AFW_21_PLUGN_ARBRE (REF_PLUGN_ARBRE_NOEUD) LOGGING /
WITH strassenname AS ( SELECT lokalisation.t_id AS lok_t_id, lokalisationsname.atext AS strassenname FROM agi_dm01avso24.gebaeudeadressen_lokalisation AS lokalisation LEFT JOIN agi_dm01avso24.gebaeudeadressen_lokalisationsname AS lokalisationsname ON lokalisationsname.benannte = lokalisation.t_id W...
/* Process: lastcontracts sp create_tmp_tbl .import trim possible_chg(diff) insert real_chg RELEASE */ savepoint "sp_xxxx1"; CREATE temp TABLE "t_buf" ( "tradingday" INTEGER NOT NULL, "instrumentid" TEXT UNIQUE NOT NULL ); .separator ',' .import 'param_last.csv' "t_buf" UPDATE "t_buf" set "instrument...
-- Dropar uma tabela. DROP TABLE TABELA;
ALTER TABLE "public"."users" ADD COLUMN "pubkey" text; ALTER TABLE "public"."users" ALTER COLUMN "pubkey" DROP NOT NULL;
<gh_stars>100-1000 -- -- This code is free software; you can redistribute it and/or modify it under -- the terms of the GNU General Public License as published by the Free Software -- Foundation, version 2 -- -- -- Currently unused! -- DELIMITER $$ DROP procedure IF EXISTS _rdebug_wait_for_breakpoint_clock $$ CREAT...
CREATE OR REPLACE FUNCTION public.add_year_2021_if_not_exists() RETURNS VOID LANGUAGE 'plpgsql' VOLATILE AS $BODY$ DECLARE v_year_exists BOOLEAN; BEGIN select exists(select 1 from C_Year where FiscalYear='2021' and IsActive='Y' and C_Calendar_ID=1000000) INTO v_year_exists; IF (v_year_exists)...
<gh_stars>0 -- ObligationsUndeliveredOrdersUnpaidTotal (FYB) = USSGL(4801) for the same TAS/DEFC combination. -- This applies to the award level. SELECT row_number, obligations_undelivered_or_fyb, ussgl480100_undelivered_or_fyb, COALESCE(obligations_undelivered_or_fyb, 0) - COALESCE(ussgl480100_undelive...
<reponame>onlymaker/taurus drop table if exists report_upload; create table report_upload ( id int unsigned not null auto_increment primary key, data json, oid varchar(100) generated always as (data ->> '$.trace_id'), guid char(36) not null default '', gnum int unsigned not null default 0, report_order_stat...
{{ config( materialized='table' ) }} SELECT o.order_id, o.status, o.tracking_id, o.shipping_service, o.promo_id, o.discount, o.order_cost FROM {{ ref('int_order_promos') }} o
<filename>village_addtosample.sql INSERT INTO zaf.tbl_sampling_201602 ( village_name, village_code, main_place_name, main_place_code, municipality_name, municipality_code, municipality_mdb_c, district_name, district_code, district_mdb_c, province_name, province_code, province_mdb_c, lz_code, survey) SE...
<reponame>kenliu/peer-acks-v2 CREATE USER IF NOT EXISTS peeracks; CREATE DATABASE peeracks; GRANT ALL ON DATABASE peeracks to peeracks;
<reponame>dbmi-pitt/DIKB-EvidenceBase<gh_stars>0 -- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET search_path = ohdsi, pg_catalog; SET defaul...
create database if not exists hive_native; drop table if exists hive_native.fewtypes_null_hive; create external table hive_native.fewtypes_null_hive ( int_col int, bigint_col bigint, date_col string, time_col string, timestamp_col string, interval_col string, varchar_col string, float_col float, doub...
<reponame>daniimd/CRUD-InterAlpha CREATE DATABASE CRUD USE CRUD GO CREATE TABLE Clientes ( ClienteId INT IDENTITY (1,1), Nome VARCHAR(50) NOT NULL, CPF VARCHAR(11) NOT NULL, Sexo VARCHAR(10) NOT NULL, Endereco VARCHAR(50) NULL, Bairro VARCHAR(30) NULL, Telefone CHAR(9) NULL, Email VARCHAR(30) N...
<filename>gpff-sql/procedures/help/procReadHelp.sql --drop PROCEDURE GPSQLWEB.procReadHelp CREATE PROCEDURE GPSQLWEB.procReadHelp ( IN P_COD_TABLA VARCHAR(15), IN P_CODE VARCHAR(50), IN P_DESCRIPTION VARCHAR(150), IN P_PARENTCODE VARCHAR(150), IN P_FIRSTRESULT INTEGER, IN P_MAXRESULT INTEGER, IN P_SORT V...
<gh_stars>1-10 /****** Object: Table [dbo].[T_Creation_Option_Values] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[T_Creation_Option_Values]( [Value_ID] [int] IDENTITY(1,1) NOT NULL, [Value_String] [varchar](64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [Display] [varcha...
<reponame>lauracristinaes/aula-java<filename>hibernate-release-5.3.7.Final/project/documentation/src/main/asciidoc/userguide/chapters/domain/extras/collections/collections-array-binary-example.sql CREATE TABLE Person ( id BIGINT NOT NULL , phones VARBINARY(255) , PRIMARY KEY ( id ) )
{% macro get_page_part(page_url) %} -- reverse((left(reverse(page_url), position('/' in reverse(page_url))-1))) reverse(split_part(reverse(page_url), '-', 1)) {% endmacro %}
<gh_stars>0 CREATE VIEW `v_encounter` AS SELECT `a`.`appt_id` AS `id`,`c`.`encounter_id` AS `encounter_id`,CONCAT(`a`.`status_date`,' ',`a`.`status_time`) AS `date`,CASE `a`.`appt_status` WHEN 'B' THEN 'Booked' WHEN 'A' THEN 'Arrived' WHEN 'S' THEN 'Seen' WHEN 'C' THEN 'Cancelled' ELSE NULL END AS `type`,'\nOP' AS `de...
<reponame>LasseWolter/clowdr ALTER TABLE "public"."RequiredContentItem" ADD COLUMN "uploadsRemaining" integer NULL;
<reponame>carmour24/UnitOfWork -- Inserting some useful data INSERT INTO public.tbl2( foreign_name) VALUES ('foreign test'); INSERT INTO public.tbl1( foreign_name, name) VALUES (1, 'test');
--SELECT "Motos_1"."Marca" AS "Datos (copia)", "Motos_1"."Medio" AS "Medio", SUM("Motos_1"."InversionUS") AS "TEMP(TC_)(2622528870)(0)", SUM("Motos_1"."InversionUS") AS "sum:Calculation_0061002123102817:ok", SUM("Motos_1"."InversionQ") AS "sum:InversionQ:ok", TABLEAU.TO_DATETIME(DATE_TRUNC('YEAR', TABLEAU.NOR...
BEGIN; TRUNCATE TABLE todos; COMMIT;
<reponame>SkillsFundingAgency/DC-Data-Postcodes CREATE TABLE [Staging].[HMPP_Postcodes] ( [Postcode] NVARCHAR(10) NOT NULL , [UKPRN] BIGINT NOT NULL, [EffectiveFrom] DATE NOT NULL, [EffectiveTo] DATE NULL ) GO GRANT ALTER ON OBJECT::Staging.HMPP_Postcodes TO [PostCode_RW_User];
CREATE DATABASE bd_user; CREATE TABLE tb_user(`nome` varchar(20),`senha` varchar(8),`adm` varchar(3));
<reponame>gatesyp/GymGo<filename>GymGo.sql -- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 20, 2016 at 11:35 PM -- Server version: 5.5.47-0ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+...
/* Navicat Premium Data Transfer Source Server : localhost_laragon Source Server Type : MySQL Source Server Version : 50724 Source Host : localhost:3306 Source Schema : newoa Target Server Type : MySQL Target Server Version : 50724 File Encoding : 65001 Date: 21/07/2...
<filename>demo.sql -- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 20-08-2013 a las 09:40:41 -- Versión del servidor: 5.5.27 -- Versión de PHP: 5.4.7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_S...
<gh_stars>10-100 ALTER TABLE [dbo].[Events] ADD [Dispatched] BIT NOT NULL DEFAULT(0); GO CREATE TABLE [dbo].[Batches] ( [Id] BIGINT IDENTITY (1, 1) NOT NULL, [SequenceNumber] BIGINT NOT NULL, [Size] INT NOT NULL, [Timestamp] DATETIME2 (7) DEFAULT (GETDATE()) NOT NULL, [Complete] BIT DEFA...
-- file:text.sql ln:91 expect:true select format('%s, %s', variadic array[true, false])
<filename>backend/de.metas.printing/de.metas.printing.base/src/main/sql/postgresql/system/80-de.metas.printing/5576650_sys_fix_C_Printing_Queue_PrintInfo_v.sql DROP VIEW IF EXISTS C_Printing_Queue_PrintInfo_v; CREATE OR REPLACE VIEW C_Printing_Queue_PrintInfo_v AS SELECT pq.C_Printing_Queue_ID AS C_Printing_Queue...
<reponame>dram/metasfresh UPDATE C_Doctype_trl SET Updated='2019-07-02 04:02:00.090267+00', UpdatedBy=99, Name='Disposal', PrintName='Disposal' WHERE C_Doctype_ID=540948 AND AD_Language='en_US'; UPDATE C_Doctype_trl SET Updated='2019-07-02 04:02:00.090267+00', UpdatedBy=99, Name='Entsorgung', PrintName='Entsorgung' WH...
<filename>server/db/Tables/Group.sql USE boardgameDB; DROP TABLE IF EXISTS Group; CREATE TABLE Group ( GroupId INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, GroupName VARCHAR(50) NOT NULL, GroupDesc VARCHAR(500) NOT NULL );
<reponame>SiverPineValley/algo -- 프로그래머스 -- SQL - 동물 수 구하기 SELECT count(*) AS count from ( SELECT NAME from ANIMAL_INS group by NAME having NAME is not NULL ) AS NAME_TABLE;
<filename>Sql 3.sql #CREATE TABLE HELLO(ID INT VARCHAR(10), DESCRIPTION VARCHAR(100)) #SELECT cast(12345 AS BINARY(5)) #SELECT cast(12345 AS VARBINARY(10)) #SELECT cast('ABC' AS CHAR(10)) #ABC IS OUTPUT #SELECT cast('ABCDEFGHIJKLMNOPQ' AS CHAR(10)) #ABCDEFGHIJ IS OUTPUT CREATE SCHEMA `db2`; #SELECT * FROM db1.`em...
<gh_stars>1-10 /* Dump all triples in the given named graph to a file, serialized as TTL. @param srcgraph dumped graph URI @param out_file (absolute) path to the written file; backslashes must be escaped Adapted from http://www.openlinksw.com/dataspace/dav/wiki/Main/VirtDumpLoadRdfGraphs */ CREATE PROCEDURE d...
CREATE TABLE `google-play-store` ( `App` varchar(255) NOT NULL, `Category` varchar(255) NOT NULL, `Rating` decimal(15,2) NOT NULL, `Reviews` int NOT NULL, `Size` varchar(50) NOT NULL, `Installs` varchar(50) NOT NULL, `Type` varchar(50) NOT NULL, `Price` varchar(50) NOT NULL, `Content Rating` varchar(2...
/* * Creates the def, tag and iov tables needed to define a DCU data taking */ /* dcu tag*/ CREATE TABLE dcu_tag ( tag_id NUMBER(10) NOT NULL, gen_tag VARCHAR(100) NOT NULL, location_id NUMBER(10) NOT NULL ); CREATE SEQUENCE dcu_tag_sq INCREMENT BY 1 START WITH 1; ALTER TABLE dcu_tag ADD CONSTRAINT dcu...
prompt Importing table t_usuario_claves... set feedback off set define off insert into t_usuario_claves (ID_USUARIO, TIPO, ESTADO, HASH, SALT, ALGORITMO, CANTIDAD_INTENTOS_FALLIDOS, ITERACIONES, FECHA_ULTIMA_AUTENTICACION) values (1, 'A', 'N', '46287AC928B408ED04C008F7CA391D4C2F1DFA5F2C0A4FD6D7CA9B2327F4D349', '690728D...
--Mettez en place ce trigger, puis ajoutez un produit dans une commande, vérifiez que le champ total est bien mis à jour. DELIMITER | DROP TRIGGER IF EXISTS maj_total CREATE TRIGGER maj_total AFTER INSERT ON lignedecommande FOR EACH ROW BEGIN DECLARE id_c INT; DECLARE tot DOUBLE; SET id_c = NEW.id_commande...
<filename>drop.sql DROP DATABASE wildlifetracker_test; DROP DATABASE wildlifetracker;
-- MySQL dump 10.13 Distrib 5.5.62, for Linux (x86_64) -- -- Host: localhost Database: wms -- ------------------------------------------------------ -- Server version 5.5.62 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!4010...
-- Favor de llenar con los datos de los movimientos -- que hagan en su base de datos. -- Esto es para poder tener el mismo esqueme conforme se va desarrollando -- Este archivo se deberia llenar bloque por bloque con la siguiente informacion: -- Autor: -- Fecha de push -- EL bloque de codigo SQL que hace el cambio...
select * /* if we replace with delete statement here, rows will be deleted */ from ( SELECT "Country", ROW_NUMBER() over( partition by "Country" order by "id" ) rn /* row_number column alias */ from public.view_table_first where "Country" = 'India' ) src /*subquery alias */ where rn > 1;
<reponame>rhomicom-systems-tech-gh/Rhomicom-DB-Scripts /* Formatted on 12-18-2018 5:52:58 PM (QP5 v5.126.903.23003) */ DROP TABLE EPAY.EPAY_PSB7_SUSPTRNS_PRS_INST CASCADE CONSTRAINTS PURGE; CREATE TABLE EPAY.EPAY_PSB7_SUSPTRNS_PRS_INST ( PRS_INST_ID NUMBER NOT NULL, PRS_INST_TYPE_ID NUMBER, P...
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Versione server: 10.3.31-MariaDB - mariadb.org binary distribution -- S.O. server: Win32 -- HeidiSQL Versione: 10.2.0.5599 -- -----------------------------------------------...
INSERT INTO KRIM_ROLE_T (ROLE_ID,NMSPC_CD,ROLE_NM,DESC_TXT,KIM_TYP_ID,ACTV_IND,LAST_UPDT_DT,VER_NBR,OBJ_ID) VALUES (KRIM_ROLE_ID_S.nextval,'KC-UNT','Modify all Protocols','Modify all Protocols', (SELECT KIM_TYP_ID FROM KRIM_TYP_T WHERE NMSPC_CD = 'KC-SYS' AND NM = 'UnitHierarchy'), 'Y',NULL,1,sys_guid()); Insert into...
BEGIN; INSERT INTO FLIGHT_MASTER (FLIGHT_NAME, ROUTE_NO, DEPARTURE_TIME, ARRIVAL_TIME, CRAFT_TYPE) VALUES ('NTT001',1,'0900','1000','101'); INSERT INTO FLIGHT_MASTER (FLIGHT_NAME, ROUTE_NO, DEPARTURE_TIME, ARRIVAL_TIME, CRAFT_TYPE) VALUES ('NTT031',1,'0945','1045','151'); INSERT INTO FLIGHT_MASTER (FLIGHT_NAME, ROUTE_...
<reponame>avatar42/genSpring CREATE TABLE Watchlist.ShowsUser(id BIGINT NOT NULL primary key auto_increment, `LastWatched` VARCHAR(10) COMMENT 'len=10' NOT NULL, `BestExperience` VARCHAR(17) COMMENT 'len=17', `Comment` VARCHAR(187) COMMENT 'len=187', `Imdb` VARCHAR(2) COMMENT 'len=2', `Ota` VARCHAR(1) COMMENT 'len=1', ...
<reponame>Tiamat-Tech/sourcegraph<filename>migrations/frontend/1528395942_remove-org-saved-searches.down.sql BEGIN; -- ALTER TABLE saved_searches -- ALTER COLUMN user_id DROP NOT NULL; COMMIT;
<reponame>YANG-DB/yang-db -- cast,crew,id CREATE TABLE credits ( id NUMBER(7) NOT NULL PRIMARY KEY, cast VARCHAR(400) NOT NULL, crew VARCHAR(400) NOT NULL )
<filename>postgres/deploy/data_bag_item_insert.sql -- Deploy data_bag_item_insert -- requires: data_bag_items -- requires: data_bags -- requires: goiardi_schema BEGIN; CREATE OR REPLACE FUNCTION goiardi.insert_dbi(m_data_bag_name text, m_name text, m_orig_name text, m_dbag_id bigint, m_raw_data bytea) RETURNS BIGINT ...
<filename>k8s-test/tests/kubernetes_stateful_set/test-get-query.sql select name, namespace, service_name, replicas, collision_count, current_replicas, observed_generation, pod_management_policy, ready_replicas, revision_history_limit, updated_replicas, update_strategy from kubernetes.kubernete...
<gh_stars>10-100 select -- Required Columns self_link resource, case when name like 'gke-%' and labels ? 'goog-gke-node' then 'skip' when metadata -> 'items' @> '[{"key": "block-project-ssh-keys", "value": "true"}]' then 'ok' else 'alarm' end status, case when name like 'gke-%' and labels ? 'g...
<reponame>Zhaojia2019/cubrid-testcases select timestamptz'2015-10-8 15:00:00 Australia/Darwin'; select timestamptz'2015-10-8 15:00:00 Australia/Perth'; select timestamptz'2015-10-8 15:00:00 Australia/Eucla'; select timestamptz'2015-10-8 15:00:00 Australia/Brisbane'; select timestamptz'2015-10-8 15:00:00 Australia/Linde...
WITH rows AS (INSERT INTO items (title, description, imageurl, ownerid) VALUES ('this is a title', 'my description', '<PASSWORD>', 2) RETURNING id) INSERT INTO itemtags (itemid, tagid) VALUES ((SELECT id as itemid from rows), 7);
/* leave this l:see LICENSE file g:utility v:090122\S.Zaglio: again quoting management and expanded @cmd to 4000 chars v:081124\S.Zaglio: managed names with [] that osql don't accept v:081114\S.Zaglio: now is indipendent from other my sp to allow simple trasport&run to remote server v:080916\S...
<filename>db/notes.sql -- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 28, 2021 at 03:39 PM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:...
-- 1. Select the code that shows the name, region and population of the smallest country in each region SELECT region, name, population FROM bbc x WHERE population <= ALL (SELECT population FROM bbc y WHERE y.region=x.region AND population>0); -- 2. Select the code that shows the countries belonging to regions with a...
--liquibase formatted sql --changeset adriano:201812101816 --comment: População da tabela Funcionario com os inserts insert into `lab04db`.`funcionario`(usuario_id,pessoa_id) values (698,8); insert into `lab04db`.`funcionario`(usuario_id,pessoa_id) values (888,4); insert into `lab04db`.`funcionario`(usuario_id...
DROP TABLE IF EXISTS public.post_tags; CREATE TABLE public.post_tags ( post_id uuid not null, user_id uuid not null );
<reponame>SAUSy-Lab/map-speed-test -- table for points of origin and destination CREATE TABLE map_speed_od ( id serial PRIMARY KEY, vector geometry(LINESTRING,4326), shortest_path geometry(LINESTRING,4326) ); -- table for storing results CREATE TABLE map_speed_results ( id serial PRIMARY KEY, od_id integer, --...
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100 -- file:rangefuncs.sql ln:474 expect:true select * from tt
<reponame>stlbucket/postgraphile-de-extension -- Revert app_jobs_fn:function/jobs__decrease_job_queue_count from pg BEGIN; DROP FUNCTION IF EXISTS app_jobs_fn.jobs__decrease_job_queue_count(); COMMIT;
SELECT t.hash, t.block_number as block_height, o.index, address FROM `bigquery-public-data.crypto_bitcoin.transactions` AS t, UNNEST(t.outputs) as o, UNNEST(o.addresses) as address WHERE DATE(block_timestamp) >= '{{ds}}' AND DATE(block_timestamp) < DATE_ADD('{{ds}}', INTERVAL 1 {{var.valu...
<filename>Monitoring Solutions/CollectLocks/Job [DBA - CollectLocks].sql USE [msdb] GO /****** Object: Job [DBA - CollectLocks] Script Date: 1/7/2018 11:49:02 AM ******/ BEGIN TRANSACTION DECLARE @ReturnCode INT SELECT @ReturnCode = 0 /****** Object: JobCategory [Database Maintenance] Script Date: 1/7/2018 11:...
DROP TABLE IF EXISTS chat_messages CASCADE; CREATE TABLE chat_messages ( id SERIAL PRIMARY KEY NOT NULL, user_id INTEGER REFERENCES users(id) ON DELETE CASCADE, group_id INTEGER REFERENCES groups(id) ON DELETE CASCADE, text TEXT, created_at DATE NOT NULL );
<filename>db/schema.sql DROP DATABASE IF EXISTS patient_records_db; CREATE DATABASE patient_records_db;
<gh_stars>1-10 UPDATE `creature_template` SET `ScriptName` = 'boss_gyth' WHERE `entry` = 10339; UPDATE `creature_template` SET `ScriptName` = 'boss_rend_blackhand' WHERE `entry` = 10429; UPDATE `creature_template` SET `ScriptName` = 'boss_pyroguard_emberseer' WHERE `entry` = 9816; UPDATE `creature_template` SET `Script...
<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.8.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 18-Abr-2020 às 04:08 -- Versão do servidor: 10.1.33-MariaDB -- PHP Version: 7.2.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*...
<filename>cqrs/SeparateModels/DbScripts/create_db.sql -- cd DbScripts -- "PostgreSQL\9.6\bin\psql.exe" --host "localhost" --port 5432 --username "postgres" --file "create_db.sql" CREATE USER lab_user WITH ENCRYPTED PASSWORD '<PASSWORD>'; CREATE DATABASE lab_policy; GRANT ALL PRIVILEGES ON DATABASE lab_policy TO lab_...
--Video 66 Triggers[Insert] --Estructura -- create triggre Nombretrigger -- on Tabla -- for delete --as -- sentencias select * from TablaAlmacen select * from TablaVentas join TablaAlmacen on TablaVentas.id_producto = TablaAlmacen.id_producto --Creacion trigger-- create trigger EliminarVenta --A...
/* * Inserts the new tables fileresources and fileresourcetypes for keeping track of flat file resources available through the web interface. */ SET FOREIGN_KEY_CHECKS=0; CREATE TABLE `fileresourcetypes` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'The primary id.', `name` varchar(255) NOT NULL COMMENT 'The...
<filename>migrations/20210514165550_view_nft_tokens.down.sql DROP TABLE IF EXISTS view_nft_tokens;
<reponame>anas11cs/BullsStockExchange create database stockexchange -- 1ST EXECUTION BELOW -- use stockexchange -- NECCESARY TO EXECUTE -- -- DANGER ! -- drop database stockexchange -- DANGER ! -- ---------------------- -- SHARED DATABASES -- --> PSX --> BANK --> BROKERS ---------------------- --------------------...
ALTER TABLE `users` ADD `erp_user_role_id` INT NULL DEFAULT NULL AFTER `role_id`; INSERT INTO `erp_users_role` (`erp_user_role_id`, `user_role`, `permission`, `created`, `updated`, `is_deleted`) VALUES (NULL, 'admin', NULL, '2019-01-12 00:00:00', '2019-01-12 00:00:00', '0');
<reponame>thirunjuguna/ttu<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: May 09, 2017 at 01:02 PM -- Server version: 5.7.18-0ubuntu0.16.04.1 -- PHP Version: 7.0.15-0ubuntu0.16.04.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET ...
• SELECT • CASE • WHEN e.Age BETWEEN 0 AND 10 THEN '[0-10]' • WHEN e.Age BETWEEN 11 AND 20 THEN '[11-20]' • WHEN e.Age BETWEEN 21 AND 30 THEN '[21-30]' • WHEN e.Age BETWEEN 31 AND 40 THEN '[31-40]' • WHEN e.Age BETWEEN 41 AND 50 THEN '[41-50]' • WHEN e.Age BETWEEN 51 AND 60 THEN '[51-60]' • WHEN e.Age > 60 THEN ...
<reponame>KlientutvecklingGrupp2/NackademiskaAuktionsframjandet USE GUNNARSDATABAS; -- ----------------------------------------------------- -- Table `Customer` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `Customer` ( `Id` INT NOT NULL AUTO_INCREMENT, `Name` VARCHAR(45) NOT N...
<filename>prisma/migrations/20220323185343_add_ondelete_order/migration.sql -- DropForeignKey ALTER TABLE `ProductInOrder` DROP FOREIGN KEY `ProductInOrder_orderId_fkey`; -- DropForeignKey ALTER TABLE `ProductInOrder` DROP FOREIGN KEY `ProductInOrder_productId_fkey`; -- AddForeignKey ALTER TABLE `ProductInOrder` ADD ...
<gh_stars>1-10 -- "Copyright (C) <NAME>, 2009-2017." drop TABLE "t_config" ; CREATE TABLE "t_config" ( "id" uuid DEFAULT uuid_generate_v4() not null primary key -- customer_id , "customer_id" uuid not null , "item_name" char varying (80) not null , "value" text , "i_value" int , "updated" ...
CREATE PROCEDURE [dbo].[uspMoveSitesToNewProvider] @oldUKPRN int, @oldUPIN int, @newUKPRN int, @newUPIN int AS BEGIN DECLARE @oldProviderID INT = (SELECT ProviderID FROM dbo.Provider WHERE UPIN = @oldUPIN AND UKPRN = @oldUKPRN); IF @oldProviderID IS NULL BEGIN RAISERROR('Couldn''t find Old UKPRN ...
<reponame>ThiagoBfim/stocks<gh_stars>1-10 ALTER TABLE TB_STOCK ADD COLUMN DT_LAST_UPDATE timestamp DEFAULT now();
-- file:limit.sql ln:142 expect:true select sum(tenthous) as s1, sum(tenthous) + random()*0 as s2 from tenk1 group by thousand order by thousand limit 3
<reponame>xavier506/lifebank DROP TABLE "public"."location";
<reponame>dram/metasfresh -- 2020-08-20T12:24:20.532Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Reference_ID=36, FieldLength=1661992960,Updated=TO_TIMESTAMP('2020-08-20 14:24:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=568302 ; -- 2020-08-20T12:24:22.4...
/* Navicat SQLite Data Transfer Source Server : fakeed Source Server Version : 30714 Source Host : :0 Target Server Type : SQLite Target Server Version : 30714 File Encoding : 65001 Date: 2015-04-11 09:14:07 */ PRAGMA foreign_keys = OFF; -- ---------------------------- -- Table structu...
<reponame>incomparable/Django<filename>dumps/Dump20171230/todolist_django_content_type.sql CREATE DATABASE IF NOT EXISTS `todolist` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `todolist`; -- MySQL dump 10.13 Distrib 5.7.20, for Linux (x86_64) -- -- Host: localhost Database: todolist -- --------------------------...
<gh_stars>0 # # Add a column to record entry status code. The default is 1 # which is a confirmed booking. The status codes are defined # in systemdefaults.inc.php ALTER TABLE %DB_TBL_PREFIX%entry ADD COLUMN status tinyint NOT NULL DEFAULT 1;
-- Verify nz-buildings:buildings_reference/functions/suburb_locality on pg BEGIN; SELECT has_function_privilege('buildings_reference.suburb_locality_intersect_polygon(geometry)', 'execute'); SELECT has_function_privilege('buildings_reference.suburb_locality_delete_removed_areas()', 'execute'); SELECT has_function_p...
DELIMITER // CREATE PROCEDURE `recur_job_orders`(id INT, diff INT, type INT) BEGIN DECLARE _cnt INT; DECLARE _id INT; Declare ea int; SET _cnt = 1; WHILE _cnt <= diff DO IF type = 1 THEN BEGIN INSERT into estimates(`campaign_id`, `status_id`, ...
<filename>db/migrations/2001161839_drop_column_items_items_id.sql -- +migrate Up # 13 rows DELETE `items_items` FROM `items_items` JOIN `items_items` AS `orig` USING(`parent_item_id`, `child_item_id`) WHERE `items_items`.`child_order` > `orig`.`child_order` OR `items_items`.`child_order` = `orig`.`child_order` ...