sql
stringlengths
6
1.05M
CREATE PROCEDURE [employer_financial].[CreateAccount] @id BIGINT, @name NVARCHAR(100) AS INSERT INTO [employer_financial].[Account] (Id, [Name]) VALUES (@id, @name)
CREATE TABLE IF NOT EXISTS `object_token` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL DEFAULT '', `effective` int(11) NOT NULL DEFAULT 0, `secret_key` varchar(255) NOT NULL, `upload` boolean NOT NULL DEFAULT TRUE, `download` boolean NOT NULL DEFAULT TRUE, `delete` boolean NOT NULL...
<gh_stars>10-100 -- file:rules.sql ln:470 expect:true insert into rtest_view3 select * from rtest_vview3
<filename>ufabc_planner-backend/prisma/migrations/20220423173516_academic_year_cascade_delete/migration.sql -- DropForeignKey ALTER TABLE "quarters" DROP CONSTRAINT "quarters_academy_year_id_fkey"; -- AddForeignKey ALTER TABLE "quarters" ADD CONSTRAINT "quarters_academy_year_id_fkey" FOREIGN KEY ("academy_year_id") RE...
CREATE OR REPLACE PACKAGE dz_testdata_util AUTHID CURRENT_USER AS ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- FUNCTION gz_split( p_str IN VARCHAR2 ,p_regex IN VARCH...
<reponame>mstemen0010/anti-freeze<gh_stars>0 INSERT INTO [Vendor] ([VenID], [ShortDesc], [LongDesc], [AcctsRec], [CurrentList], [Rank], [Group]) VALUES('11', '', 'ADVANCED', 'False', 'False', '0', ''); INSERT INTO [Vendor] ([VenID], [ShortDesc], [LongDesc], [AcctsRec], [CurrentList], [Rank], [Group]) VALUES('12', '', '...
<gh_stars>1-10 --clear data TRUNCATE TABLE core.identifier_source CASCADE ; ALTER SEQUENCE core.identifier_source_id_seq RESTART WITH 2; insert into core.identifier_source(id,identifier,description,identifier_validator_algorithm,base_character_set, first_identifier_base,prefix,suffix,min_length,max_length,...
TRUNCATE TABLE #inclusionRules; DROP TABLE #inclusionRules;
<gh_stars>100-1000 SELECT * FROM GROUPS ORDER BY INSERT_DATETIME %s LIMIT ? OFFSET ?;
<gh_stars>100-1000 SET check_function_bodies = false; INSERT INTO public."UserType" (value, comment) VALUES ('free', 'Free user'); INSERT INTO public."UserType" (value, comment) VALUES ('pro', 'Paid user'); INSERT INTO public."UserType" (value, comment) VALUES ('admin', 'Site administrator'); INSERT INTO public."UserTy...
/************************************************************** * DROP TRIGGERS **************************************************************/ DROP TRIGGER entity_added; DROP TRIGGER entity_updated; DROP TRIGGER entity_removed; /************************************************************** * DROP FUNCTIONS ****...
<filename>t/sql/create_tracklist.sql SET client_min_messages TO WARNING;
CREATE DEFINER=`root`@`localhost` FUNCTION `f_getNextID`(cur_id int) RETURNS int(11) begin declare next_id int; if(cur_id >= all (select so_pm from Phieu_mua_ts)) then set next_id = -1; else set next_id = cur_id + 1; going_next: WHILE next_id not in (select so_pm from Phieu_mua_ts) DO SET next_id = nex...
<gh_stars>10-100 -- This script provides an example of how to extend the SQLite version of the ChEMBL database -- to include a table of RDKit molecule instances, and two support RD-tree index tables that -- can be used to speed-up substructure and similarity queries. -- -- The script can be loaded and executed directl...
<gh_stars>0 use [TOKEN_GVA_SIT] go --TokenDateTime CREATE INDEX TD_INDEX ON [vault].[TokenDateTime] (RepeatableFlag) CREATE INDEX TI_INDEX ON [vault].[TokenInteger] (RepeatableFlag) CREATE INDEX TS_INDEX ON [vault].[TokenString] (RepeatableFlag)
<gh_stars>0 CREATE TABLE `Users` ( `UserID` varchar(32) NOT NULL, `Email` varchar(80) NOT NULL, `Username` varchar(30) NOT NULL, `DOB` date DEFAULT NULL, `FirstName` varchar(40) DEFAULT NULL, `LastName` varchar(40) DEFAULT NULL, `CreatedDate` datetime DEFAULT NULL, PRIMARY KEY (`UserID`), UNIQUE KEY `...
<filename>SQL Scripts/19-import_2015_passenger_numbers.sql -- DROP TABLE IF ALREADY EXISTS DROP TABLE IF EXISTS passenger_numbers; -- CREATE TABLE CREATE TABLE passenger_numbers ( nlc_code NUMERIC, station_name TEXT, station_borough TEXT, note TEXT, weekday_entry NUMERIC, weekday_entry_weight NUMERIC, saturday_entry...
/* Replace with your SQL commands */ CREATE TABLE t_users ( id UUID PRIMARY KEY, name TEXT, session_id UUID REFERENCES t_sessions (id) ON DELETE CASCADE, is_ready BOOLEAN DEFAULT false, UNIQUE (name, session_id) );
<filename>db/schema.sql DROP DATABASE IF EXISTS burgers_db; CREATE DATABASE burgers_db; USE burgers_db; CREATE TABLE burger ( id INT(10) AUTO_INCREMENT, burger_name VARCHAR(50) NOT NULL, devoured BOOLEAN DEFAULT FALSE, PRIMARY KEY(id) );
<gh_stars>0 DELETE FROM agi_oereb_app.egrid_parcel; INSERT INTO agi_oereb_app.egrid_parcel ( geometrie, egrid, "number", identdn ) SELECT l.geometrie AS geometrie, CASE WHEN g.egris_egrid IS NULL THEN 'CH-DUMMY' ELSE g.egris_egrid END AS egrid, g.nummer AS "number", g.nbident AS identdn FROM av_avdpool...
CREATE TABLE "admin" ( "id" SERIAL PRIMARY KEY, "first_name" VARCHAR (40), "last_name" VARCHAR (40), "email" VARCHAR (60), "password" VARCHAR (120) ); CREATE TABLE "categories" ( "id" SERIAL PRIMARY KEY, "category_name" VARCHAR (80) ); CREATE TABLE "gentleman" (     "id" SERIAL PRIMARY KEY...
<filename>migrations/struct/20140709103346-user-nullable.sql ALTER TABLE "users" ALTER COLUMN "name" DROP NOT NULL, ALTER COLUMN "family_name" DROP NOT NULL, ALTER COLUMN "nominative" DROP NOT NULL, ALTER COLUMN "vocative" DROP NOT NULL, ALTER COLUMN "gender" DROP NOT NULL;
DEFINE RECORD CDD$TOP.PR.PR_REG_TAXWH DESCRIPTION IS /*Payroll Tax Register*/. PR_REG_TAXWH_CDD STRUCTURE. /* Element = Description = Employee number */ EMPNUM DATATYPE IS TEXT SIZE IS 10. /* Element = Description = FW, FI, SW, SX, CW, DW, EX ...
SELECT * FROM practice.client; SELECT * FROM practice.invoice; SELECT * FROM practice.product; INSERT INTO practice.product (product_id, product_name, cost, weight_kg, dimensions) VALUES (4, 'ruby', 99999, 1, '10x10'); INSERT INTO practice."order"(order_id, status, order_date, order_client_id) VALUES (4, 'cancelled'...
REVOKE SELECT ON bloomreader.NumTitles FROM bloomreaderuser; DROP VIEW bloomreader.NumTitles CASCADE; CREATE VIEW bloomreader.NumTitles AS SELECT COUNT(*), a.title, row_number() OVER (ORDER BY a.timestamp), a.timestamp, a.Country FROM ( SELECT COUNT(*), d.title, row_number() OVER (ORDER BY d.timestamp), d...
<reponame>eventEmitter/ee-orm-localization DROP SCHEMA IF EXISTS related_localization_test CASCADE; CREATE SCHEMA related_localization_test; CREATE TABLE related_localization_test.venue ( id serial NOT NULL , CONSTRAINT "pk_venue" PRIMARY KEY (id) ); CREATE TABLE related_localization_test.e...
<filename>migrations/0052_default_gateway_config_tables.sql<gh_stars>1-10 -- +migrate Up CREATE TABLE default_gateway_config ( id bigserial, model varchar(32) not null default '', region varchar(32) not null default '', created_at timestamp with time zone not null, updated_at timestamp with time zon...
<filename>src/main/resources/db/migration/V16__city_region_index.sql UPDATE city SET city = 'Krzanowice (miasto)' WHERE id = 31866; UPDATE city SET city = 'Lipno (miasto)' WHERE id = 2482; UPDATE city SET city = 'Stronie Śląskie (miasto)' WHERE id = 513; UPDATE city SET city = 'Poniatowa (miasto)' WHERE id = 7296; UPDA...
<filename>benchmarks/tpcds/schemas/s64da_native_enhanced_partitioned_id_hashed/indexes.sql --create index idx_customer_demographics_1 on customer_demographics (cd_marital_status, cd_education_status); --create index idx_customer_address_1 on customer_address (ca_state, ca_country); --create index id...
<gh_stars>100-1000 CREATE TABLE [dbo].[ProjectStats]( [TeamProjectName] [varchar](200) NOT NULL, [TeamProjectCountWorkItemCreated] [smallint] NOT NULL, [TeamProjectCountWorkItemCompleted] [smallint] NOT NULL, [TeamProjectCountCommitsPushed] [smallint] NOT NULL, [TeamProjectCountPRsCreated] [smallint] NOT NULL, [T...
<reponame>JmPotato/dbgen<filename>tests/data/headers-sql/a.1.sql INSERT INTO a (col1, col2, `col3`, `col``4`, "col5", "col""6", [col7], [col "8"], , ) VALUES (1, 1, 1, 1, 1, 1, 1, 1, 1, 1), (2, 2, 2, 2, 2, 2, 2, 2, 2, 2); INSERT INTO a (col1, col2, `col3`, `col``4`, "col5", "col""6", [col7], [col "8"], , ) VALUES (3, 3...
<gh_stars>100-1000 DROP VIEW IF EXISTS vw_es_award_search CASCADE; CREATE VIEW vw_es_award_search AS ( SELECT * FROM mv_contract_award_search UNION ALL SELECT * FROM mv_directpayment_award_search UNION ALL SELECT * FROM mv_grant_award_search UNION ALL SELECT * FROM mv_idv_award_search UNION ALL SELEC...
-- ----------------------------- -- HeilPHP -- Date : 2018-02-10 06:36 -- ----------------------------- SET FOREIGN_KEY_CHECKS = 0; -- ----------------------------- -- Table structure for `heilphp_config` -- ----------------------------- DROP TABLE IF EXISTS `heilphp_config`; CREATE TABLE `heilphp_config`...
<gh_stars>10-100 SET XACT_ABORT ON; BEGIN TRANSACTION; -- update the version UPDATE usr_schema_version SET version_value='46' WHERE version_key='schema_patch'; DROP INDEX ix_usr_oguser_name ON usr_oguser; ALTER TABLE usr_oguser ADD userid varchar(255); UPDATE usr_oguser SET userid = name; ALTER TABLE usr_...
<reponame>connormcd/misc-scripts<gh_stars>10-100 ------------------------------------------------------------------------------- -- -- PLEASE NOTE -- -- No warranty, no liability, no support. -- -- This script is 100% at your own risk to use. -- -------------------------------------------------------------------------...
CREATE DATABASE IF NOT EXISTS comments; GRANT UPDATE,DELETE,SELECT,INSERT,CREATE ON comments.* TO comments@'localhost' IDENTIFIED BY '(0mM3Nt$EnG!n3'; USE comments; CREATE TABLE IF NOT EXISTS categories( category_id int(10) unsigned NOT NULL auto_increment, category_name varchar(100) NOT NULL, category_prefix ...
alter table DirectoryEntry add constraint UK_bt0b3p8lm8yi06i7ux7ubq4o4 unique (path) alter table MediaEntry add constraint UK_gxy37bxxmxgnvgbkrdo5nv6gk unique (title) alter table SettingsEntry add constraint UK_6dwq37vrquhxaamp63e5dw81h unique (profile) alter table MediaEntry ...
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 14 Jul 2018 pada 13.21 -- Versi server: 5.7.19 -- Versi PHP: 7.1.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET...
------CONSULTA 1----- /*Realizar un stored procedure que devuelva la tabla de posiciones en cualquier momento. Como parámetro debe recibir la temporada (id o año) y tener dos parámetros excluyentes, el número de jornada y la fecha. Si recibe la fecha calcula la tabla a la fecha indicada aun así no haya terminado la jor...
SET GLOBAL local_infile = 1; USE pruebaperu; LOAD DATA LOCAL INFILE "D:\\Basededatos\\schema\\classif.csv" INTO TABLE pruebaperu.clasificaciones FIELDS TERMINATED BY ";" ENCLOSED BY '"' LINES TERMINATED BY "\r\n" IGNORE 1 LINES (`nombre_clasificacion`, `clasificacion_id` ) SET `nombre_clasificacion` = nullif(`nombre_cl...
DROP PROCEDURE IF EXISTS set_global_dynamic; DELIMITER // CREATE PROCEDURE set_global_dynamic(IN pvar CHAR(64), IN pval CHAR(255)) BEGIN CREATE TABLE IF NOT EXISTS mysql.dynamics (variable CHAR(64), value CHAR(255), PRIMARY KEY (variable)); SET @cmd = CONCAT("SET GLOBAL ", pvar, " = '", pval, "'"); PREP...
<filename>Thinking/sql/drawing/fluent_score.sql SELECT `crtuser`, count(`crtuser`) FROM drawing WHERE drawing.`Name` NOT LIKE '' AND drawing.`Name` NOT LIKE '% %' AND drawing.`Name` NOT LIKE '%,%' GROUP by crtuser ORDER BY crtuser ;
-- -- Database: `catalog` -- USE `catalog`; -- -------------------------------------------------------- -- -- Procedures -- -- -------------------------------------------------- -- `logging_info` procedure -- -------------------------------------------------- DROP PROCEDURE IF EXISTS logging_info; DELIMITER | CRE...
CREATE DEFINER=`root`@`localhost` FUNCTION `ConsultarProyecto`(`CodProyecto` INT) RETURNS text LANGUAGE SQL DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT '' BEGIN declare NombreProyecto TEXT; set NombreProyecto=''; #Valor por defecto, por si no encuentra el usuario select mantis_project_table.name in...
<filename>postgres/00-create-extensions.sql \c template1; CREATE EXTENSION IF NOT EXISTS plpgsql; CREATE EXTENSION IF NOT EXISTS hstore;
DROP PROCEDURE IF EXISTS `proc_get_eid_age_breakdown_trends`; DELIMITER // CREATE PROCEDURE `proc_get_eid_age_breakdown_trends` (IN age INT(11), IN from_year INT(11), IN to_year INT(11)) BEGIN SET @QUERY = "SELECT `year`, `month`, `pos`, `neg` FROM `...
-- Lo que quieres mostrar = SELECT -- De donde voy a tomar los datos = FROM -- Los filtros de los datos que quieres mostrar = WHERE -- Los rubros por los que me interesa agrupar mi información = GROUP BY -- El orden en que quiero presentar mi información ORDER BY -- Los filtros que quiero que mis datos agrupados tengan...
CREATE TABLE [dbo].[HistoryTable] ( [Id] INT NOT NULL PRIMARY KEY IDENTITY, [InstanceId] NVARCHAR(50) NOT NULL, [ExecutionId] NVARCHAR(50) NOT NULL, [SequenceNumber] BIGINT NOT NULL, [HistoryEvent] NVARCHAR(MAX) NOT NULL, [EventTimestamp] DATETIME NOT NULL, [TimeStamp] DATETIMEOFFSET NOT ...
<reponame>CSCfi/antero<gh_stars>1-10 USE [ANTERO] GO /****** Object: StoredProcedure [dw].[p_lataa_d_horizon_projektit] Script Date: 15.6.2020 17:05:09 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dw].[p_lataa_d_horizon_projektit] AS TRUNCATE TABLE dw.d_horizon_projektit INSERT INT...
WITH sfdc_pov AS ( SELECT * FROM {{ ref('sfdc_proof_of_value') }} ), sfdc_users AS ( SELECT * FROM {{ref('sfdc_users_xf')}} ), joined AS ( SELECT sfdc_pov.*, owner.name AS pov_owner_name, solarch.name AS solution_architect_name, tam.name AS technical_account_m...
<gh_stars>1-10 -- script for creating a table in given database -- DDL query to create the table CREATE TABLE IF NOT EXISTS first_table (id INT, name VARCHAR(256));
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 26, 2021 at 05:01 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
<gh_stars>1-10 -- -- The ReliefWeb API. -- Prepared SQL queries for 'filter_operator_-post' definition. -- -- -- SELECT template for table `filter_operator_-post` -- SELECT FROM `filter_operator_-post` WHERE 1; -- -- INSERT template for table `filter_operator_-post` -- INSERT INTO `filter_operator_-post`() VALUES (...
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64) -- -- Host: localhost Database: guardartododb -- ------------------------------------------------------ -- Server version 5.7.17-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL...
with accounts as ( select * from {{ref('quickbooks_accounts_xf')}} ), ledger as ( select * from {{ref('quickbooks_general_ledger')}} ), d1 as ( select ledger.*, case when transaction_type = account_type then 1 else -1 end as multiplier from ledger inner join accounts on ledger.accou...
<reponame>jrharalson/almanac.httparchive.org #standardSQL # 09_19c: % valid ARIA attributes # Valid attributes from https://github.com/dequelabs/axe-core/blob/master/lib/commons/aria/index.js CREATE TEMPORARY FUNCTION isValidAttribute(attr STRING) RETURNS BOOLEAN AS (attr IN ('aria-atomic', 'aria-busy', 'aria-controls'...
<filename>query/src/test/resources/query/sql/query62.sql select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV , min(cal_dt) as min_cal_dt , count(*) as TRANS_CNT from test_kylin_fact group by test_kylin_fact.lstg_format_name having sum(price)>5000 and count(*)>72
CREATE TABLE event_participants ( participants_id BINARY(16) NOT NULL, event_id BINARY(16) NOT NULL, PRIMARY KEY (participants_id, event_id), FOREIGN KEY participant_id_join_fk (participants_id) REFERENCES participant (id), FOREIGN KEY event_id_join_fk (event_id) REFERENCES event (id) ) CHARACTER SET utf8mb4 ...
<filename>src/test/tinc/tincrepo/mpp/gpdb/tests/storage/aoco_alter/aoco_alter_scenario_test/sql/largetab-altercol-failvalidate.sql -- -- @created 2014-06-06 12:00:00 -- @modified 2014-06-06 12:00:00 -- @tags storage -- @description Validate that the alter table add/drop column did not work when a 'panic fault' was in...
-- simple batch start CREATE PROCEDURE p8146 AS SELECT 1 GO EXEC p8146 1 GO DROP PROCEDURE p8146 GO begin transaction GO CREATE PROCEDURE p8146 AS SELECT 1 GO EXEC p8146 1 GO -- Below output is only applicable if query is special case. for example, CREATE/ALTER TRIGGER, CREATE/ALTER FUNCTION, CREATE/ALTER PRO...
/* Navicat MySQL Data Transfer Source Server : mysql Source Server Version : 50617 Source Host : localhost:3306 Source Database : wms Target Server Type : MYSQL Target Server Version : 50617 File Encoding : 65001 Date: 2016-08-07 09:54:10 */ SET FOREIGN_KEY_CHECKS=0; -- ---------...
--change_owner method auto increment table owner auto increment serial object owner create class xxx ( a integer auto_increment, b integer ); select * from db_class where class_name='xxx'; select name, owner.name from db_serial where name='xxx_ai_a'; call change_owner('xxx','public') on class db_root; select * f...
SELECT city FROM weather WHERE temp_lo = (SELECT max(temp_lo) FROM weather);
DROP INDEX IF EXISTS index_payments_order_id; DROP INDEX IF EXISTS index_payments_created_by; DROP TABLE IF EXISTS payments;
<gh_stars>0 select gn.id,gn.id -110, count(*) from genes gn join HGT_PAR_FRAGMS hpf on hpf.GENE_ID = gn.id group by gn.id order by count(*) desc
-- Initialize the database. -- Drop any existing data and create empty tables. DROP TABLE IF EXISTS `group`; DROP TABLE IF EXISTS `photo`; DROP TABLE IF EXISTS `user`; DROP TABLE IF EXISTS `cache`; CREATE TABLE `group` (id BIGINT PRIMARY KEY AUTO_INCREMENT,oss_dir TEXT NOT NULL comment 'oss 中的文件路径',created TIMESTAMP N...
<reponame>UMassMedIT/ProfilesRNS SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [RDF.].[GetDataRDF.DebugLog]( [LogID] [int] IDENTITY(1,1) NOT NULL, [subject] [bigint] NULL, [predicate] [bigint] NULL, [object] [bigint] NULL, [offset] [bigint] NULL, [limit] [bigint] NULL, [showDetails] [bit] NULL,...
<gh_stars>100-1000 -- Initial database schema and CREATE TABLE authors ( id int NOT NULL AUTO_INCREMENT, name varchar(100) NOT NULL, biography mediumtext, PRIMARY KEY (id) ) ENGINE=InnoDB; CREATE TABLE books ( id int(11) NOT NULL AUTO_INCREMENT, author_id int NOT NULL, title varchar(100) NOT NULL, i...
<reponame>uwescience/raco select r.a, s.a, t.a from R2 r, R2 s, R2 t where r.b=s.a and s.b=t.a;
<gh_stars>1000+ -- +migrate Up SELECT create_index('workflow_run_tag', 'IDX_WORKFLOW_RUN_TAG_VALUE', 'tag,value'); -- +migrate Down DROP INDEX idx_workflow_run_tag_value;
-- sql from sakai select year(OrderDate) as ThisYear ,[Order_ShipCountry] as Region ,[ProductName] as Product ,[Order_Amount] as Sales into MyCube from ABC_Retail where [Order_ShipCountry] in ('USA','Canada','UK') and [ProductName] in ('Chai','Tofu','Chocolade'); -- create table ...
<reponame>razzium/milo # ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Hôte: 127.0.0.1 (MySQL 5.5.5-10.3.14-MariaDB-1:10.3.14+maria~bionic) # Base de données: db_milo # Temps de génération: 201...
<filename>store-master.sql -- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 01, 2017 at 03:58 PM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTE...
ALTER TABLE [dbo].[ProjectExecutors] ADD CONSTRAINT [ProjectExecutors_Employee_Id_ForeignKeyConstraint] FOREIGN KEY (Employee_Id) REFERENCES dbo.Employees (Id)
<reponame>pepeul1191/codeigniter-webpack-backbone<filename>db/migrations/20191012192521_create_vw_techologies_images.sql -- migrate:up CREATE VIEW vw_technologies_images AS SELECT I.id, I.alt, I.url, TI.technology_id AS technology_id FROM images I JOIN technologies_images TI ON TI.image_id = I.id LIMIT 2000 ...
<filename>server/schema/tables/sets.sql create table if not exists sets ( `id` bigint(20) unsigned primary key auto_increment, `name` varchar(300) not null, `creationDate` timestamp default current_timestamp, `parentId` bigint(20) unsigned null, `childPrefix` varchar(300) null, `ignorePrefix` bo...
INSERT INTO `working_zones` (`id`, `parent_id`, `tier`, `name`, `slug`, `scope`, `status`, `created_at`, `updated_at`) VALUES (78, 57, 1, 'भोर्ले', '', 'vdc', 'Published', '2015-11-13 02:15:02', '2016-05-02 13:42:35'), (79, 57, 1, 'बृद्धिम', '', 'vdc', 'Published', '2015-11-13 02:16:12', '2016-05-02 13:43:03'), (80, 57...
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Oct 19, 2015 at 11:03 PM -- Server version: 5.5.24-log -- PHP Version: 5.3.13 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
use tempdb go create schema testschema go create table t (c1 int) go create procedure testschema.p_test @c int as select * from dbo.t where c1 = @c select * from dbo.t t1 join dbo.t t2 on t1.c1=t2.c1 go ---- step 2 create the plan guide EXEC sp_create_plan_guide @name = N'Guide1', @stmt = N'select * from d...
<reponame>genekuo/fight-churn<gh_stars>100-1000 set search_path = '%schema'; with date_vals AS ( select i::timestamp as metric_date from generate_series('%from_date', '%to_date', '7 day'::interval) i ) insert into metric (account_id,metric_name_id,metric_time,metric_value) select account_id, %metric_name_id, metric...
-- Script: Get-Table.sql -- Description: Returns a list of tables for the current database. -- Reference: https://msdn.microsoft.com/en-us/library/ms186224.aspx SELECT TABLE_CATALOG AS [DATABASE_NAME], TABLE_SCHEMA AS [SCHEMA_NAME], TABLE_NAME,TABLE_TYPE FROM [INFORMATION_SCHEMA].[TABLES]
delimiter / INSERT INTO SEQ_PROTO_CORRESP_TEMPL VALUES (null) / INSERT INTO PROTO_CORRESP_TEMPL (PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,COMMITTEE_ID,FILE_NAME,CORRESPONDENCE_TEMPLATE,UPDATE_USER,UPDATE_TIMESTAMP,OBJ_ID,VER_NBR) VALUES ((SELECT MAX(ID) FROM SEQ_PROTO_CORRESP_TEMPL),(SELECT PROTO_CORRESP_TYPE...
<gh_stars>0 DROP DATABASE IF EXISTS tech_no_blog_db; CREATE DATABASE tech_no_blog_db; USE tech_no_blog_db;
<filename>internal/permission/schema.sql CREATE TABLE IF NOT EXISTS permission_principals ( user_id TEXT COLLATE BINARY NOT NULL, principal TEXT NOT NULL, PRIMARY KEY (user_id, principal) ); CREATE TABLE IF NOT EXISTS permission_paths ( path TEXT COLLATE BINARY NOT NULL, permission TEXT NOT NULL, principa...
create sequence hibernate_sequence start with 1 increment by 1; create table commission ( commission_id bigint not null, commission_request varchar(200) not null, timestamp timestamp not null, waitlist_position integer not null, commissioner_id bigint not null, ...
USE TestDb GO SELECT * FROM [dbo].['12 Jan 13$'] ORDER BY [No.] -- Delete acid information rows ALTER TABLE [dbo].['12 Jan 13$'] DROP COLUMN [F18],[F19],[F20],[F21],[F22],[F23],[F24],[F25] -- Delete rows between balance and location ALTER TABLE [dbo].['12 Jan 13$'] DROP COLUMN [F7],[F11],[F12],[F13],[F1...
drop index if exists data_info_log_2018_idx; drop index if exists data_info_log_2019_idx; drop index if exists data_info_log_2020_idx; drop index if exists data_info_log_2021_idx; drop index if exists data_info_log_2022_idx; drop index if exists data_info_log_2023_idx; drop index if exists data_info_log_2024_idx; drop ...
-- Create SessionEntry CREATE TABLE ofGojaraSessions( username VARCHAR2(255) NOT NULL, transport VARCHAR2(255) NOT NULL, lastActivity NUMBER(10) NOT NULL, PRIMARY KEY (username, transport) ); CREATE INDEX ofGojara_lastActivity_idx ON ofGojaraSessions(lastActivity); -- Update database version UPDATE ofVe...
<gh_stars>1000+ -- Note: the INSERT query works only with cassandra 2.0.7+! -- -- Queries --=========== -- SELECT * FROM auditlog WHERE application_name = '' [AND time ...]; -- PrimaryKey: (application_name), time -- -- INSERT INTO auditlog (event_id, time, action, user_firstname, user_lastname, user_email, user_us...
-- // CLOUD-67249 Introduce recoverymode for cluster -- Migration SQL that makes the change goes here. ALTER TABLE cluster ADD COLUMN recoverymode varchar(255) DEFAULT 'MANUAL'; -- //@UNDO -- SQL to undo the change goes here. ALTER TABLE cluster DROP COLUMN recoverymode;
<reponame>meobilivang/crunchy-containers<filename>examples/kube/pgbench-custom/configs/transactions95.sql /* * Copyright 2019 - 2021 Crunchy Data Solutions, Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a co...
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [Profile.Import].[PRNSWebservice.Funding.GetPersonInfoForDisambiguation] @Job varchar(55), @BatchID varchar(100) AS BEGIN SET NOCOUNT ON; CREATE TABLE #tmp (LogID INT, BatchID VARCHAR(100), RowID INT, HttpMethod VARCHAR(10), URL VARCHAR(50...
<reponame>LuGeorgiev/SoftUniDBBasicMSSQL CREATE TABLE Deleted_Employees( EmployeeId INT PRIMARY KEY IDENTITY, FirstName VARCHAR(50) NOT NULL, LastName VARCHAR(50) NOT NULL, MiddleName VARCHAR(50) , JobTitle VARCHAR(50) NOT NULL, DepartmentId INT FOREIGN KEY REFERENCES Departments(DepartmentID), Salary DECIMAL (15...
<reponame>Gamer-Grad/whdbx_web DROP TABLE IF EXISTS signature_oregas; CREATE TABLE signature_oregas ( sig_id INT, oregas TEXT ); -- ore sites INSERT INTO signature_oregas VALUES (49, 'ark:3,bis:3,cro:20,dar:4,gne:5,hed:10,hem:20,jas:10,ker:20,mer:0,omb:15,pla:10,pyr:1,sco:6,spo:10,vel:30'); -- Average Frontier Deposit...
-- Erases (drops) database if in existence DROP DATABASE IF EXISTS bamazon_DB; -- Creates a new database called bamazonDB CREATE database bamazon_DB; -- Call to use the bamazonDB database USE bamazon_DB; -- creates tables called "products" that contains the inventory CREATE TABLE products ( item_id INTEGER(11) A...
<reponame>Oreder/DBProjectFinal USE Airlines; GO /********************************* TABLE AIRPLANES *********************************/ IF OBJECT_ID('fnGetNumberOfSeats') IS NOT NULL DROP FUNCTION dbo.fnGetNumberOfSeats; GO CREATE FUNCTION [dbo].[fnGetNumberOfSeats](@AirplaneID int) RETURNS int BEGIN RETURN (SELEC...
USE [qichacha] GO /****** Object: Table [dbo].[QichachaCertificate] Script Date: 2016/4/19 21:57:30 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[QichachaCertificate]( [Id] [varchar](100) NOT NULL, [CertificateId] [varchar](50) NULL, [CertificateType] [va...
<gh_stars>1-10 INSERT INTO `LineItemCategories` (`Description`) VALUES ('Additional Funds From Deans Office'); INSERT INTO `LineItemCategories` (`Description`) VALUES ('Buyout Lecturer Replacement Funds'); INSERT INTO `LineItemCategories` (`Description`) VALUES ('Class Cancelled - Funds no longer needed'); INSERT INTO ...
CREATE ROLE fa WITH PASSWORD '<PASSWORD>'; ALTER ROLE fa WITH LOGIN; ALTER ROLE fa WITH SUPERUSER; CREATE DATABASE fullaux; ALTER DATABASE fullaux owner to fa; GRANT ALL PRIVILEGES ON SCHEMA public TO fa;
/* Warnings: - Added the required column `avatar_url` to the `users` table without a default value. This is not possible if the table is not empty. */ -- AlterTable ALTER TABLE "users" ADD COLUMN "avatar_url" TEXT NOT NULL; -- AddForeignKey ALTER TABLE "posts" ADD FOREIGN KEY ("user_id") REFERENCES "users"("...