sql
stringlengths
6
1.05M
<reponame>taolinqu/ds4p insert into country_code (id, code, display_name, code_system_name, code_system) values (1, 'US', 'United States', 'ISO 3166-1 Country Codes', '1.0.3166.1'); insert into country_code (id, code, display_name, code_system_name, code_system) values (2, 'KZ', 'Kazakhstan', 'ISO 3166-1 Country Codes'...
CREATE TABLE IF NOT EXISTS validator_aggregates ( id BIGSERIAL NOT NULL, created_at TIMESTAMP WITH TIME ZONE NOT NULL, updated_at TIMESTAMP WITH TIME ZONE NOT NULL, started_at_height DECIMAL(65, 0) NOT NULL, s...
<gh_stars>10-100 # --- Add a column to accounts that determines whether an account is a global admin. # --- Also ensure that no global admins can be program admins. # --- !Ups alter table accounts add column global_admin boolean default false constraint ck_account_admin CHECK(admin_of is null or array_length(admin_of,...
<reponame>hbraha/ovirt-engine UPDATE vm_static SET description = '' WHERE description IS NULL; UPDATE vm_static SET free_text_comment = '' WHERE free_text_comment IS NULL; ALTER TABLE vm_static ALTER COLUMN description SET DEFAULT ''; ALTER TABLE vm_static ALTER COLUMN free_text_comment SET DEFAULT '';
CREATE TABLE [dbo].[AssociatedWorkEffort] ( [Id] INT IDENTITY (1, 1) NOT NULL, [WorkEffortId] INT NULL, [AssociatedRecordId] INT NULL, [AssociatedRecordType] VARCHAR (255) NULL, PRIMARY KEY CLUSTERED ([Id] ASC) ); GO CREATE NONCLUSTERED IN...
<reponame>Vishal19111999/addons-server<gh_stars>0 /* There are some old entries in appsupport where the addon has already been hard-deleted so there is no matching id in addons. As we're adding a foreign key constraint to the table we need to first delete the invalid data or the ALTER TABLE fails.*/ DELETE FROM `appsup...
CREATE DATABASE product; CREATE TABLE items( id int(10) AUTO_INCREMENT NOT NULL, item varchar(50), description varchar(100), unit_cost float(10,5), quantity int(5), price float(10,5), PRIMARY KEY(id) )
import nitf_lib -- functions over pure values: -- DOC: is the result of an leq or equality test a raw value or a grammar -- DOC: discuss type annotations vs. coercions -- DOC: list introduction forms -- TODO: check uses of this def Maybe guard P = { Match guard ; @v = P ; ^ just v} <| ^ nothing def DateDefaul...
-- @testpoint:opengauss关键字fortran(非保留),作为角色名 --关键字不带引号-成功 drop role if exists fortran; create role fortran with password '<PASSWORD>' valid until '2020-12-31'; drop role fortran; --关键字带双引号-成功 drop role if exists "fortran"; create role "fortran" with password '<PASSWORD>' valid until '2020-12-31'; drop role "fortran...
EXEC sp_addextendedproperty N'MS_Description', N'AdventureWorks 2014 Sample OLTP Database', NULL, NULL, NULL, NULL, NULL, NULL GO
<reponame>dylonion/Epic<filename>db/seeds/test_card_set.sql INSERT INTO cards (name, type, cost, offense, defense, alignment, portrait_file, class, rules_text, keywords) VALUES ('test card one',TRUE,TRUE,6,6,'wild','card1','Dragon',NULL,'airborne, ambush, blitz, loyalty 2: "Deal 5 damage to a target"'), ('test card two...
<filename>assets/backup base/gt_25-10-2018.sql -- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Servidor: 1172.16.17.32 -- Tiempo de generación: 25-10-2018 a las 02:58:18 -- Versión del servidor: 10.1.36-MariaDB -- Versión de PHP: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMI...
-- -------------------------------------------------------- -- TABELA DE CATEGORIA (LEGADO) -- -------------------------------------------------------- CREATE TABLE IF NOT EXISTS `categoria` ( `ID` bigint(20) NOT NULL AUTO_INCREMENT, `DESCRICAO` varchar(100) DEFAULT NULL, `NOME` varchar(50) NOT NULL, PRIMARY K...
<gh_stars>0 DROP PROCEDURE IF EXISTS `proc_get_eid_average_rejection`; DELIMITER // CREATE PROCEDURE `proc_get_eid_average_rejection` (IN filter_year INT(11)) BEGIN SET @QUERY = "SELECT `year`, `month`, AVG(`tests`) AS `tests`, AVG(`rejected`) AS `rejec...
<reponame>databasekevin/imbd_repo<filename>imdb_sql_files/load_dw/imdb_base/sql_files/title_crew/st_imdb_base_title_crew_etl.sql /* INSERT INTO STAGING TABLE */ TRUNCATE TABLE ST_IMDB_BASE_TITLE_CREW; INSERT INTO ST_IMDB_BASE_TITLE_CREW ( TCONST_NK ,DIRECTORS ,WRITERS ,SRC_NAME ,LOAD_DATE ,NOTE ) SELECT TCONST_...
<filename>FinalReport/documentation/phase3/dbSQL.sql /* RETRIEVE THE FIRST NAME , NUMBER OF LIKES AND COMMENT CONTENT RECIEVED BY THE USERS WHO POSTED ON THE SOCIAL MEDIA . PERFORMING JOIN ON:PROFILE , POST AND COMMENT*/ SELECT idprofileid, profile.fname AS name, post.likescount AS likes, commen...
<reponame>872131018/cheevohaus CREATE TABLE IF NOT EXISTS cheevohaus.presence ( id int NOT NULL AUTO_INCREMENT, xuid VARCHAR(32), state VARCHAR(16), deviceType VARCHAR(16), titleId VARCHAR(32), name VARCHAR(32), placement VARCHAR(16), stateOfApp VARCHAR(16), lastModified VARCHAR(32), PRIMARY KEY(id) );
<filename>migrations/0082.sql CREATE TABLE quantity_unit_conversions ( id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, from_qu_id INT NOT NULL, to_qu_id INT NOT NULL, factor REAL NOT NULL, product_id INT, row_created_timestamp DATETIME DEFAULT CURRENT_TIMESTAMP ); CREATE TRIGGER quantity_unit_conversions_custom_...
-- *************************************************************************** -- File: 13_2.sql -- -- Developed By TUSC -- -- Disclaimer: Neither Osborne/McGraw-Hill, TUSC, nor the author warrant -- that this source code is error-free. If any errors are -- found in this source code, please repo...
<filename>exemplo1.sql -- Exemplo 1 SELECT Pnome, Cidade FROM FUNCIONARIO WHERE Cpf = '12345678966'; -- Seleciona os dados do funcionário pelo CPF
/* Role tokens need to be unique */ ALTER TABLE `Roles` ADD CONSTRAINT ROLES_UNIQUE_NAME UNIQUE(name); /* Role seed data current as of 4-8-2015 */ INSERT INTO `Roles` (`Name`) VALUES ('instructor'); INSERT INTO `Roles` (`Name`) VALUES ('academicCoordinator'); INSERT INTO `Roles` (`Name`) VALUES ('admin');
USE MYLEARNING; Create table PROJECTS( Project_ID int(255) primary key auto_increment, Project_name varchar(255), Project_desc varchar(255), Created_Date datetime, Modified_Date datetime, Project_status enum('Active', 'Inactive') ); Drop trigger if exists Create_Project; Delimiter $$ Create trigger Insert_Project be...
<reponame>ojalaquellueva/gnrs -- ------------------------------------------------------------ -- Populates geonames ids in user data -- Keep geonameid of lowest political division matched -- ------------------------------------------------------------ -- country UPDATE user_data a SET geonameid=b.country_id FROM coun...
<reponame>igorwessel/naruto_api INSERT INTO "_AffiliationToTeam" ("B", "A") VALUES (1, 9), (4, 9), (6, 4), (7, 52), (8, 1), (9, 10), (10, 9), (11, 1), (12, 4), (13, 9), (15, 10), (16, 4), (17, 2), (18, 2), (19, 2), (20, 2), (21, 1), (21, 53), (22, 15), (23, 5), (24, 15), (25, 1), (26, 2), (27, 9), (28, 16), (29, 9), (3...
select * from bluetail_bods_personstatement_view per , LATERAL jsonb_array_elements(per.identifiers_json) identifiers -- LEFT JOIN LATERAL ON per.identifiers_json -- where identifiers_json ; select * from bluetail_bods_personstatement_view per WHERE per.identifiers_json @> '[{"id": "HMCI17014140912...
<gh_stars>10-100 -- Removes aura Rebel Valor (www.wowhead.com/spell=67503) when turning in quest The Rebel Lord's Arsenal (http://www.wowhead.com/quest=14159). UPDATE `quest_template` SET `CompleteScript`=14159 WHERE `entry`=14159; DELETE FROM `quest_end_scripts` WHERE `id`=14159; INSERT INTO `quest_end_scripts` (`id`...
<gh_stars>0 SELECT id, PartyId, name, `status`, voteCount, createdAt, updatedAt, CONCAT( (CASE `status` WHEN 'playing' THEN '10' WHEN 'paused' THEN '10' WHEN 'queued' THEN '20' WHEN 'ended' THEN '30' END), LPAD(HEX(65535 - voteCount), 4, 0), LPAD(HEX(UNIX_TIMESTAMP(create...
IF OBJECT_ID('@cohort_database_schema.@cohort_inclusion_table', 'U') IS NOT NULL DROP TABLE @cohort_database_schema.@cohort_inclusion_table; IF OBJECT_ID('@cohort_database_schema.@cohort_inclusion_result_table', 'U') IS NOT NULL DROP TABLE @cohort_database_schema.@cohort_inclusion_result_table; IF OBJECT_ID...
<filename>api/api_sources/schema-migration-sql/PreviousInspectionSourceSchema/PreviousInspectionSourceSchema.sql -- ### Creating Table: previous_inspection_source_code ### -- CREATE TABLE previous_inspection_source_code (); ALTER TABLE previous_inspection_source_code ADD COLUMN previous_inspection_source_code...
<filename>fixtures/zend_local_deps/vendor/socalnick/scn-social-auth/data/schema.sql CREATE TABLE IF NOT EXISTS `user_provider` ( `user_id` INT UNSIGNED NOT NULL, `provider_id` varchar(50) NOT NULL, `provider` varchar(255) NOT NULL, PRIMARY KEY (`user_id`,`provider_id`), UNIQUE KEY (`provider_id`,`provider`), ...
<gh_stars>10-100 -- page view context is given as json string in csv. Extract array from json with prep as ( select * except(contexts_com_snowplowanalytics_snowplow_web_page_1_0_0), JSON_EXTRACT_ARRAY(contexts_com_snowplowanalytics_snowplow_web_page_1_0_0) AS contexts_com_snowplowanalytics_snowplow_web_page_1_0_0...
PRINT 'Update Building Predominate Uses' -- Change properties associated with Zebra Feeding Station to default 1.# UPDATE dbo.[Buildings] SET [BuildingPredominateUseId] = 1 WHERE [BuildingPredominateUseId] = 17 --Remove Zebra Feeding Station DELETE FROM dbo.[BuildingPredominateUses] WHERE [Id] = 17;
SET client_encoding TO 'UTF8'; CREATE OR REPLACE FUNCTION ag_get_barcode_md_animal ( barcode_ IN text, user_data_ refcursor ) RETURNS refcursor AS $body$ BEGIN open user_data_ for select akb.barcode as sample_name, akb.barcode as ANONYMIZED_NAME, akb.sample_date as collection_date, ...
<filename>select_items_201711061010.sql INSERT INTO bartonjoe.select_items (id,show_name,pre_selected_date,weight,hide,choose_times) VALUES (1,'酒集面社','2017-10-07 00:00:00.000',1,0,0) ,(2,'黄鱼面','2017-10-07 00:00:00.000',1,0,0) ,(3,'泰煌鸡','2017-10-07 00:00:00.000',1,0,0) ,(4,'小杨生煎','2017-10-07 00:00:00.000',1,0,0) ,(5,'酷...
CREATE TABLE users ( name TEXT, age TEXT ); INSERT INTO users (name, age) VALUES ('Martin', null), ('Casper', null), ('Ali', null), ('Muhammed', null);
CREATE TABLE if not exists Recommendations ( id INTEGER PRIMARY KEY, title TEXT NOT NULL, type TEXT NOT NULL, url TEXT, isbn TEXT, description TEXT, comment TEXT ); CREATE TABLE if not exists AuthorRecommendations ( recom_id INTEGER REFERENCES Recommendations(id) NOT NULL, author_id...
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: eshop -- ------------------------------------------------------ -- Server version 5.7.17-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /...
CREATE TABLE IF NOT EXISTS `character_recommends` ( `charId` INT UNSIGNED NOT NULL default 0, `target_id` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`charId`,`target_id`) );
<filename>f105814/application/deployment/definition.sql prompt --application/deployment/definition begin -- Manifest -- INSTALL: 105814 -- Manifest End wwv_flow_api.component_begin ( p_version_yyyy_mm_dd=>'2021.04.15' ,p_release=>'21.1.2' ,p_default_workspace_id=>32532315908301997117 ,p_default_application_id=...
SELECT COUNT(*) FROM user_notify_settings INNER JOIN user_status on user_notify_settings.user_telegram_id = user_status.user_telegram_id WHERE user_notify_settings.marks = 1 AND user_status.is_user_orioks_authenticated = 1;
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Hoszt: localhost -- Létrehozás ideje: 2017. Máj 10. 15:48 -- Szerver verzió: 5.6.20-log -- PHP verzió: 5.4.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
ALTER TABLE `notification` ADD COLUMN `user_id` INT(11) NULL AFTER `viewed`, ADD INDEX `fk_notification_1_idx` (`user_id` ASC); ALTER TABLE `notification` ADD CONSTRAINT `fk_notification_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
<reponame>Mansoldo/PLSQL_Desafio -- PERGUNTA 3 -- CRIAÇÃO DA TABELA DE EVENTOS CREATE TABLE EVENTS ( EVENT_TYPE INTEGER NOT NULL, VALUE INTEGER NOT NULL, TIME TIMESTAMP NOT NULL, UNIQUE (EVENT_TYPE, TIME) ); / -- CRIAÇÃO DA TABELA TEMPORÁRIA PARA ARMAZENAR OS EVENTOS E SEUS VALORES CREATE GLOBAL TEMPO...
CREATE TABLE temp_drugcode ( id int(4) NOT NULL AUTO_INCREMENT, drug varchar(100) NOT NULL, unit varchar(150) DEFAULT NULL, pack_size varchar(10) NOT NULL, safety_quantity varchar(4) NOT NULL, generic_name varchar(150) DEFAULT NULL, supported_by varchar(30) NOT NULL, classification varchar(150) DEFAULT ...
create database test; use database test; create table T1 ( id long not null, i1 int, f1 float, d1 double, s1 string(100) not null, primary key(id) ); create table T2 ( id long, i2 int, f2 float, d2 double, s2 string(50) not null ); create table T3 ( id long, i3 int, f3 float, d3 double, s3 string(50), primary key (i...
INSERT INTO BUSSINESS_PROVIDES VALUES('1000000','101ABC'); INSERT INTO BUSSINESS_PROVIDES VALUES('1000010','102ABC'); INSERT INTO BUSSINESS_PROVIDES VALUES('1000020','103ABC'); INSERT INTO BUSSINESS_PROVIDES VALUES('1000030','104ABC'); INSERT INTO BUSSINESS_PROVIDES VALUES('1000040','105ABC'); INSERT INTO BUSSINESS_...
<gh_stars>1-10 SELECT mail.id, mail.name, CASE WHEN mail.file <> '' THEN true ELSE false END AS file, mail.sread, mail.stamp, users.name as recipient FROM mail JOIN users ON users.id = mail.recipient WHERE mail.creator = $u[id] GROUP BY mail.id ORDER BY mail.stamp DESC, mail.id;
USE [Koski_SA] GO /****** Object: StoredProcedure [dbo].[p_lataa_tutkinnot_ja_tutkinnonosat_valitaulu_tasot_yhdistetty] Script Date: 24.1.2020 15:33:24 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[p_lataa_tutkinnot_ja_tutkinnonosat_valitaulu_tasot_yhdistetty] AS --TRUNCATE...
/* somewhat similar to the previous example (Contest leaderboard), though, the added condition * of restricting results where two users have the same number of challenges created provides an * additional, well, challenge. * * The first sELECT query is responsible for getting the basic columns we need, as well a...
<filename>122/test1.sql -- ONE -- SELECT * FROM people LIMIT 10; -- SELECT pfirstname, pfavorites FROM people LIMIT 10; -- SELECT pfirstname, pfavorites -> 'Destinations' FROM people LIMIT 10; SELECT pfirstname, pfavorites -> 'Destinations' AS "DESTINATIONS" FROM people LIMIT 10; -- FUN accessing array item -- SELECT ...
-- Introduction to Triggers -- An introduction to the basic concepts of SQL Server triggers. Create your first trigger using T-SQL code. Learn how triggers are used and what alternatives exist. -- Classification of Triggers -- Creating your first trigger -- You have been hired by the company Fresh Fruit Delivery to he...
<reponame>dram/metasfresh -- 20.10.2016 18:44 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,543200,0,'ExcludeYearEndBooking',TO_TIMESTAMP('2016-10...
CREATE TABLE IF NOT EXISTS c_point_log ( c_point_log_id int(11) NOT NULL auto_increment, c_member_id int(11) NOT NULL default '0', point int(11) NOT NULL default '0', memo text NOT NULL, r_datetime datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (c_point_log_id), KEY c_member_id (c_member_id...
DROP TABLE IF EXISTS `shuyang_manage_stats_add`;
CREATE DATABASE IF NOT EXISTS employees; USE employees; CREATE TABLE IF NOT EXISTS `sequence` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, `name` VARCHAR(64) NOT NULL, `value` BIGINT NOT NULL, `step` INT NOT NULL DEFAULT 10000, `created_a...
<gh_stars>0 CREATE OR REPLACE PROCEDURE VC.VC_CHECK_CLONE_DIFF("OBJECT_TYPE" VARCHAR(16777216), "SCHEMA_NAME" VARCHAR(16777216), "OBJECT_NAME" VARCHAR(16777216)) RETURNS BOOLEAN LANGUAGE JAVASCRIPT EXECUTE AS OWNER AS '/* Create function to execute SQLs */ function executeSQL(SQL ) { // Prepare statement. ...
<reponame>lwlflz/workspace<filename>build-cloud/build-cloud-admin/sql/build_cloud-20180320.sql /* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50721 Source Host : localhost:3306 Source Schema : build_cloud Target Server ...
CREATE TABLE IF NOT EXISTS USUARIO( ID BIGINT PRIMARY KEY AUTO_INCREMENT, USUARIO_NOME VARCHAR(50) NOT NULL, EMAIL VARCHAR(255) NOT NULL, SENHA VARCHAR(255) NOT NULL); CREATE TABLE IF NOT EXISTS TIPOS_CONTATO( ID_TIPO_CONTATO BIGINT PRIMARY KEY AUTO_INCREMENT, DESC_TIPO_CONTATO VARCHAR(50) NOT NULL); CREATE TABL...
-- ================================================= -- PACKAGE: UI -- COMPONENT : PHOTO ALBUMS -- CREATE : 2020.04.06 -- UPDATE : 2020.06.23 -- ================================================= DROP TABLE IF EXISTS AC_UI_ALBUM, AC_UI_ALBUM_PROPERTY, AC_UI_ALBUM_IMAGES ; CREATE TABLE AC_UI_ALBUM ( AL...
<filename>sql/20150903/01_update_ethnicity_question.sql<gh_stars>1-10 UPDATE `preferences_text` SET `id` = '4488', `languages_id` = '2', `title` = 'No Hispano o Latino', `description` = 'not_hispanic_or_latino', `instructions` = '', `placeholder` = '', `default` = '', `object_label` = '', `sites_id` = NULL, `projects_i...
UPDATE dish set times_served = 0 where times_served is null; UPDATE dish set rating = 0 where rating is null; ALTER TABLE dish ALTER COLUMN times_served SET NOT NULL; ALTER TABLE dish ALTER COLUMN rating SET NOT NULL; ALTER TABLE dish ALTER COLUMN times_served SET DEFAULT 0; ALTER TABLE dish ALTER COLUMN rating SET D...
CREATE TABLE test1 (a int, b text); CREATE PROCEDURE transaction_test1() LANGUAGE plpgsql AS $$ BEGIN FOR i IN 0..9 LOOP INSERT INTO test1 (a) VALUES (i); IF i % 2 = 0 THEN COMMIT; ELSE ROLLBACK; END IF; END LOOP; END $$; CALL transaction_test1(); SELE...
<filename>src/nucleotides/api/status.sql -- name: task-summary SELECT * FROM task_summary; -- name: benchmark-summary SELECT * FROM benchmark_summary; -- name: global-summary SELECT * FROM global_summary;
<reponame>Jenausmax/LessonMonitor CREATE TABLE [dbo].[Members] ( [Id] INT NOT NULL PRIMARY KEY, [FullName] NVARCHAR(50) NOT NULL, [Age] INT NULL, [Nicknames] NVARCHAR(MAX) NULL, [Links] NVARCHAR(MAX) NULL )
-- Adminer 4.8.1 MySQL 5.7.33 dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; SET NAMES utf8mb4; DROP TABLE IF EXISTS `db_guru`; CREATE TABLE `db_guru` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nama` varchar(50) NOT NULL, `nip` varchar(50) DEFAU...
CREATE TABLE [dbo].[Certificates]( [Id] [uniqueidentifier] NOT NULL DEFAULT NEWID(), [CertificateData] [nvarchar](max) NOT NULL, [ToBePrinted] [datetime2](7) NULL, [CreatedAt] [datetime2](7) NOT NULL, [CreatedBy] [nvarchar](256) NOT NULL, [DeletedAt] [datetime2](7) NULL, [DeletedBy] [nvarchar](256) NULL, [Cert...
<gh_stars>0 create user 'empresa_gerente'@'localhost' identfied by '1234'; grant all privileges on empresabd.equipe from 'empresa_geral'@'localhost'; grant all privileges on empresabd.atividade_projeto from 'empresa_geral'@'localhost'; grant all privileges on empresabd.membro from 'empresa_geral'@'localhost'; grant a...
CREATE SCHEMA [Courses]
<reponame>yeputons/fall-2016-paradigms<filename>161116/sources/06-sql-injection-init.sql DROP TABLE IF EXISTS Text; CREATE TABLE Text (owner TEXT, key TEXT, value TEXT); INSERT INTO Text (owner, key, value) VALUES ("user", "key1", "value1"), ("user", "key2", "value2"), ("user", "other key", "value3"), ...
CREATE EXTENSION IF NOT EXISTS postgis; CREATE TABLE cities ( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, location GEOGRAPHY NOT NULL ); CREATE TABLE cities_pm25 ( id SERIAL PRIMARY KEY, city_id INTEGER REFERENCES cities(id), data INTEGER NOT NULL, date_recorded TIMESTAMP DEFAULT now() );
;with ind as ( select a.object_id , a.index_id , CAST(col_list.list as varchar(max)) as list from (select distinct OBJECT_ID, index_id from sys.index_columns) a CROSS APPLY (select cast(column_id as varchar(16)) + ',' as [text()] from sys.index_columns b JOIN sys.indexes i on b.object_id = i.object_...
<gh_stars>1-10 DELETE FROM assajos_formacions WHERE id_assaig = ? AND id_formacio = ?;
-- analyze.test -- -- execsql { -- CREATE INDEX t1i2 ON t1(b); -- ANALYZE t1; -- SELECT * FROM sqlite_stat1 ORDER BY idx; -- } CREATE INDEX t1i2 ON t1(b); ANALYZE t1; SELECT * FROM sqlite_stat1 ORDER BY idx;
-- file:cluster.sql ln:80 expect:true SELECT relname, relkind, EXISTS(SELECT 1 FROM pg_class WHERE oid = c.reltoastrelid) AS hastoast FROM pg_class c WHERE relname LIKE 'clstr_tst%' ORDER BY relname
<gh_stars>100-1000 -- original: e_select.test -- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test CREATE TABLE t1(a, b); INSERT INTO t1 VALUES('a', 'one'); INSERT INTO t1 VALUES('b', 'two'); INSERT INTO t1 VALUES('c', 'three'); CREATE TABLE t2(a, b); INSERT INTO t2 VALUES('a', 'I'); INSERT INTO...
-- -- Author: <NAME> <<EMAIL>> -- Copyright: (c) 2019, <NAME>. All Rights Reserved. -- License: MIT License -- -- Fix wrong SQL type for expirationDays (when has more than '255' as value) ALTER TABLE ph7_memberships MODIFY expirationDays smallint(4) unsigned NOT NULL; -- Update pH7CMS's SQL schema ve...
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.5.9-MariaDB - mariadb.org binary distribution -- Server OS: Win64 -- HeidiSQL Version: 11.2.0.6213 -- ------------------------------------------------...
-- 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. PRINT N'Creating primary key [EducationServiceCent...
<filename>parse/src/test/resources/ddl/alter/test_13.sql<gh_stars>0 CREATE TABLE `tb_tmeujebigu` ( `col_vexgpiotuy` binary, `col_uouidnfxfe` set('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; RENAME TABLE `tb_tmeujebigu` TO `tb_vqlldbakax`; RENAME TABLE...
/* Navicat Premium Data Transfer Source Server : aws.c5aac5cfookr.ap-northeast-1.rds.amazonaws.com Source Server Type : MySQL Source Server Version : 50639 Source Host : aws.c5aac5cfookr.ap-northeast-1.rds.amazonaws.com:3306 Source Schema : easyreport2 Target Server Type : MySQL...
select title, partition, region, account_id from aws.aws_cloudwatch_log_resource_policy where policy_name = 'dummy-{{ resourceName }}';
<gh_stars>0 ALTER PROCEDURE [transfer].[idle.execute] @ports core.arrayList READONLY, @count INT AS DECLARE @callParams XML DECLARE @updated TABLE( txid BIGINT, mtid VARCHAR(4), opcode VARCHAR(20), reverseIssuer BIT, reverseLedger BIT ) BEGIN TRY -- forward stored UPDATE [tra...
<filename>framework/resources/Functional/limit0/functions/plan/coalesce.sql explain plan for select * from ( select coalesce(o.c_varchar, r.c_varchar) as a, coalesce(r.c_varchar, o.c_varchar) as b, coalesce(o.c_integer, r.c_integer) as c, coalesce(r.c_integer, o.c_integer) as d, ...
/* Navicat Premium Data Transfer Source Server : localhost_mysql Source Server Type : MySQL Source Server Version : 80019 Source Host : localhost:3306 Source Schema : spring_cloud_mysql8_test_db Target Server Type : MySQL Target Server Version : 80019 File Encoding : 6...
<reponame>SKalt/pg_sql_parser_tests<gh_stars>0 'abc' LIKE 'abc' true 'abc' LIKE 'a%' true 'abc' LIKE '_b_' true 'abc' LIKE 'c' false
<gh_stars>1-10 -- MODULE CDR014 -- SQL Test Suite, V6.0, Interactive SQL, cdr014.sql -- 59-byte ID -- TEd Version # -- AUTHORIZATION SUN SELECT USER FROM SUN.ECCO; -- RERUN if USER value does not match preceding AUTHORIZATION comment -- date_time print -- TEST:0347 FIPS sz. (comb.keys=6), P.K unique,insert! -- ...
-- @testpoint: opengauss关键字preferred(非保留),作为同义词对象名,部分测试点合理报错 --前置条件 drop table if exists preferred_test; create table preferred_test(id int,name varchar(10)); --关键字不带引号-成功 drop synonym if exists preferred; create synonym preferred for preferred_test; insert into preferred values (1,'ada'),(2, 'bob'); update preferre...
<gh_stars>0 --@testpoint:设置所处的时区 SET SESSION TIME ZONE LOCAL ;
<gh_stars>0 USE [perpetuumsa] GO ------------------------------------ -- Large Ammo PVP/Reward definition -- for use in loots -- Date modified: 2021/11/01 ------------------------------------ DROP TABLE IF EXISTS #ENTITYDEFS; CREATE TABLE #ENTITYDEFS ( def INT, defName varchar(100), quant int, catFlags bigint, ...
INSERT INTO customers (email, firstName, surname) VALUES (('<EMAIL>', 'Caresa', 'Melia'), ('<EMAIL>', 'Ciro', 'Bitten'), ('<EMAIL>', 'Roze', 'Poznanski'), ('<EMAIL>', 'Sibley', 'Rother'), ('<EMAIL>', 'Moss', '<NAME>'), ('<EMAIL>', 'Joye', 'Pasterfield'), ('<EMAIL>', 'Evelyn', 'Kerwood'), ('<EMAIL>', 'Doro...
<filename>migrations/migration_055.sql CREATE MATERIALIZED VIEW search_index_es AS WITH allauthors AS ( SELECT things.id thingid, string_agg(users.name, ' ') authorstring FROM users, authors, things WHERE authors.user_id = users.id AND authors.thingid = things.id GROUP BY things.id ), texts AS ( ...
SELECT maker FROM (SELECT maker, MAX(price) FROM pc LEFT OUTER JOIN product ON pc.model=product.model)
<gh_stars>0 PRINT N'[config] wird erstellt....'; GO CREATE SCHEMA [config] AUTHORIZATION [dbo]; GO PRINT N'[config].[Message] wird erstellt....'; GO CREATE TABLE [config].[Message] ( [MessageID] INT IDENTITY (1, 1) NOT NULL, [Name] [sysname] NOT NULL, [Description] NVAR...
<gh_stars>0 SELECT TOP(50) e.EmployeeID, e.FirstName + ' ' + e.LastName AS [EmployeeName], m.FirstName + ' ' + m.LastName AS [ManagerName], d.[Name] AS [DepartmentName] FROM Employees e LEFT JOIN Employees m ON e.ManagerID = m.EmployeeID LEFT JOIN Departments d ON d.DepartmentID = e.DepartmentID ORDER BY e.Em...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.9.7 -- https://www.phpmyadmin.net/ -- -- Servidor: db5004185010.hosting-data.io -- Tiempo de generación: 11-09-2021 a las 09:00:25 -- Versión del servidor: 5.7.33-log -- Versión de PHP: 7.0.33-0+deb9u11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TR...
<filename>Source Code/iRecruit.Database/dbo/Tables/ActivityLog.sql CREATE TABLE [dbo].[ActivityLog] ( [ActivityLogID] INT IDENTITY (1, 1) NOT NULL, [IndentID] INT NULL, [UserID] VARCHAR (100) NULL, [LogTypeID] INT NULL, [Header] VARCHAR (500) NUL...
USE employee_cms; INSERT INTO department (name) VALUES ('IT'), ('Engineering'), ('Quality'), ('Shipping'); INSERT INTO role (title, salary, department_id) VALUES ('IT Manager', 150000.00, 1), ('Engineering Manager', 150000.00, 2), ('Quality Manager', 150000.00, 3), ('Shipping Manager', 150000.00, 4), ('Senior Develop...
<filename>direct-honda-parts-database/DHPData/dbo/Stored Procedures/setup_UserAddress_DeleteUserAddress.sql -- ============================================= -- Author: <NAME> -- Create date: 17 Aug, 2020 -- Description: SP for deleting user address -- ============================================= CREATE PROCEDURE [d...
<gh_stars>1-10 CREATE database focus with OWNER= foo CREATE TABLE TinyFocus( id SERIAL PRIMARY KEY, FocusIndex INTEGER, Username VARCHAR(20), DateTime TIMESTAMP, FocusLevel NUMERIC(20,10) ); CREATE TABLE users( ID SERIAL PRIMARY KEY, username VARCHAR(20) UNIQUE, professionalrole VARCHAR(20), AutomaticTimeZo...
SET DEFINE OFF; create or replace package afw_15_ftp_pkg is /* THESE HAVE BEEN SETUP TO BE UTILIZED AS DIRECT CALLS VIA ORACLE APPLICATIONS */ /* THEY RETURN FAILURE CODES APPROPRIATLY FOR USAGE IN REQUEST SETS AND PAGING ROUTINES */ /* USE THIS PROCEDURE TO VERIFY THAT A SERVER AND PATH IS AVAILABLE */ proced...