sql
stringlengths
6
1.05M
/*Init the database. Use the - 5 times to separate statements*/ DROP TABLE IF EXISTS test_table; ----- CREATE TABLE IF NOT EXISTS test_table ( id int NOT NULL, name varchar(25) NOT NULL, surname varchar(20) NOT NULL, PRIMARY KEY (id) ); ----- INSERT INTO test_table (id, name, surname) VALUES ( 1, 'Test1', ...
insert into eg_userrole (roleid, userid, roleidtenantid, tenantid, lastmodifieddate) values( (select id from eg_role where code='SUPERUSER' and tenantid='panavel'), (select id from eg_user where username='ajay' and tenantid='panavel'), 'panavel','panavel', now());
USE [VipunenTK_DW] GO /****** Object: Table [dbo].[f_7_8_Ammatillisen_koulutuksen_opettajat_osallistuminen_täydennyskoulutukseen] Script Date: 13.2.2020 15:20:39 ******/ DROP TABLE [dbo].[f_7_8_Ammatillisen_koulutuksen_opettajat_osallistuminen_täydennyskoulutukseen] GO /****** Object: Table [dbo].[f_7_8_Ammatill...
<reponame>cincuranet/FirebirdDbComparer set term ^; create trigger trig on transaction commit as begin -- foobar end^ set term ;^
-- phpMyAdmin SQL Dump -- version 4.6.6 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Oct 13, 2017 at 03:10 PM -- Server version: 10.1.24-MariaDB -- PHP Version: 7.0.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_C...
<reponame>vicvinc/L2M<filename>serverend/sql/new.sql /* * @Author: vicvinc * @Date: 2015-07-20 11:28:48 * @Last Modified by: Administrator * @Last Modified time: 2015-07-20 14:05:50 */ -- ---------------------------- -- Table structure for `panel` -- ---------------------------- DROP TABLE IF EXISTS `panel`; CRE...
CREATE TABLE [dbo].[EAnnotations] ( --From MergedXSDs XSD --From 'genericRailML' Namespace [EAnnotationsId] BIGINT NOT NULL, [Annotation] SMALLINT NOT NULL, CONSTRAINT [PK_EAnnotationsId] PRIMARY KEY CLUSTERED ([EAnnotationsId] ASC), CONSTRAINT [FK_EAnnotations_EAnnotation] FOREIGN KEY ([Annotation]) REFERENCE...
<reponame>souzamonteiro/pcrinindustry CREATE USER 'coder'@'localhost' IDENTIFIED BY '<PASSWORD>'; GRANT ALL PRIVILEGES ON * . * TO 'coder'@'localhost';
-- phpMyAdmin SQL Dump -- version 3.3.9 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tempo de Geração: Dez 01, 2011 as 10:49 AM -- Versão do Servidor: 5.1.54 -- Versão do PHP: 5.3.5 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_...
<gh_stars>0 CREATE OR REPLACE FUNCTION increment(i integer) RETURNS integer AS $$ BEGIN RETURN i + 1; END; $$ LANGUAGE plpgsql;
<reponame>xyrit/huogouadmin CREATE TABLE `order_log_x` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '日志ID', `order_id` CHAR(25) NOT NULL COMMENT '订单ID', `op_id` INT(10) UNSIGNED DEFAULT NULL COMMENT '操作员ID', `op_name` VARCHAR(25) DEFAULT NULL COMMENT '操作人名称', `alt_time` INT(10) UNSIGNED DEFAULT NUL...
<filename>openGaussBase/testcase/KEYWORDS/boolean/Opengauss_Function_Keyword_Boolean_Case0029.sql<gh_stars>0 -- @testpoint:opengauss关键字boolean(非保留),作为表空间名 --关键字不带引号,创建成功 drop tablespace if exists boolean; CREATE TABLESPACE boolean RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1'; --清理环境 drop tablespace boolean; ...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Mar 10, 2018 at 04:20 AM -- Server version: 5.7.21-0ubuntu0.16.04.1 -- PHP Version: 7.0.22-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!4010...
<gh_stars>0 create database jinro; use jinro; create table members ( id int, name varchar(255), ready int, expel int, guard int, event varchar(255), job varchar(255), vote int, roomid varchar(255) ); create table actors ( peoples int, Villager int, wolf int, fortune i...
CREATE FUNCTION nearestwaytobusstop(startpoint public.geometry, tolerence double precision DEFAULT 20) RETURNS bigint LANGUAGE plpgsql AS $$ /* Find a segment of the network associated with a bus stop Look for all edges within a tolerance and look for wider road classifications */ DECLARE foundId int8; findBet...
<gh_stars>0 DROP TABLE IF EXISTS users ; DROP TABLE IF EXISTS tasks ; DROP TABLE IF EXISTS tasksdata ;
<filename>banco.sql create database scfweb; use scfweb; create table funcionario( idfuncionario integer auto_increment primary key, matricula varchar(20)not null, nome varchar(50)not null, telefone varchar(20)not null, sexo varchar(5)not null, email varchar(50)not null, salario doub...
use app_uoj233; alter table user_info add column school varchar(200); alter table user_info add column grade varchar(100); alter table user_info add column real_name varchar(100);
<reponame>Shuttl-Tech/antlr_psql -- file:aggregates.sql ln:342 expect:true create temp table t1 (a int, b int, c int, d int, primary key (a, b))
<gh_stars>1-10 INSERT INTO Individual (id, name, goesBy, suffix, birth, death) VALUES (1, 8, 23, 141, '1942-07-24', '1977-03-16'); INSERT INTO Individual (id, name, goesBy, suffix, birth, death) VALUES (2, 8, 24, 140, '1962-08-18', '1973-09-01'); INSERT INTO Individual (id, name, goesBy, birth) VALUES (3, 1, 22, '1963-...
--liquibase formatted sql --changeset liquibase:1 CREATE TABLE traffic ( time TIMESTAMP WITH TIME ZONE NOT NULL, device_id VARCHAR(64) NOT NULL, bytes_received DOUBLE PRECISION NOT NULL, bytes_sent DOUBLE PRECISION NOT NULL ); SELECT create_hypertable('traffic', 'time', 'device_id', 2);
<reponame>CourageDoove/courage # Host: localhost (Version: 5.5.53) # Date: 2018-06-22 16:51:29 # Generator: MySQL-Front 5.3 (Build 4.234) /*!40101 SET NAMES utf8 */; # # Structure for table "goods" # DROP TABLE IF EXISTS `goods`; CREATE TABLE `goods` ( `id` int(255) NOT NULL AUTO_INCREMENT, `name` varchar(20)...
DROP VIEW archive; ALTER TABLE archive2 RENAME TO archive; ALTER TABLE archive ADD ar_len INTEGER;
<reponame>NoSugarIce/mybatis-nosugar DROP TABLE student IF EXISTS; CREATE TABLE student ( id INTEGER GENERATED BY DEFAULT AS IDENTITY, name VARCHAR(50) NOT NULL, PRIMARY KEY (id) );
ALTER TABLE `#__redirect_links` DROP INDEX `idx_link_old`; ALTER TABLE `#__redirect_links` MODIFY `old_url` VARCHAR(2048) NOT NULL; ALTER TABLE `#__redirect_links` MODIFY `new_url` VARCHAR(2048) NOT NULL; ALTER TABLE `#__redirect_links` MODIFY `referer` VARCHAR(2048) NOT NULL; ALTER TABLE `#__redirect_links` ADD INDEX ...
<gh_stars>1-10 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; use 'shop33'; CREATE TABLE `sessions` ( `session_id` VARCHAR(24) NOT NULL, `last_active` INT UNSIGNED NOT NULL, `contents` TEXT NOT NULL, PRIMARY KEY (`session_id`), INDEX (`last_active`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=ut...
-- @testpoint: opengauss关键字partial(非保留),作为函数名,部分测试点合理报错 --关键字不带引号-成功 drop function if exists partial; create function partial(i integer) returns integer as $$ begin return i+1; end; $$ language plpgsql; / --关键字带双引号-成功 drop function if exists "partial"; create function "partial"(i integer) returns integer as $$ beg...
USE APP_CONFIG GO IF OBJECT_ID('SP_XC_CLAIM_REJECTION_DELETE') IS NOT NULL BEGIN DROP PROCEDURE SP_XC_CLAIM_REJECTION_DELETE PRINT '<< Procedure SP_XC_CLAIM_REJECTION_DELETE Dropped >>' END ELSE PRINT '<< Procedure SP_XC_CLAIM_REJECTION_DELETE DOES NOT EXIST >>' GO /******************************...
CREATE TABLE `data` ( `id` int(10) unsigned NOT NULL, `prolificid` varchar(128) NOT NULL, `ipaddress` varchar(128) DEFAULT NULL, `browser` varchar(128) DEFAULT NULL, `platform` varchar(128) DEFAULT NULL, `condition` int(11) DEFAULT NULL, `counterbalance` int(11) DEFAULT NULL, `codeversion` varchar(128) DE...
CREATE TABLE shop.product ( name text, price numeric, CONSTRAINT product_pkey PRIMARY KEY (page_id) ) INHERITS (public.page);
<gh_stars>0 --DDL --OBS: ALTER(alterar) / DROP(excluir) CREATE DATABASE M_PSales; USE M_PSales; CREATE TABLE Cursos ( IdCurso INT PRIMARY KEY IDENTITY ,Nome VARCHAR(200) UNIQUE NOT NULL ); CREATE TABLE Disciplinas ( IdDisciplina INT PRIMARY KEY IDENTITY ,Nome VARCHAR(200) NOT NULL ,IdCurso INT FOREIGN KE...
/* View */ DROP VIEW IF EXISTS `v_localizacao`; CREATE VIEW `v_localizacao` AS SELECT cidade.id as cidade_id, cidade.nome as cidade_nome, estado.id as estado_id, estado.nome as estado_nome, estado.sigla as estado_sigla FROM `cidade` INNER JOIN estado ON cidade.estado_id = estado.id; /* View ...
<gh_stars>0 --SFA_Results_Copy insert into [$(FromILRDatabase)].Rulebase.[SFA_Cases] ( LearnRefNumber ,CaseData ) select LearnRefNumber ,CaseData from Rulebase.[SFA_Cases] go insert into [$(FromILRDatabase)].Rulebase.[SFA_global] ( UKPRN, CurFundYr, LARSVersion, OrgVersion, PostcodeDisadvantageVersion, ...
<reponame>pirocorp/Databases-Basics-MS-SQL-Server USE Diablo GO SELECT Username, IpAddress AS [IP Address] FROM Users WHERE IpAddress LIKE '___.1_%._%.___' ORDER BY Username
begin; SAVEPOINT test_begin; -- select pgmig.assert_eq('first', 1, 1); INSERT INTO logs.config(id, type_id, key, data) VALUES (1, 1, 'testkey','{}'); select logs.file_after( logs.file_before( 1 , 1 , 'test.file' ) , 5 , 3 , 2 , 10 , 20 , 'err' ); select * from logs.file; ROLLBACK TO SAVEPOINT test_be...
<filename>resources/sql/regions.sql -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th4 21, 2019 lúc 01:04 PM -- Phiên bản máy phục vụ: 10.1.38-MariaDB -- Phiên bản PHP: 7.3.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACT...
<reponame>cayman/decision -- -- Структура таблицы `fa_indicator` -- CREATE TABLE IF NOT EXISTS `fa_indicator` ( `id` int(11) NOT NULL, `name` varchar(256) NOT NULL, `unit` varchar(16) DEFAULT NULL, `unit2` varchar(16) DEFAULT NULL, `quantity` varchar(8) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name`...
<reponame>kinfi4/Hospital-database-system<gh_stars>0 ----------------------------------------------- --- Get all available cabinets for --- 2022-01-25 10:27:49.203000 for duration of 10 minutes --- for building named by Makarov ----------------------------------------------- SELECT cabinet_number AS free_cabinet F...
-- redshift data type reference http://docs.aws.amazon.com/redshift/latest/dg/c_Supported_data_types.html CREATE TABLE bike_stations ( id INTEGER NOT NULL, name VARCHAR(255) NULL, latitude NUMERIC NULL, longitude NUMERIC NULL, nyct2010_gid INTEGER NULL, boroname VARCHAR(...
<reponame>ligana/Ensemble-om-SpringBoot drop table if exists MB_SETTLE_ACCT_MAPPING; /*==============================================================*/ /* Table: MB_SETTLE_ACCT_MAPPING */ /*==============================================================*/ create table MB_SETTLE_...
<filename>tools/con-test-db/test.sql create table "xyzzy" ( "id" int ); insert into "xyzzy" ( "id" ) values ( 1 );
<gh_stars>1-10 SET NOCOUNT ON; -- turn off all the 1 row inserted messages DECLARE @time DATETIME; SET @time = CONVERT(VARCHAR,'12:00:00 AM',108); WHILE @time <= '11:59:59 PM' BEGIN DECLARE @hour TINYINT = DATEPART(HOUR, @time); DECLARE @amPm CHAR(2) = CASE WHEN DATEPART(HOUR, @time) >= 12 T...
<reponame>C-EO/nucleusid<filename>migrations/2021-09-08-073748_add_indexes/up.sql CREATE INDEX ix_device_person ON device(person); CREATE INDEX ix_folder_person ON folder(person); CREATE INDEX ix_share_folder ON share(folder); CREATE INDEX ix_share_person ON share(person); CREATE INDEX ix_account_person ON account(pers...
-- -- PostgreSQL database dump -- -- Dumped from database version 9.6.2 -- Dumped by pg_dump version 9.6.2 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min...
<gh_stars>0 DROP DATABASE IF EXISTS company_DB; CREATE DATABASE company_DB; USE company_DB; CREATE TABLE department ( id INTEGER NOT NULL AUTO_INCREMENT, name VARCHAR(50) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE role ( id INTEGER NOT NULL AUTO_INCREMENT, title VARCHAR(50) NOT NULL, salary DECIMAL(15,2) ...
<reponame>ayrtoncavalieri/RSSReaderServer /* This file is part of RSSReaderServer. RSSReaderServer 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, either version 3 of the License, or (at your...
<reponame>yrakova/brn /** Make database table same as from ddl-auto update. Add script resolves issues to create tables from Flyway.*/ ALTER TABLE series ADD COLUMN IF NOT EXISTS level integer; ALTER TABLE sub_group ADD COLUMN IF NOT EXISTS code varchar(255) not null; ALTER TABLE audiometry_task ALTER COLUMN count DROP...
-- 30/05/2015 - Files DROP TABLE IF EXISTS `files`; CREATE TABLE `files` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `type` VARCHAR(100) NULL, `filename` VARCHAR(100) NULL, `path` VARCHAR(255) NULL, `foreign_id` INT(11) NOT NULL, `sequence_number` INT(5) NOT NULL DEFAULT '0', `extra_data` TEXT NOT NU...
INSERT INTO dividend VALUES ('AHPC',20702071), ('AHPC',20712072), ('AHPC',20732074), ('AHPC',20762077), ('CZBIL',20692070), ('CZBIL',20702071), ('CZBIL',20712072), ('CZBIL',20732074), ('GBIME',20692070), ('GBIME',20702071), ('GBIME',20712072), ('GBIME',20732074);
<reponame>alexavila150/luciddb !set headerinterval 1000 set schema 'analyzetest'; -- Note: BERNOULLI sampling requires the use of the REPEATABLE clause -- to produce repeatable results across invocations. As of its initial -- implementation, LCS SYSTEM sampling does not require the REPEATABLE clause. -- Note: The r...
CREATE UNIQUE INDEX "SYS_C0014300" ON "CTSPECIMEN_PART_NAME" ("PART_NAME", "COLLECTION_CDE")
<reponame>EchoThreeLLC/echothree<filename>doc/upgrade/000-E3-1417-ChainEntityRoleTypes.sql ALTER TABLE chainentityroletypedescriptions DROP FOREIGN KEY chnertypd_lang_languageid_fk; ALTER TABLE chainentityroletypedescriptions DROP FOREIGN KEY chnertypd_chnertyp_chainentityroletypeid_fk; ALTER TABLE chainentityroletyped...
select count(*) from nulls1 where bool_0 < 1 44
<filename>modules/common/conf/evolutions/default/3.sql # Add roles to user to allow authorization # --- !Ups CREATE TABLE `User_roleList` ( `User_email` varchar(255) NOT NULL, `roleList` varchar(255) DEFAULT NULL ) DEFAULT CHARSET=utf8; ALTER TABLE `User_roleList` ADD KEY `FK9q91gwu0njssl15fn116efivn` (`User_ema...
<gh_stars>1-10 INSERT INTO LOCALES (LOCALE, DESCRIPTION) VALUES ('pg_PG', 'Pig Latin, testing locale only.'); INSERT INTO LOCALES (LOCALE, DESCRIPTION) VALUES ('fr_FR', 'French as used in France, Latin 1 codeset'); INSERT INTO LOCALES (LOCALE, DESCRIPTION) VALUES ('de_DE', 'German as used in Germany, Latin 1 codeset');...
CREATE TABLE "lmv_bright"."wetlands" ( gid int primary key, type varchar(16), the_geom geometry ); CREATE INDEX ON lmv_bright.wetlands USING GIST (the_geom); insert into lmv_bright.wetlands select gid, type, the_geom FROM lmv_bright.landuse_terrang WHERE type = 'swamp' UNIO...
<filename>sql_templates/create_schema.sql {# creates a schema to hold data for a version of the genome #} CREATE SCHEMA IF NOT EXISTS {{ schema_prefix }} AUTHORIZATION {{ user_name }};
<reponame>hohnishi/go-template SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool C:\app\Administrator\admin\orcl\scripts\CreateClustDBViews.log append host "C:\app\Administrator\product\19.0.0\dbhome_1\perl\bin\perl.exe" C:\app\Administrator\product\19.0.0\dbhome_1\rdbms\admin\catcon.pl -n 1 -l C...
<filename>data/updates/perihelion-update-20211118-chishiki.sql ALTER TABLE `perihelion_Note` DROP COLUMN `displayToOwner`, DROP COLUMN `noteSubmissionDateTime`, DROP COLUMN `noteSubmittedByUserID`, ADD COLUMN `creator` INT NOT NULL AFTER `siteID`, ADD COLUMN `created` DATETIME NOT NULL AFTER `creator`, ADD COLUMN `upd...
<reponame>stevencyrway/quasar select count(*) as failures, count(*) != 0 as should_warn, count(*) != 0 as should_error from ( with all_values as ( select sms_list_status as value_field, count(*) as n_records from "quasar_prod_warehouse"."public"."member_...
<filename>db/libsystem.sql -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 19, 2020 at 07:13 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.2.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 ...
<gh_stars>1-10 /* Navicat MySQL Data Transfer Source Server : mysql Source Server Version : 50624 Source Host : localhost:3306 Source Database : user Target Server Type : MYSQL Target Server Version : 50624 File Encoding : 65001 Date: 2016-07-15 10:59:49 */ SET FOREIGN_KEY_CHECKS=...
SET DEFINE OFF; CREATE TABLE AFW_01_CODE_ERR_ORACL ( SEQNC NUMBER(10), ERR_CODE NUMBER(5), UTILS_CREAT VARCHAR2(123 BYTE), DATE_CREAT DATE, DATE_MODFC DATE, UTILS_MODFC VARCHAR2(123 BYTE), LIBL VARCHAR2(255 BYTE) ) LOGGING NOCOMPRESS NOCACHE MONITORING /
INSERT INTO `creature_model_info` (`modelid`) VALUES (49836); -- (Entry: 72463). INSERT INTO `creature_model_info` (`modelid`) VALUES (51270); -- (Entry: 73355). INSERT INTO `creature_model_info` (`modelid`) VALUES (51279); -- (Entry: 73367). INSERT INTO `creature_model_info` (`modelid`) VALUES (47856); -- (Entry: 737...
SELECT uid2 FROM friend WHERE uid1=me() SELECT uid,name FROM user WHERE uid = me() SELECT name FROM user WHERE uid=me() SELECT uid FROM user WHERE uid = me() SELECT name FROM user WHERE uid = me()
-- file:updatable_views.sql ln:1152 expect:true alter table wcowrtest add b text
<filename>samples/features/temporal/product-catalog/sql-scripts/setup.sql USE master GO DROP DATABASE IF EXISTS ProductCatalog GO CREATE DATABASE ProductCatalog GO USE ProductCatalog GO CREATE SCHEMA History GO CREATE TABLE Product ( ProductID int IDENTITY PRIMARY KEY, Name nvarchar(50) NOT NULL, Color nvarcha...
-- insert missing foreign keys ALTER TABLE [dbo].[EmailTemplate] WITH CHECK ADD CONSTRAINT [FK_EmailTemplate_User] FOREIGN KEY([UserId]) REFERENCES [dbo].[User] ([Id]) ALTER TABLE [dbo].[EmailTemplate] CHECK CONSTRAINT [FK_EmailTemplate_User]
# User schema # --- !Ups alter table `event_schedule` add column `num_of_booths` int unsigned not null default 0; # --- !Downs alter table `event_schedule` drop column `num_of_booths`;
-- FederalActionObligation must be blank for loans (i.e., when AssistanceType = 07 or 08). SELECT row_number, assistance_type, federal_action_obligation, afa_generated_unique AS "uniqueid_AssistanceTransactionUniqueKey" FROM detached_award_financial_assistance WHERE submission_id = {0} AND (assistan...
<reponame>Ed-Fi-Alliance-OSS/Ed-Fi-MigrationUtility -- SPDX-License-Identifier: Apache-2.0 -- Licensed to the Ed-Fi Alliance under one or more agreements. -- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. -- See the LICENSE and NOTICES files in the project root for more information....
CREATE DATABASE sftp_reader; USE sftp_reader; DROP TABLE IF EXISTS configuration_paused_notifying; DROP TABLE IF EXISTS configuration_polling_attempt; DROP TABLE IF EXISTS unknown_file; DROP TABLE IF EXISTS notification_message; DROP TABLE IF EXISTS batch_split; DROP TABLE IF EXISTS batch_file; DROP TABLE IF EXISTS ba...
ALTER TABLE users ALTER COLUMN first_name SET NOT NULL; ALTER TABLE users ALTER COLUMN last_name SET NOT NULL; ALTER TABLE users ALTER COLUMN phone_number SET NOT NULL; ALTER TABLE users ADD CONSTRAINT unique_phone_number UNIQUE (phone_number);
-- Migration script between two databases with the exact same schema -- This was written to migrate the data to a new schema that was -- exactly the same except for the new utf8mb4 full unicode encoding -- ----------- -- ASSUMPTIONS -- ----------- USE v2Schema; DROP PROCEDURE IF EXISTS migrate_tables; DROP PROCEDURE ...
<reponame>lluthus/azure-sql-server SELECT * FROM Countries WHERE CountryTLD = 'ZA' DELETE FROM Countries WHERE CountryTLD = 'ZA' SELECT * FROM Countries
<reponame>bedwards/baseball_analysis<filename>event_run_value/event_run_value.sql select event_cd_desc.description as "Event", round(avg(event_run.runs_scored + new_re.runs - run_expectancy.runs), 3) as "Run Value" from (select * from event_run where game_year >= 1999 and game_year < 2003) as event_run inner join e...
<reponame>ctdk/goiardi-schema -- Verify node_insert_ignore BEGIN; SELECT goiardi.merge_nodes('moop', '_default', NULL, NULL, NULL, NULL, NULL); SELECT id FROM goiardi.nodes WHERE name = 'moop' AND chef_environment = '_default'; SELECT goiardi.merge_nodes('moop', 'hoopty', NULL, NULL, NULL, NULL, NULL); SELECT id FROM...
<filename>build/src/functions/get_current_user.sql create or replace function get_current_user(session_id bigint) returns TABLE( member_id bigint, email varchar(255), first varchar(50), last varchar(50)) as $$ DECLARE found_id bigint; found_user membership.members; begin --session exist? if exi...
<filename>openGaussBase/testcase/KEYWORDS/minextents/Opengauss_Function_Keyword_Minextents_Case0024.sql -- @testpoint: opengauss关键字minextents(非保留),作为存储过程名,部分测试点合理报错 --关键字不带引号-成功 drop procedure if exists minextents; create procedure minextents( section number(6), salary_sum out number(8,2), staffs_count out integer...
<gh_stars>0 SELECT * FROM gardenia.users;
<reponame>rupaisafi/DhakaJacos -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 26, 2017 at 10:49 AM -- Server version: 10.1.19-MariaDB -- PHP Version: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTE...
/* Navicat MySQL Data Transfer Source Server : fuwuqi20190112 Source Server Version : 50717 Source Host : 192.168.0.222:3306 Source Database : wetech_admin Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2019-01-16 15:04:11 */ SET FOREIGN_KEY_C...
SELECT COUNT(*) FROM tag as t, site as s, question as q, tag_question as tq WHERE t.site_id = s.site_id AND q.site_id = s.site_id AND tq.site_id = s.site_id AND tq.question_id = q.id AND tq.tag_id = t.id AND (s.site_name in ('stackoverflow')) AND (t.name in ('amazon-rds','doxygen','flex-lexer','h2','ionic','multiple-in...
<filename>queries/stackoverflow/q16/d79ff0e95ffce19a01bd4aa4103b515c70fd6909.sql SELECT COUNT(*) FROM site AS s, so_user AS u1, tag AS t1, tag_question AS tq1, question AS q1, badge AS b1, account AS acc WHERE s.site_id = u1.site_id AND s.site_id = b1.site_id AND s.site_id = t1.site_id...
-- Query for H2 that fails in MySQL because tue id is too long INSERT INTO SeedUser (id, login, name, surname, password, userrole) values ('12345678123456781234567812345678', 'Systelab', 'Mark', 'Reinhold', 'wAfZzB+cBOH6JI1sY/+BRJ3mEVKFcRehrpxmiVTmmts=','ADMIN'); -- Query for MySQL that fails in H2 because User with lo...
if object_id('dingo_migration') is null begin create table dingo_migration( dingo_migration_id int not null identity(1, 1), migration_path nvarchar(max) not null, migration_hash varchar(256) not null, date_updated datetime not null, constraint pk$dingo_migration primary key clustered(dingo_migration_id asc) ...
-- Make sure I'm using the right database USE tempdb GO /*** Initial dbo.Person Insert ***/ INSERT INTO dbo.Person (Full_Name, Last_Name, First_Name) VALUES ('<NAME>', 'Prince', 'Diana'), -- Wonder Woman, DC ('<NAME>', 'Danvers', 'Linda'), -- Super Girl, DC ('<NAME>', 'Parker', 'May'), -- Spider Girl, Marvel ('<...
<reponame>jdkoren/sqlite-parser -- sort.test -- -- execsql {SELECT n FROM t1 ORDER BY log ASC, flt asc} SELECT n FROM t1 ORDER BY log ASC, flt asc
<reponame>wezm/read-rust<gh_stars>100-1000 CREATE TABLE IF NOT EXISTS post_categories ( id bigserial PRIMARY KEY, post_id bigint NOT NULL, category_id smallint NOT NULL, CONSTRAINT post_categories_post_id_fkey FOREIGN KEY (post_id) REFERENCES posts(id) ON DELETE CASCADE ); CREATE UNIQUE INDEX IF NOT EX...
<reponame>Shuttl-Tech/antlr_psql -- file:triggers.sql ln:629 expect:true DROP TABLE min_updates_test
-- file:date.sql ln:208 expect:true SELECT date 'today' - date 'tomorrow' AS "One day"
<filename>backend/de.metas.swat/de.metas.swat.base/src/main/sql/postgresql/system/40-sw01_swat/5484470_sys_gh3405_Delete_Unneeded_Columns_From_ProductPlanningSchema.sql -- 2018-02-01T14:32:52.339 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Field_Trl WHERE AD_Field_ID=561539 ; -- 2...
UPDATE herramientas.revendedora SET categoria_revendedora = 1, fecha_alta_revendedora = '2018-08-31', activo = true, persona = 2, fecha_baja_revendedora = null WHERE id = 2;
<filename>src/service/user/mysql/init/sample.sql CREATE DATABASE IF NOT EXISTS sample; CREATE TABLE IF NOT EXISTS `user` ( `uid` MEDIUMINT NOT NULL AUTO_INCREMENT, `fullname` VARCHAR(64) NULL, `email` VARCHAR(64) NULL, `password` VARCHAR(64) NULL, `loginFailedCnt` INTEGER, `createdAt` TIMESTAMP...
<gh_stars>0 CREATE TABLE tbl_info ( id INTEGER PRIMARY KEY AUTOINCREMENT, title TEXT, info TEXT, user TEXT, time_added TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); CREATE TABLE tbl_tag ( id INTEGER PRIMARY KEY AUTOINCREMENT, tag TEXT ); CREATE TABLE tbl_info_tag_ref ( id INTEGER PRIMARY KEY AUTOINCREMENT,...
<gh_stars>0 create view CECV_CUSTOMER_TURNOVER_VIEW as select sum(o.order_amount) TOTAL_TURNOVER, c.id ID, c.id CUSTOMER_ID, c.VERSION, c.CREATE_TS, c.CREATED_BY, c.UPDATE_TS, c.UPDATED_BY, c.DELETE_TS, c.DELETED_BY from CECV_CUSTOMER c join CECV_ORDER o on c.id = o.customer_id group by c.id;
<filename>backend/src/main/resources/db/migration/V4__Slide_overlay.sql CREATE TABLE overlays ( id SERIAL PRIMARY KEY, enabled boolean NOT NULL, image text NOT NULL, placement text DEFAULT 'TopLeft' NOT NULL, width text DEFAULT '100%' NOT NULL, height text DEFAULT '100%' NOT NULL, conference_id integer NO...
set schema 's'; !set incremental on select KSEQ,K2,K4,K5,K10,K25,K100,K1K,K10K,K40K,K100K,K250K,K500K FROM BENCH100K order by 1; !set incremental off
BEGIN TRANSACTION; CREATE TABLE "configuration" ("key" TEXT NOT NULL, "value" TEXT NOT NULL, "updated" TIMESTAMP); INSERT INTO schema_version (version, "when", description) VALUES (8, 'now', 'Added configuration table'); COMMIT;
<filename>data/sql/bank_map.sql -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: kerkr -- ------------------------------------------------------ -- Server version 5.7.18-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESUL...