sql
stringlengths
6
1.05M
-- // DISTX-516 OptimizePeriscopeDBColumns -- Migration SQL that makes the change goes here. -- Legacy periscope cluster data might have duplicate clusterpertains and uninitialized fields delete from failed_node; delete from history_properties; delete from history; delete from prometheusalert; delete from loadalert; d...
drop TABLE `tbl_book`; CREATE TABLE `tbl_book` ( `id` Integer NOT NULL AUTO_INCREMENT, `type` varchar(20) DEFAULT NULL, `name` varchar(50) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=UTF8MB4; select * from tbl_book; insert into ...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Feb 18, 2016 at 12:33 PM -- Server version: 10.1.9-MariaDB -- PHP Version: 5.5.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
-- phpMyAdmin SQL Dump -- version 4.6.6 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Czas generowania: 29 Cze 2017, 11:48 -- Wersja serwera: 10.1.21-MariaDB -- Wersja PHP: 7.0.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 /* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50547 Source Host : localhost:3306 Source Schema : ci_module Target Server Type : MySQL Target Server Version : 50547 File Encoding : 65...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 13-06-2019 a las 06:18:06 -- Versión del servidor: 10.1.38-MariaDB -- Versión de PHP: 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone ...
<reponame>ministryofjustice/opg-ansible-roles GRANT SELECT ON `{{ rds_instance_data.db_name }}`.* TO '{{ user_data.username }}'@'*' IDENTIFIED BY '{{ user_data.password }}'; FLUSH PRIVILEGES;
CREATE TABLE IF NOT EXISTS article_favorites ( user_id UUID NOT NULL, article_id UUID NOT NULL, PRIMARY KEY(user_id, article_id), CONSTRAINT fk_article_favorites_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE, CONSTRAINT fk_article_favorites_article FO...
-- AlterTable ALTER TABLE "watcheds" ADD COLUMN "createdAt" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP, ADD COLUMN "updateAt" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP;
alter table claimant RENAME COLUMN household_identifier TO dwp_household_identifier; alter table claimant ADD COLUMN hmrc_household_identifier varchar(50);
<reponame>xoxefdp/farmacia<filename>farmaciaDBdata.sql -- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Oct 13, 2015 at 05:41 PM -- Server version: 5.5.44-0ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET ti...
<reponame>jdkoren/sqlite-parser -- tkt2822.test -- -- execsql { -- SELECT a, b, c FROM t1 UNION ALL SELECT a AS x, b, c FROM t2 ORDER BY x; -- } SELECT a, b, c FROM t1 UNION ALL SELECT a AS x, b, c FROM t2 ORDER BY x;
<reponame>scheltwort-it-services/common_schema call hexcode_text('A quick brown fox jumps over the lazy dog, long enough');
------ Add new service item param keys ------ INSERT INTO service_item_param_keys (id, key,description,type,origin,created_at,updated_at) VALUES ('9df726f8-5ae7-4749-8446-28815ff16271', 'DimensionLength', 'Dimension length describing the length of a service item', 'INTEGER', 'PRIME', now(), now()), ('79bdb87e-776b-43fe...
<reponame>matt98h/Note-taker-application CREATE DATABASE notes_db; USE DATABASE notes_db; CREATE TABLE notes( id INTEGER AUTO_INCREMENT; note_title VARCHAR(30); note VARCHAR(120) );
CREATE SCHEMA [Person] AUTHORIZATION [dbo]; GO CREATE TABLE [Person].[InternalUser] ( [Id] UNIQUEIDENTIFIER NOT NULL CONSTRAINT PK_InternalUser PRIMARY KEY, [UserId] NVARCHAR(128) NOT NULL CONSTRAINT FK_InternalUser_AspNetUsers FOREIGN KEY REFERENCES [Identity].[AspNetUsers](Id), [RowVersion] ...
<reponame>mojaloop/dfsp-account CREATE OR REPLACE FUNCTION account."actorAccount.remove"( "@actorAccountId" bigint ) RETURNS TABLE( "accountId" bigint, "isSingleResult" boolean ) AS $body$ DECLARE "@accountId" bigint; BEGIN WITH a as ( DELETE FROM account."actorAccount" WHERE ...
ALTER TABLE "subscription" ADD COLUMN "asynctempproductkey" BIGINT DEFAULT NULL; ALTER TABLE "subscriptionhistory" ADD COLUMN "asynctempproductobjkey" BIGINT DEFAULT NULL;
<gh_stars>1-10 -- add startdate column to seasons ALTER TABLE seasons ADD COLUMN startdate TIMESTAMPTZ; -- add startdate data to historical seasons UPDATE seasons SET startdate = '2018-12-11 00:00:00+00' WHERE pk_season_id = 2307; UPDATE seasons SET startdate = '2019-03-12 00:00:00+00' WHERE pk_season_id = 2391; UPDAT...
-- start_ignore SET gp_create_table_random_default_distribution=off; -- end_ignore CREATE INDEX pg2_ao_gist_idx1_b0 ON pg2_ao_table_gist_index_b0 USING GiST (property);
<reponame>lintzc/GPDB<filename>src/test/regress/sql/query_finish_pending.sql drop table if exists _tmp_table; create table _tmp_table (i1 int, i2 int, i3 int, i4 int); insert into _tmp_table select i, i % 100, i % 10000, i % 75 from generate_series(0,99999) i; -- make sort to spill set statement_mem="2MB"; set gp_enab...
lapse/ADGRS lard/DGRS large/PRTY lark/MRS
CREATE OR REPLACE FUNCTION nfc.f4role_unitprivs8add(p_org bigint, p_role_id bigint, p_unit character varying, p_all boolean DEFAULT false) RETURNS bigint LANGUAGE plpgsql SECURITY DEFINER AS $function$ declare v_id bigint; bps record; begin perform nfc.f_bp8before('nfc.role_unitprivs.add', null::text, p_...
<reponame>spirdon/janbot2<filename>res/query/get_all_roles_on_server.sql SELECT * FROM roles WHERE server_id=%s;
/* dbqueries.sql contains the logic of our algorithm. The getwells function takes in four values which form the four boundary points for the region surrounding the origin of the earth quake with a radius of 10 km. With in this region we try to identify if there exists a injection well. If so, then it passes the spatial...
CREATE TABLE public.room ( id bigint NOT NULL GENERATED ALWAYS AS IDENTITY, number varchar(32) NOT NULL, capacity smallint CHECK (capacity > 0), CONSTRAINT room_pk PRIMARY KEY (id) ); CREATE TABLE public.patient ( id bigint NOT NULL GENERATED ALWAYS AS IDENTITY, room_id bigint not null, na...
<reponame>wpenarudas25/discus-api create database if not exists company; use company; create table discos ( id int(11) not null auto_increment, nombre varchar(45) default null, tamaño int(11) default null, diponibles int(11) default null, primary key(id) ); describe discos;
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 31, 2018 at 10:24 PM -- Server version: 5.7.14 -- PHP Version: 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S...
<gh_stars>0 /** * Begin data cleansing and table alterations to pave the the way for the final normalised database. The code blocks below will use UPDATE/ALTER on the existing tables containing relevant data from the IMDb datasets. This is pre processing by data cleansing before beginning the normalisat...
<filename>dubbo-example-provider/sql/tables-master.sql /*Table structure for table `test_user` */ DROP TABLE IF EXISTS `test_user`; CREATE TABLE `test_user` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(32) NOT NULL COMMENT '用户名', `phone` varchar(32) DEFAULT NULL COMMENT '手机号', `title` varchar(32...
-- Drops the database if it exists currently -- DROP DATABASE IF EXISTS portfolioV2; -- Creates the new database -- CREATE DATABASE portfolioV2;
<filename>ss.sql SELECT project AS project_name, slug AS form_template_slug, form_template_name, interval, MIN(begin_date) start_date, MAX(end_date) end_date, SUM(not_done_overdue) not_done_overdue, SUM(pending_now) pending_now, SUM(pending_future) pending_future, SUM(done_early) done_early, ...
<gh_stars>1-10 CREATE TABLE "Patient" ( `ID` INTEGER NOT NULL UNIQUE, `Name` TEXT NOT NULL, `BirthDate` TEXT NOT NULL, `LastUpdated` TEXT NOT NULL, PRIMARY KEY(ID) ) CREATE TABLE "Ailment" ( `ID` INTEGER NOT NULL UNIQUE, `Name` INTEGER NOT NULL, `LastUpdated` INTEGER NOT NULL, PRIMARY KEY(ID) ) CREATE TABLE ...
<filename>5.2.3/Database/Synonyms/APEX_PLUGN_ATRIB.sql<gh_stars>1-10 SET DEFINE OFF; CREATE SYNONYM APEX_PLUGN_ATRIB FOR APEX_050000.WWV_FLOW_PLUGIN_ATTRIBUTES /
<reponame>karlarao/sql_plan_management -- GENERATE DATA -- generate data create table skew as select rownum all_distinct, 10000 skew from dual connect by level <= 10000; update skew set skew=all_distinct where rownum<=10; select skew, count(*) from skew group by skew order by skew; -- setup create index skew_idx o...
<reponame>kilip/siap<gh_stars>1-10 --- Import data from database umat katolik (DUK) --- DELETE from tr_keuskupan; INSERT into tr_keuskupan( id, kode, no_urut, nama, nama_latin, alamat, kota, telepon, fax, website, email, nama_uskup_saat_ini ) (select uuid...
SELECT employees.ename, department.dept FROM employees LEFT JOIN department USING (eid);
USE [DB_DBA] GO -- ============================================= -- Author: <NAME> -- Create date: 11-11-2014 -- Description: the procedure generates the statistics report -- ============================================= CREATE PROCEDURE [Perfmon].[usp_SendReport] @HTMLTable NVARCHAR(MAX) OUTPUT, @DebugMode BIT = ...
<reponame>ashimjk/ajk-research<filename>spring/liquibase/src/main/resources/scripts/v_1.0.1.sql --liquibase formatted sql --changeset ashimjk:1.0.1 create sequence corporate_beneficiary_id_sequence start with 1 increment by 1; create sequence beneficiary_id_sequence start with 1 increment by 1; create sequence contact...
select first_value(finalsaleprice ignore nulls) over () as c1 from table1
-- 2021-09-28T07:02:40.970Z -- URL zum Konzept UPDATE C_DocType SET IsDocNoControlled='Y',Updated=TO_TIMESTAMP('2021-09-28 09:02:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_DocType_ID=1000040 ; -- 2021-09-28T07:05:34.595Z -- URL zum Konzept UPDATE C_DocType SET DocNoSequence_ID=545400,Updated=TO_TIMESTAMP('2021...
<filename>bin/apache-hive-3.1.2-bin/scripts/metastore/upgrade/postgres/043-HIVE-16997.postgres.sql version https://git-lfs.github.com/spec/v1 oid sha256:66c2abe76ecb6c4003d304405f19d1a65b8373de4372f3a934b110f645e2149f size 119
--Changeset dbhat:Alter metricprovider table to add Dynatrace Connection Properties column ALTER TABLE metricprovider add dynatraceConnectionProperties frozen<dynatraceConnectionProperties>;
# Count SNPs by base pair transition across the dataset SELECT reference_bases, alternate_bases AS allele, COUNT(alternate_bases) AS num_snps FROM [google.com:biggene:1000genomes.variants1kG] WHERE vt ='SNP' GROUP BY reference_bases, allele ORDER BY reference_bases, allele;
-- Note that the commented SQL statements are not to be executed. They are -- provided for reference only as it is not possible to simply change a -- uniqueidentifier column to bigint. Refer to the link below for the an -- approach to do so. --alter table ENVIRONMENT drop constraint FK???; --alter table ENVIRONMENT al...
<reponame>Engbits/replicant ALTER TABLE candidates DROP COLUMN tagged_job_id;
\set ECHO none \set QUIET 1 /* * We intentionally test "char" as well, because it's typlen is 1 and it's * easier to include it here than to test boolean (the other typlen 1 type). */ \set baseline_type text -- Space separated string \set test_types '"char" character character(10) varchar varchar(10) text' -- Use...
<filename>module/Users/sql/users.sql -- -- User Module Setup -- CREATE TABLE IF NOT EXISTS user ( id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, name TEXT NOT NULL, email VARCHAR(255) NOT NULL, password TEXT NOT NULL, PRIMARY KEY (id), UNIQUE INDEX idx_email(email) ); CREATE TABLE IF NOT EXISTS uploads ( ...
<reponame>Zhaojia2019/cubrid-testcases --+ holdcas on; set names binary; SELECT BIT_LENGTH('字符串1'); SELECT BIT_LENGTH(cast( _utf8'문자열' as string charset euckr)); SELECT BIT_LENGTH(_utf8'字符串1'); SELECT BIT_LENGTH(cast(_utf8'À' as string charset iso88591)); SELECT BIT_LENGTH(chr(0)); set names iso88591; commit; --+ holdc...
<filename>src/test/regress/sql/tpch04.sql -- $ID$ -- TPC-H/TPC-R Order Priority Checking Query (Q4) -- Functional Query Definition -- Approved February 1998 select o_orderpriority, count(*) as order_count from orders where o_orderdate >= '1993-07-01'::date and o_orderdate < '1993-07-01'::date + interval '3 month' ...
/* * Structure */ CREATE TABLE `geo` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `created_by` varchar(255) NOT NULL, `created_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `last_modified_by` varchar(255) NOT NULL, `last_modified_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `lat` varchar(255) DEF...
<filename>src/main/resources/db/migration/V4__svarfrist.sql ALTER TABLE foresporsel_om_deling_av_cv ADD COLUMN svarfrist DATE NOT NULL;
<reponame>JaciBrunning/frc_2017_statistics<filename>models/insert/districts/team.sql INSERT INTO district_teams(team, district) VALUES( ?, (SELECT id FROM districts WHERE key == ?) );
<gh_stars>0 CREATE DATABASE reciclApp; USE reciclApp; CREATE TABLE users ( id INT(11) PRIMARY KEY NOT NULL AUTO_INCREMENT, fullName VARCHAR (50) NOT NULL, typeDocument VARCHAR (20) NOT NULL, numberDocument VARCHAR (20) NOT NULL, mobilePhone INT (20) NOT NULL, email VARCHAR ...
<reponame>rvjha/simple-login-registration-form-with-google-reCaptcha-v2 -- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 04, 2020 at 01:29 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMM...
<gh_stars>0 DROP TABLE IF EXISTS `category_group`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `category_group` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `created_by` varchar(250) DEFAULT NULL, `created_date` datetime DEFAULT NULL, `d...
<gh_stars>0 DELETE FROM instance_member; DELETE FROM dungeon; ALTER TABLE instance_member ADD UNIQUE (username); ALTER TABLE dungeon ADD UNIQUE (owner_username);
<reponame>AhmadDawood/UDW_BI EXECUTE spFindStudentBioData_ByLocality_R6 'Lahore',DEFAULT, DEFAULT
<reponame>krishnaveduri/newexchangeserver<filename>sql/create_trade_history.sql CREATE TABLE `balance_history_example` ( `id` BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, `time` DOUBLE NOT NULL, `user_id` INT UNSIGNED NOT NULL, `asset` VARCHAR(30) NOT NULL, ...
SELECT COALESCE("This", "That", "another"), COALESCE(NULL, "That", "another"), COALESCE(NULL, NULL, "another"), COALESCE("This", NULL, "another");
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Czas generowania: 07 Gru 2021, 09:47 -- Wersja serwera: 10.4.14-MariaDB -- Wersja PHP: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
<filename>CMP/CmpWap/CmpWapExtension/CmpWapDb/dbo/Tables/VmOsMap.sql<gh_stars>10-100 CREATE TABLE [dbo].[VmOsMap] ( [Id] INT NOT NULL, [DisplayName] VARCHAR (MAX) NULL, [AzureImageName] VARCHAR (MAX) NULL, [TagData] VARCHAR (MAX) NULL, [IsActive] BIT ...
<reponame>NakamaNetwork/nakama.legacy CREATE TABLE [dbo].[Ships] ( [Id] INT NOT NULL, [Name] NVARCHAR(128) NULL, [Description] NVARCHAR(1000) NULL, [EventShip] BIT NOT NULL CONSTRAINT [DF_dbo.Ships_EventShip] DEFAULT 0, CONSTRAINT [PK_dbo.Ships] PRIMARY KEY CLUSTERED ([Id] ASC) ) GO
-- ============================================= -- Author: <NAME> -- Create date: 23 July 2008 -- Description: Remove the time from date so that -- date comparisons don't return unexpected -- results -- ============================================= CREATE FUNCTION [dbo].[fnx_RemoveTime] ( @date DATETIME ) RET...
<gh_stars>1-10 -- Verify procedures/verify_table on pg BEGIN; SELECT verify_function ('public.verify_table'); ROLLBACK;
<gh_stars>10-100 -- Project SELECT dropIfExists('VIEW', 'project', 'api'); CREATE VIEW api.project AS SELECT prj_number AS number, prj_name AS name, prj_descrip AS description, prj_owner_username AS owner, prj_username AS assigned_to, prj_so AS sales_orders, prj_wo AS work_orders,...
/* EmojiWizard is a project licensed under GNU Affero General Public License. Copyright (C) 2022-present Achxy This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License,...
<gh_stars>10-100 /* 33.22 */ SELECT name FROM `diablo`.`characters` ORDER BY name;
-- file:alter_table.sql ln:2390 expect:true drop table temp_part_parent cascade
<gh_stars>1000+ -- 2020-01-07T07:40:37.691Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsSelectionColumn='Y',Updated=TO_TIMESTAMP('2020-01-07 09:40:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=8804 ;
<gh_stars>1000+ -- 2021-05-19T20:17:14.389Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,ColumnSQL,Created,CreatedBy,DDL_NoForeignKey,DefaultValue,EntityType,FacetFilterSeqNo,FieldLength,...
DELETE FROM `qb_config` WHERE `c_key`='must_yz_phone'; INSERT INTO `qb_config` (`id`, `type`, `title`, `c_key`, `c_value`, `form_type`, `options`, `ifsys`, `htmlcode`, `c_descrip`, `list`, `sys_id`) VALUES(0, 8, '是否强制绑定手机号', 'must_yz_phone', '0', 'radio', '0|不强制\r\n1|强制绑定', 1, '', '', 0, 0);
<reponame>iuri/tutortronics<filename>packages-old/acs-kernel/sql/oracle/upgrade/upgrade-5.3.2d1-5.3.2d2.sql -- -- packages/acs-kernel/sql/oracle/upgrade/upgrade-5.3.2d1-5.3.2d2.sql -- -- @author <NAME> (<EMAIL>) -- @creation-date 2007-05-24 -- @cvs-id $Id: upgrade-5.3.2d1-5.3.2d2.sql,v 1.3 2015/12/04 13:49:25 cvs Exp...
# Host: localhost (Version: 5.5.53-log) # Date: 2018-12-19 17:55:44 # Generator: MySQL-Front 5.3 (Build 4.234) /*!40101 SET NAMES utf8 */; # # Structure for table "login" # DROP TABLE IF EXISTS `login`; CREATE TABLE `login` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(16) DEFAULT NULL, `passwo...
<reponame>GreenArrow2017/FilmMeeting<gh_stars>1-10 -- ---------------------------- -- Table structure for order_t -- ---------------------------- DROP TABLE IF EXISTS `order_t`; CREATE TABLE order_t( UUID VARCHAR(100) COMMENT '主键编号', cinema_id INT COMMENT '影院编号', field_id INT COMMENT '放映场次编号', film_id INT COMME...
CREATE UNIQUE INDEX "PK_CORRESPONDENCE" ON "CORRESPONDENCE" ("CORRESPONDENCE_ID")
-- AUTO-GENERATED BY igluctl DO NOT EDIT -- Generator: igluctl 0.4.1 -- Generated: 2018-10-11 00:45 UTC CREATE SCHEMA IF NOT EXISTS atomic; CREATE TABLE IF NOT EXISTS atomic.com_hubspot_deal_change_1 ( "schema_vendor" VARCHAR(128) ENCODE ZSTD NOT NULL, "schema_name" VARCHAR(128) ENCODE ZSTD NOT NULL, ...
<gh_stars>0 -- @author prabhd -- @created 2012-12-05 12:00:00 -- @modified 2012-12-05 12:00:00 -- @tags dml HAWQ -- @db_name dmldb -- @execute_all_plans True -- @description test12: Join on the distribution key of target table. Insert Large number of rows \echo --start_ignore set gp_enable_column_oriented_table=on;...
-- User_Rank ALTER TABLE `User_Rank` ADD COLUMN `state_id` char(3) DEFAULT NULL, ADD COLUMN `school_id` int(11) DEFAULT NULL, ADD CONSTRAINT `fk_ur_country_id` FOREIGN KEY (`country_id`) REFERENCES `Countries` (`country_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `fk_ur_state_id` FOREIGN KEY (`...
<filename>src/test/regress/sql/test_ustore_subtransaction_error_rollback.sql<gh_stars>100-1000 -- This tests proper handling of undorecords of a Subtransaction when an error is thrown and Rollback later. \set AUTOCOMMIT off DROP SCHEMA IF EXISTS pn; CREATE SCHEMA pn; DROP TABLE IF EXISTS public.ppinpltable3; -- C...
<gh_stars>100-1000 CREATE FOREIGN TABLE emp_details (id serial, salary float); CREATE FOREIGN TABLE emp_log (emp_id serial, logged_salary float); CREATE OR REPLACE FUNCTION rec_insert() RETURNS trigger AS $$ BEGIN INSERT INTO emp_log(logged_salary) VALUES(NEW.salary); RETURN NEW; END; $$ LANGUAGE 'plpgs...
<gh_stars>0 CREATE TABLE [dbo].[AspNetUserLogins]( [LoginProvider] [nvarchar](128) NOT NULL, [ProviderKey] [nvarchar](128) NOT NULL, [ProviderDisplayName] [nvarchar](max) NULL, [UserId] [nvarchar](450) NOT NULL, CONSTRAINT [PK_AspNetUserLogins] PRIMARY KEY CLUSTERED ( [LoginProvider] ASC, [ProviderKey] ASC )WI...
<gh_stars>0 ALTER VIEW [dbo].[LatestApprovedGameVersionForEachRegulation] AS SELECT dbo.Game.Game_ID, dbo.Game.GameName, dbo.LastVersionForEachGame.LastVersion, dbo.LastVersionForEachGame.Technology, dbo.Game.MainGameType, GameVersion_1.VersionFolder, GameVersion_1.VersionAsLong, LastA...
<gh_stars>0 version https://git-lfs.github.com/spec/v1 oid sha256:d5e0d6016ab21c99ee4e28f70a38715df0c9a1b48c1b2a8c90a77498664c9355 size 71119658
CREATE TABLE IF NOT EXISTS telegram_user ( -- use IF NOT EXISTS to not error if they table does exist user_id INTEGER PRIMARY KEY, username TEXT, first_name TEXT, last_name TEXT ); CREATE INDEX IF NOT EXISTS index_telegram_user_on_username on telegram_user(username); CREATE TABLE IF NOT EXISTS teleg...
-- Структура таблицы для дополнительного домашнего задания CREATE TABLE IF NOT EXISTS `auth_logs` ( `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `login` TEXT NOT NULL, `date` TEXT NOT NULL ); -- Очищаем таблицу на тот случай если она уже существовала в БД DELETE FROM `auth_logs`; -- Заполняем таблицу данными INS...
INSERT INTO fjkm_ilanivato.type_posts (libelleType, type_post_id, created_at, updated_at) VALUES ('<NAME>', null, '2017-12-24 23:43:38', '2017-12-24 23:43:40'); INSERT INTO fjkm_ilanivato.type_posts (libelleType, type_post_id, created_at, updated_at) VALUES ('<NAME>', null, '2017-12-24 23:43:58', '2017-12-24 23:43:59')...
<reponame>lhggomes/SQL SQL 360 SELECT NUMNOTA, DTENT, DTEMISSAO, FORNECEDOR, CGC AS CNPJ, IE, VLTOTAL FROM PCNFENT WHERE DTEMISSAO BETWEEN :DATA1 AND :DATA2 AND CODFILIAL = :CODFILIAL ORDER BY 3 ;
SET DEFINE OFF; CREATE TABLE AFW_30_PAGE ( SEQNC NUMBER(10), REF_AFW_13_PAGE NUMBER(10), NOM VARCHAR2(200 BYTE), NUMR_APEX NUMBER, DATE_CREAT DATE, UTILS_CREAT VARCHAR2(123 BYTE), DATE_MODFC DATE, UTILS_MODFC VARCHAR2(123 BYTE) ) LOGGING NOCOMPRESS ...
-- +goose Up -- SQL in section 'Up' is executed when this migration is applied ALTER TABLE `registrations` ADD COLUMN ( `initialIP` BINARY(16) NOT NULL DEFAULT "", `createdAt` DATETIME NOT NULL ); CREATE INDEX `initialIP_createdAt` on `registrations` (`initialIP`, `createdAt`); -- +goose Down -- SQL section 'Dow...
<reponame>litepubl/cms<filename>lib/core/install/sql/users.groups.sql iduser int unsigned NOT NULL default '0', idgroup int unsigned NOT NULL default '0', PRIMARY KEY (iduser,idgroup)
<filename>database-systems/db-library/popul_video.sql INSERT INTO member VALUES ('Velasquez','Carmen','283 King Street','Seattle','587-99-6666','2014-03-03'); INSERT INTO member VALUES ('Ngao','LaDoris','5 Modrany','Bratislava','586-355-8882','2014-03-08'); INSERT INTO member VALUES ('Nagayama','Midori','68 Via...
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Sep 07, 2019 at 12:38 PM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.3.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
<reponame>MichaelSScott/GraphDoc<gh_stars>1-10 /* ============================================= -- Author: <NAME> -- Create date: 30/08/18 -- Description: For a given dependency graph table generate the dependency graph file. Results should be saved to a .gv file. This can then be drawn as required with th...
<reponame>Isilmir/hermesTV_back CREATE TRIGGER setJson_insult on dbo.insults AFTER insert,update as declare @json nvarchar(max), @id int ,@description nvarchar(255) ,@longDescription nvarchar(max) ,@finished bit DECLARE insult_cur CURSOR FOR SELECT * from inserted OPEN insult_cur FETCH NEXT FROM insult_cu...
/* Setup base data objects */ create table planets ( id integer primary key, name varchar(256) ); create table garrisons ( id integer primary key, fk_planet integer not null, constraint garrisons_fk_planet foreign key ( fk_planet ) references planets( id ) ); /* This is the view we want to test, a list ...
--function returns a boolean value select initiate_inspection($1, $2);
<filename>macros/schema_tests/multi-column/expect_column_pair_values_to_be_in_set.sql {% test expect_column_pair_values_to_be_in_set(model, column_A, column_B, ...
drop table if exists order_line; drop table if exists purchase_order; drop table if exists cart_item; drop table if exists inventory; drop table if exists product; drop table if exists product_category; drop table if exists grants; drop table if exists user_role; drop table if exists user_auth; drop table if exists use...
INSERT INTO parties (name, description) VALUES ('JS Juggernauts', 'The JS Juggernauts eat, breathe, and sleep JavaScript. They can build everything you could ever want in JS, including a new kitchen sink.'), ('Heroes of HTML', 'Want to see a mock-up turn into an actual webpage in a matter of minutes? Well, the Hero...