sql
stringlengths
6
1.05M
CREATE TABLE IF NOT EXISTS public.tb_roles ( guild_id BIGINT NOT NULL, message_id BIGINT NOT NULL, role_id BIGINT NOT NULL, emoji TEXT NOT NULL, PRIMARY KEY (role_id) ); GRANT ALL ON TABLE public.tb_roles TO autbot;
<reponame>jdkoren/sqlite-parser -- e_fkey.test -- -- execsql {PRAGMA foreign_keys = ON} PRAGMA foreign_keys = ON
<reponame>Shuttl-Tech/antlr_psql -- file:foreign_key.sql ln:1028 expect:true insert into pktable2 values(1)
-- file:matview.sql ln:89 expect:true SELECT * FROM mvtest_tvmm
-- file:with.sql ln:800 expect:true WITH t AS ( UPDATE y SET a = a * 100 RETURNING * ) SELECT * FROM t LIMIT 10
<reponame>flexsocialbox/una SET @sName = 'bx_lucid'; -- MENU: dropdown menu INSERT INTO `sys_menu_templates` (`id`, `template`, `title`, `visible`) VALUES (ROUND(RAND()*(9999 - 1000) + 1000), 'menu_dropdown_site.html', '_bx_lucid_menu_template_title_dropdown_site', 1); SET @iTemplId = (SELECT `id` FROM `sys_menu_temp...
<filename>fbwiki/mediawiki/maintenance/sqlite/archives/patch-filearchive-fa_description_id.sql -- -- patch-filearchive-fa_description_id.sql -- -- Split from patch-comment-table.sql to work around SQLite unconditionally running -- patch-add-3d.sql on a fresh install, which wipes out fa_description_id and -- fa_deleted_...
<reponame>jasongi-actu/schemainspect<gh_stars>0 with things1 as ( select oid as objid, pronamespace as namespace, proname as name, pg_get_function_identity_arguments(oid) as identity_arguments, 'f' as kind from pg_proc -- 11_AND_LATER where pg_proc.prokind != 'a' -- 10_AND_EARLIER where pg_...
<reponame>solomonqins/tp5 -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- 主机: 127.0.0.1 -- 生成日期: 2020-06-19 11:43:53 -- 服务器版本: 10.4.6-MariaDB -- PHP 版本: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
CREATE TYPE STATUS AS ENUM ('queue', 'process', 'done', 'error'); CREATE TABLE IF NOT EXISTS job ( uuid VARCHAR(256) NOT NULL, created TIMESTAMP WITH TIME ZONE NOT NULL, input VARCHAR(256) NOT NULL, output VARCHAR(256) NOT NULL, id SERIAL ...
-- -- The Archetype is configured with "hibernate.hbm2ddl.auto" value="create-drop" in "persistence.xml". -- -- This will cause hibernate to populate the database when the application is started by processing the files that -- were configured in the hibernate.hbm2ddl.import_files property. -- -- This file is responsibl...
<reponame>bcgov/EDUC-STUDENT-API<gh_stars>1-10 --Modify EVENT_PAYLOAD Column to BLOB ALTER TABLE STUDENT_EVENT ADD ( EVENT_PAYLOAD_BLOB BLOB ) LOB (EVENT_PAYLOAD_BLOB) STORE AS EVENT_PAYLOAD_BLOB (TABLESPACE API_STUDENT_BLOB_DATA); UPDATE STUDENT_EVENT SET EVENT_PAYLOAD_BLOB = UTL_RAW.CAST_TO_RAW(EV...
DROP FUNCTION IF EXISTS create_simulation_log CASCADE; CREATE OR REPLACE FUNCTION create_simulation_log(table_name varchar, start_time varchar(26), end_time varchar(26)) RETURNS INTEGER LANGUAGE plpgsql AS $function$ BEGIN EXECUTE FORMAT('CREATE TABLE simulation_log_%s PARTITION OF data_info_log FOR VALUES FROM ('...
<filename>posda/posdatools/queries/sql/SeeIfDigestIsAlreadyKnownDistinguished.sql -- Name: SeeIfDigestIsAlreadyKnownDistinguished -- Schema: posda_files -- Columns: ['count'] -- Args: ['pixel_digest'] -- Tags: ['meta', 'test', 'hello'] -- Description: Find Duplicated Pixel Digest select count(*) from distinguished_pix...
<filename>migrations/sql/V2019.03.06.4.22__alter_etl_permit.sql<gh_stars>10-100 -- Permit expiry_date was renamed to authorization_end_date in the ETL script, but the peristant ETL_PERMIT table was not altered if it already existed. DO $$ BEGIN IF EXISTS ( SELECT 1 ...
<gh_stars>1-10 select owner as schema_name, view_name, text as script from sys.all_views where owner = ? and view_name = ? order by owner, view_name
<filename>gpdb/contrib/postgis/raster/scripts/plpgsql/st_deleteband.sql ---------------------------------------------------------------------- -- -- $Id: st_deleteband.sql 9324 2012-02-27 22:08:12Z pramsey $ -- -- Copyright (c) 2009-2010 <NAME> <<EMAIL>> -- --------------------------------------------------------------...
--- --- Posts --- DROP TABLE IF EXISTS jforum_posts_text; CREATE TABLE jforum_posts_text ( post_id MEDIUMINT(8) NOT NULL PRIMARY KEY, post_text TEXT, post_subject VARCHAR(100) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO jforum_posts_text (post_id, post_text, post_subject) SELECT post_id, post_text, post_subje...
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 25-03-2013 a las 05:05:26 -- 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_SET_CLIENT=@@CHARACT...
set global transaction isolation level read committed; begin; CREATE TABLE images ( uid INT not null AUTO_INCREMENT, imagename VARCHAR(100), uploadname VARCHAR(100), comments VARCHAR(100), uploadtime DATETIME, uploaduser VARCHAR(100), published_topics VARCHAR(100), subscribed_topics VARCHAR(100), adve...
-- [er] create vclass using Constraints null,Unique and SHARED create vclass t1 ( c1 int Unique SHARED 9 null ); drop t1;
<reponame>menezesfelipee/nestjs-twitter -- CreateTable CREATE TABLE `User` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `updatedAt` DATETIME(3) NOT NULL, `username` VARCHAR(191) NOT NULL, `email` VARCHAR(191) NOT NULL, `img` VARCHAR(191),...
<reponame>tuckerc/cityExplorer<filename>db/moviesSchema.sql DROP TABLE IF EXISTS movieResponses; CREATE TABLE movieResponses ( search_query TEXT PRIMARY KEY, formatted_address VARCHAR(255), latitude VARCHAR(255), longitude VARCHAR(255) ); -- this.title = movie.title; -- this.overview = movie.overview; -- ...
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Nov 21, 2018 at 06:23 AM -- Server version: 5.7.19 -- PHP Version: 7.1.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
------------------------------------------------------------------------ -- Author: <NAME> (SolidQ) -- Credits: - -- Copyright: Attribution-NonCommercial-ShareAlike 2.5 -- Version: SQL Server 2008 RTM -- Tab/indent size: 4 ------------------------------------------------------------------------ USE [TPC-H_2_14_3...
<gh_stars>1-10 USE [ANTERO] GO /****** Object: Table [sa].[sa_eter_staff] Script Date: 27.4.2022 10:49:27 ******/ DROP TABLE [sa].[sa_eter_staff] GO /****** Object: Table [sa].[sa_eter_staff] Script Date: 27.4.2022 10:49:27 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [sa].[sa_eter_...
CREATE PROCEDURE dbo.EventCalendarLocation_Del ( @LocationId int ) AS SET NOCOUNT ON IF(@LocationId > 0) DELETE FROM EventCalendarLocations WHERE LocationId = @LocationId; RETURN
INSERT INTO burgers (burger_name, devoured) VALUES ('Big Piggie Burger', false), ('Korean Veggie Burger', false), ('Mamma Mia Pepperoni Burger', false), ('Arriiiiiba Hot Burger', false), ('U-la-la French Burger', false);
USE [possite] /*USE [C:\C#PROJECTS\ECLIPSEPOS.WPF.SYSTEMMANAGER\ECLIPSEPOS.WPF.SYSTEMMANAGER\BIN\DEBUG\RDMS\POSSITE.MDF] GO */ /* USE [C:\C#PROJECTS\ECLIPSEPOS.WPF.POSWORKBENCH\DATA\POSSITE.MDF] */ GO /****** Object: Table [dbo].[RetailStore] Script Date: 02/18/2009 11:24:53 ******/ SET ANSI_NULLS ON GO SET QUO...
-- -------------------------------------------------------- -- Hôte: 127.0.0.1 -- Version du serveur: 5.7.33 - MySQL Community Server (GPL) -- SE du serveur: Win64 -- HeidiSQL Version: 11.2.0.6213 -- -------------------------------------------------------- /...
<filename>src/test/resources/sql/drop_foreign_data/82eed315.sql -- file:object_address.sql ln:206 expect:true DROP FOREIGN DATA WRAPPER addr_fdw CASCADE
<reponame>leandromet/Geoprocessamento---Geoprocessing create table sfb_result.filtro_mt_1pp_r3 as SELECT qua.idt_imovel, qua.ind_tipo_origem, qua.ind_status_imovel, qua.ind_tipo_imovel, qua.num_area_imovel, qua.num_area_reserva_legal_excedente_passivo, qua.num_area_sobreposicao_ir, qua.num_area_...
DROP TABLE IF EXISTS public.projects;
<reponame>lordexilon/testerp -- ============================================================================ -- Copyright (C) 2003 <NAME> <<EMAIL>> -- Copyright (C) 2009-2011 <NAME> <<EMAIL>> -- Copyright (C) 2009-2013 <NAME> <<EMAIL>> -- Copyright (C) 2012 <NAME> <<EMAIL>> -- -- This program is free software; y...
<gh_stars>0 -- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License");...
<reponame>DaniGartzia/pl_sql<gh_stars>0 SET SERVEROUTPUT ON; /*NO NECESITO DECLARE PORQUE ES UNA CONSTANTE LA VARIABLE*/ BEGIN DBMS_OUTPUT.PUT_LINE('Hola Mundo'); END; /*si queremos decir otra frase aparte*/ /*A LA VARIABLE HAY QUE DECIRLE QUE TIPO DE DATOS ES*/ /*hay que generar el espacio en blanco al final de h...
<filename>modules/admin/conf/sql/create-db-item.sql drop table if exists item_category cascade; create table if not exists item_category( id serial primary key not null, category varchar unique, sort_order varchar ); drop table if exists item; create table if not exists item( id ...
{{ config( materialized='table' ) }} SELECT o.order_id, o.user_id, u.email, u.first_name, u.state, u.zipcode, u.country, o.status, o.tracking_id, o.shipping_service, o.order_cost FROM {{ ref('stg_orders') }} o LEFT JOIN {{ ref('dim_users') }} u ON o.user_id = u.user_id
<reponame>NewGraphEnvironment/bcfishpass begin; DROP TABLE IF EXISTS bcfishpass.misc_barriers_definite; CREATE TABLE bcfishpass.misc_barriers_definite ( blue_line_key integer, downstream_route_measure double precision, barrier_name text, watershed_group_code text, reviewer text, notes text, ...
ALTER TABLE DISK_SPACE ADD COLUMN RULE_ID BIGINT; ALTER TABLE DISK_SPACE ADD CONSTRAINT FK_DISK_SPACE_RULE FOREIGN KEY(RULE_ID) REFERENCES DISK_RULE(ID); COMMENT ON COLUMN DISK_SPACE.RULE_ID IS '权限规则';
-- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License"); you may not...
<reponame>zhoupan/cuba<filename>modules/core/db/update/postgres/17/170502-createSessionHistoryTable.sql create table SEC_SESSION_LOG ( ID uuid, VERSION integer not null, CREATE_TS timestamp, CREATED_BY varchar(50), UPDATE_TS timestamp, UPDATED_BY varchar(50), DELETE_TS timestamp, DELETED...
<filename>tests/expected/creator/issue33l.sql<gh_stars>100-1000 CREATE TABLE hohoho (a integer not null) REPLACE AS SELECT DISTINCT * FROM abcd WHERE x < 5
<gh_stars>0 -- @testpoint: insert语句绑定数值类型 --创建测试表 drop table if exists all_datatype_tbl; create table all_datatype_tbl( c_id integer, c_boolean boolean, c_integer integer, c_bigint bigint, c_real real, c_decimal decimal(38), c_number number(38), c_char char(50) default null, c_varchar varchar(50), c_clob clob, ...
<gh_stars>100-1000 --验证postgis的analyze信息能否使用成功 set current_schema=postgis; SELECT count(1) from geom_polygon as p1 join geom_line as p2 ON ST_INTERSECTS(p1.the_geom, p2.the_geom) where p1.id<1000; /* ############################################################################### # TESTCASE NAME : postgis_accessors.sql...
<filename>Datacamp Assignments/Data Engineer Track/9. Introduction to Relational Databases in SQL/24_drop_columns.sql -- Drop the firstname column ALTER TABLE affiliations DROP COLUMN firstname; -- Drop the lastname column ALTER TABLE affiliations DROP COLUMN lastname;
<reponame>XFegan/employee-tracker<filename>db/schema.sql DROP DATABASE IF EXISTS employee_tracker; CREATE DATABASE employee_tracker; -- using the database USE employee_tracker; -- Deleting if the tables already exists DROP TABLE IF EXISTS employee; DROP TABLE IF EXISTS role; DROP TABLE IF EXISTS department; -- Creati...
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jul 30, 2018 at 05:13 PM -- Server version: 5.7.22-0ubuntu0.16.04.1 -- PHP Version: 7.0.30-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_C...
<filename>prisma/migrations/20211129121239_schedual_module/migration.sql -- CreateTable CREATE TABLE "Schedule" ( "id" SERIAL NOT NULL, "to" TEXT[], "message" TEXT, "sendDate" TIMESTAMP(3) NOT NULL, "userId" INTEGER NOT NULL, "password" TEXT NOT NULL, "createdAt" TIMESTAMP(3) NOT NULL DEFAUL...
/* DELETE vs. TRUNCATE (Page 364). This practice helps you realize the significant performance difference between the DELETE and TRUNCATE statements. Use your knowledge of cross joins, the SELECT INTO statement, and the DELETE and TRUNCATE statements to observe the performance difference between fully logged vers...
CREATE TABLE IF NOT EXISTS `product` ( `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` varchar(100), `description` varchar(100), `price` decimal(5,2), `weight` double, `category` int REFERENCES product_category(id), `supplier` int REFERENCES supplier(id), `image_url` varchar(100) ...
<reponame>inijamlud/SPK-PUSKESMAS<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 1192.168.127.12 -- Generation Time: Jul 29, 2021 at 03:58 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.2.34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone...
spool afwins2_modl.log; @@tab.sql; @@seq.sql; @@view.sql; @@util.sql; @@pkg.sql; @@trg.sql; @@index.sql; @@cons_pk.sql; @@cons_uk.sql; @@cons_ck.sql; @@cons_fk.sql; prompt prompt ...Compilation de AFW_040215... prompt exec DBMS_UTILITY.compile_schema(schema => 'AFW_040215'); --Contient le minimum pour faire fonctio...
-- Requires SQL2016+ due to DROP IF EXISTS USE tempdb; GO DROP TABLE IF EXISTS LeftTable; CREATE TABLE LeftTable ( ColOne INT ) DROP TABLE IF EXISTS RightTable; CREATE TABLE RightTable ( ColOne CHAR(1) ) INSERT LeftTable VALUES (1), (2), (3); INSERT RightTable VALUES ('A'), ('B'), ('C'); SELECT lt.ColOne A...
<filename>db/src/api/comments.sql<gh_stars>1-10 create or replace view comments as select id, body, todo_id, user_id from data.comment;
select p2.id, p2.p_firstname, p2.p_lastname, o.o_name, pc.pc_workfrom from p1k1 JOIN (knows k2 JOIN ( person p2 JOIN ( person_company pc JOIN (organisation o JOIN place pl ON o.o_placeid = pl.pl_placeid) ON pc.pc_organisationid = o.o_organisationid) ON p2.p_personid = pc.pc_personid...
SET @sName = 'bx_payment'; -- TABLES CREATE TABLE IF NOT EXISTS `bx_payment_subscriptions` ( `id` int(11) NOT NULL auto_increment, `pending_id` int(11) NOT NULL default '0', `customer_id` varchar(32) NOT NULL default '', `subscription_id` varchar(32) NOT NULL default '', `paid` tinyint(4) NOT NULL default '...
<filename>sql/min_percentiles.sql /* Calculate the fewest citations in a threshold percentile; we'll include all publications with that many or more, even if because of arbitrary-tie-breaking they fall below the threshold percentile. */ with keywords as ( select year, keyword_percentile percentile, ...
CREATE TABLE books ( id bigint PRIMARY KEY identity, author varchar(255), launch_date datetime NOT NULL, price decimal(30,2) NOT NULL, title varchar(255) );
<reponame>jsdelivrbot/study-1 -- df place_enum: word=./data/ddl_to_data_place_enum01.txt CREATE TABLE enum_value ( enum_value_id INT PRIMARY KEY -- df: text=place_enum length=1 ) ; CREATE TABLE place ( --df: mult=2.0 place_id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY , place_enum INT REFERENCES enum...
<gh_stars>1-10 /****** Object: View [dbo].[V_Requested_Run_Unified_List_Ex] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE VIEW [dbo].[V_Requested_Run_Unified_List_Ex] as SELECT T_Requested_Run.ID AS Request , T_Requested_Run.RDS_Name AS Name , T_Requested_Run.RDS_Status AS...
<filename>scripts/rename/queries-for-db-migration.sql -- these queries generate DDL ALTER statements for bulk renaming. SELECT 'ALTER TABLE ' || table_name || ' RENAME COLUMN ' || column_name || ' TO ' || '' || column_name || ' ;' FROM information_schema.columns WHERE table_schema = 'public'; SELECT 'ALTER TABLE ' || ...
<reponame>Axlgrep/postgres -- -- Install the plperl and plperlu extensions -- -- Before going ahead with the to-be-tested installations, verify that -- a non-superuser is allowed to install plperl (but not plperlu) when -- suitable permissions have been granted. CREATE USER regress_user1; CREATE USER regress_user2; ...
<gh_stars>0 -- -- 由SQLiteStudio v3.1.1 产生的文件 周六 4月 28 15:41:48 2018 -- -- 文本编码:UTF-8 -- PRAGMA foreign_keys = off; BEGIN TRANSACTION; -- 表:balance_sheet_info_table CREATE TABLE balance_sheet_info_table ( company_code VARCHAR (100), period VARCHAR (100), public_date ...
SELECT CMPGNLINE.* FROM LG_$FIRM$_CMPGNLINE CMPGNLINE $WHERE$ $ORDER$
/* Enter custom T-SQL here that would run after SQL Server has started up. */ /** create database **/ USE master GO IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'HandSanitiserLevels') BEGIN CREATE DATABASE HandSanitiserLevels; END; GO /** create sensor readings table **/ USE [HandSanitiserLevels] GO SE...
CREATE TABLE gc_cur_team_stats_kicking ( _id INTEGER PRIMARY KEY , player_id TEXT , name TEXT , totpfg INTEGER , fga INTEGER , fgm INTEGER , fgyds INTEGER , xptot INTEGER , xpa INTEGER , xpmade INTEGER , xpmissed INTEGER , xpb INTEGER , _gc_cur_team_id INTEGER , FOREIGN KEY (_gc_cur_team_i...
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Generation Time: Jan 27, 2019 at 10:12 PM -- Server version: 5.7.21 -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `kkcl` -- -- -------------------------------...
CREATE TABLE `connectors` ( `id` int(11) NOT NULL AUTO_INCREMENT, `uid` int(11) DEFAULT NULL, `service` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `prio` int(11) DEFAULT NULL, `uri` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, ...
DROP TABLE IF EXISTS users_permissions; DROP TABLE IF EXISTS permissions;
<gh_stars>1-10 CREATE TABLE `t_sentinel_metric` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id,主键', `gmt_create` datetime DEFAULT NULL COMMENT '创建时间', `gmt_modified` datetime DEFAULT NULL COMMENT '修改时间', `app` varchar(100) DEFAULT NULL COMMENT '应用名称', `timestamp` datetime DEFAULT NULL COMME...
<filename>transform/snowflake-dbt/models/sources/google_analytics_360/ga360_session_hit_source.sql WITH source AS ( SELECT * FROM {{ source('google_analytics_360', 'session_hit') }} ), renamed AS( SELECT --Keys visit_id::FLOAT AS visit_id, visitor_id::VARCHAR ...
<filename>src/test/resources/sql/select/46d3e5f2.sql<gh_stars>10-100 -- file:timestamptz.sql ln:416 expect:true SELECT '2014-10-25 21:59:59 UTC'::timestamptz
-- file:updatable_views.sql ln:1121 expect:true alter table pt11 add a int
<filename>src/main/webapp/resources/sql/ItemSearch.sql select * from itemforitem order by id desc limit 10;
<filename>backend/de.metas.fresh/de.metas.fresh.base/src/main/sql/postgresql/system/70-de.metas.fresh/5437960_sys_09710_Salesgroups_ReportProcess.sql -- 28.01.2016 14:43 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Process_ID,Classname,C...
<filename>migrations/2019-11-21-194400_add_temple/down.sql ALTER TABLE villages DROP COLUMN faith; DELETE FROM pg_enum WHERE pg_enum.enumtypid = 'unit_color'::regtype::oid AND pg_enum.enumlabel = 'prophet'; DELETE FROM pg_enum WHERE pg_enum.enumtypid = 'building_type'::regtype::oid AND pg_enum.enumlabel...
<gh_stars>10-100 -- [Q] [A/H] The Skettis Offensive -- Defender Grashna SAI SET @ENTRY := 22373; SET @QUEST := 10879; UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0,`SpecialFlags`=2 WHERE `entry`=@QUEST; DELETE FROM `quest_start_scr...
DELETE FROM `sys_objects_exports` WHERE `object` = 'bx_wall'; SET @iMaxOrderExports = (SELECT MAX(`order`)+1 FROM `sys_objects_exports`); INSERT INTO `sys_objects_exports` (`object`, `title`, `class_name`, `class_file`, `order`, `active`) VALUES ('bx_wall', '_wall', 'BxWallExport', 'modules/boonex/wall/classes...
DROP DATABASE IF EXISTS notspot_db; CREATE DATABASE notspot_db;
<gh_stars>0 alter table process_definition add column category varchar(255); create sequence process_variable_sequence start with 1 increment by 50; select setval('process_variable_sequence', (select max(id) from process_variable)); create sequence task_variable_sequence start with 1 increment by 50; select set...
CREATE TABLE LocationTable ( LocationID int(11) NOT NULL AUTO_INCREMENT, Latitude float, Longitude float, Score int, LocationTime DATETIME DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (LocationID) ); CREATE TABLE CarTable ( LocationID int NOT NULL, CarID int NOT NULL, ParkBrake VARCHAR(...
<reponame>zenghao0219/seat-select-api<gh_stars>10-100 /* Navicat Premium Data Transfer Source Server : 192.168.3.11 Source Server Type : MySQL Source Server Version : 50722 Source Host : 192.168.3.11:3306 Source Schema : seat_select Target Server Type : MySQL Target Server Vers...
<filename>src/main/resources/sql/postgresql/count_images_for_store.sql<gh_stars>1-10 -- Calculates the numer of images stored for a particular store -- =========================================================================== SELECT Count(*) AS count FROM Store_Images WHERE store_id = ?
<filename>persistence/sql/migrations/20190400000008000000_oauth2.up.sql ALTER TABLE hydra_oauth2_access ADD challenge_id varchar(40) NULL; ALTER TABLE hydra_oauth2_refresh ADD challenge_id varchar(40) NULL; ALTER TABLE hydra_oauth2_code ADD challenge_id varchar(40) NULL; ALTER TABLE hydra_oauth2_oidc ADD challenge_id v...
-- name: create-table-users CREATE TABLE IF NOT EXISTS users (/* Release v10.34 (r/vinylscratch quick fix) */ user_id SERIAL PRIMARY KEY/* fix bem lint failures */ ,user_login VARCHAR(250) ,user_email VARCHAR(500)/* Widget: Release surface if root window is NULL. */ ,user_admin BOOL...
SELECT * FROM `event` WHERE (`updated_at` is null or `updated_at` >= DATE_SUB(CURDATE(), INTERVAL 7 DAY)); update event set website = null where source = 'sdr'; update event set source = 'sdr' where system_note like '%https://www.sandiegoreader.com%'; delete from venue WHERE id > 2; update `venue` set system_note =...
<filename>sql/_24_aprium_qa/_02_sql_extension/issue_9688_ntile/cases/ntile_bbc.sql --TEST: test with bit strings and blob/clob data types and normal syntax create table ntile_bbc( col1 bit(20), col2 bit varying, col3 blob, col4 clob ); insert into ntile_bbc values(B'1011', X'abc', X'0', 'cubrid'); insert into ...
<gh_stars>0 -- @testpoint:opengauss关键字Authid(保留),作为同义词对象名 --前置条件 drop table if exists Authid_test; create table Authid_test(id int,name varchar(10)); --关键字不带引号-失败 drop synonym if exists Authid; create synonym Authid for Authid_test; --关键字带双引号-成功 drop synonym if exists "Authid"; create synonym "Authid" for Authid_...
<reponame>rominavarela/kiteso DELIMITER // DROP PROCEDURE IF EXISTS INSERT_DIASEMANA; // CREATE PROCEDURE INSERT_DIASEMANA(IN Diadesemana VARCHAR(45)) BEGIN INSERT INTO Dia_de_semana (nombre_Dia_de_semana) VALUES (Diadesemana); END // DROP PROCEDURE IF EXISTS GET_DIASEMANA; // CREATE PROCEDURE GET_DIASEMANA(IN ...
/* DROP USER rtrs CASCADE; CREATE USER rtrs IDENTIFIED BY p4ssw0rd DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp QUOTA 10M ON users; GRANT connect to rtrs; GRANT resource to rtrs; GRANT create session TO rtrs; GRANT create table TO rtrs; GRANT create view TO rtrs; conn rtrs/p4ssw0rd */ /*********************...
<reponame>phfp/gym-api<filename>public/dumps/querys.sql<gh_stars>0 -- Listar exercícios de um usuário em determinada cota select exercicio_id, exercicios.descricao, exercicios.imagem from lista_exercicios inner join exercicios on exercicios.id = lista_exercicios.exercicio_id inner join treinos on treinos.id = list...
<filename>checkpoint3/sqlite/triggers/gatilho3_remove.sql<gh_stars>0 DROP TRIGGER IF EXISTS RemoveFromWatchlist;
<filename>oereb_naturreservat/delete_oereb_naturreservat_tables.sql DELETE FROM arp_naturreservate_oereb.transferstruktur_legendeeintrag WHERE t_datasetname = 'ch.so.arp.naturreservat' ; DELETE FROM arp_naturreservate_oereb.localiseduri WHERE t_datasetname = 'ch.so.arp.naturreservat' ; DELETE FROM arp_...
<gh_stars>0 CREATE TABLE tSQLt.TestResult ( Id INT IDENTITY(1,1) CONSTRAINT [PK__tSQLt_TestResult] PRIMARY KEY CLUSTERED, Class NVARCHAR(MAX) NOT NULL, TestCase NVARCHAR(MAX) NOT NULL, Name AS (QUOTENAME(Class) + '.' + QUOTENAME(TestCase)), TranName NVARCHAR(MAX) NULL, Result NVARCHAR(MAX) NULL,...
<reponame>lembarek/raffle -- MySQL dump 10.13 Distrib 5.6.26, for Linux (x86_64) -- -- Host: localhost Database: raffle -- ------------------------------------------------------ -- Server version 5.6.26 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHAR...
<reponame>jolugarbe/backend-rest<filename>database/seeds/files/countries.sql INSERT INTO countries (nationality,name) VALUES ("Venezolana","Venezuela"), ("Afgana","Afganistán"), ("Albanesa","Albania"), ("Alemana","Alemania"), ("Alto volteña","Alto volta"), ("Andorrana","Andorra"), ("Angoleña","Angola"), ("Argelina","A...
-- ------------------------------------------------------ -- PKG CATEGORIES' CODES LOWER CASE -- ------------------------------------------------------ UPDATE haikudepot.pkg_category SET code=LOWER(code);
UPDATE Members SET ( fails ) = ( fails+1 ) WHERE member_id=$1::INTEGER RETURNING *;
<gh_stars>1-10 CREATE PROCEDURE spiHorario @Horario_Id INT OUTPUT, @Horario_De TIME(0), @Horario_Ate TIME(0), @DiaSemana_Id INT AS BEGIN SELECT (SELECT ISNULL(MAX(Horario_Id), 0) + 1 FROM Horario) AS Horario_Id, @Horario_De AS Horario_De, @Horario_Ate...