sql
stringlengths
6
1.05M
<filename>livro_cap1_exemplo13.sql # Exemplo 13: - “Definindo Chave estrangeira ao criar uma tabela” CREATE TABLE avaliacao ( codigoAvalia INTEGER NOT NULL PRIMARY KEY, numMatricula INTEGER, codcurso INTEGER, conceito NUMBER(15,2), CONSTRAINT codcurso_fk FOREIGN KEY (codcurso) REFERENCES cu...
<filename>sql/sql/upgrade/app/flowable.mysql.upgradestep.6.4.0.to.6.4.1.app.sql UPDATE `flowable-sql`.ACT_APP_DATABASECHANGELOGLOCK SET LOCKED = 1, LOCKEDBY = '192.168.3.118 (192.168.3.118)', LOCKGRANTED = '2019-05-23 11:25:51.062' WHERE ID = 1 AND LOCKED = 0; CREATE UNIQUE INDEX ACT_IDX_APP_DEF_UNIQ ON `flowable-sql...
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET search_path = public, pg_catalog; SET default_tablespace = ''; SET default_with_oids = false; -- -- Name: charac...
<reponame>zettadb/zettalib -- Create table with named references constraint and on delete action CREATE TABLE calpont.PART_1453 (p_29 numeric(5,2) primary key, constraint fooby foreign key (p_29) references Customers(p_partkey) on delete restrict) engine=infinidb;
CREATE TYPE public.testtype AS ( field1 text, field2 numeric, field3 text, field4 boolean ); CREATE TABLE public.testtable OF public.testtype ( field2 WITH OPTIONS DEFAULT 5000, field4 WITH OPTIONS NOT NULL );
<gh_stars>1-10 SELECT pcj.PkgId, pcj.CategoryId, pcj.Container, pcj.CreatedBy, pcj.Created, pcj.ModifiedBy, pcj.Modified, pcj.Lsid, pcj.Objectid FROM snd.PkgCategoryJunction pcj
create table documents( document_id varchar(40) primary key, customer_id varchar(40), type varchar(120), content_type varchar(40), uploaded_at datetime, deleted_at datetime );
-- auto Generated on 2021-04-01 -- DROP TABLE IF EXISTS person; CREATE TABLE person( id INT (11) NOT NULL AUTO_INCREMENT COMMENT 'id', pid VARCHAR (50) NOT NULL DEFAULT '' COMMENT 'pid', `number` VARCHAR (50) NOT NULL DEFAULT '' COMMENT 'number', PRIMARY KEY (id) )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT 'pers...
<reponame>elementary-data/dbt-data-reliability<gh_stars>10-100 {{ config( materialized = 'incremental', transient=False, unique_key = 'model_execution_id', on_schema_change = 'append_new_columns' ) }} {{ elementary.get_dbt_run_results_empty_table_query() }}
<filename>Scripts and Tools/ConfigureTempDB.sql /************************************************************************************************************************ Created: 2015-03-01 Version: 1.1 Homepage: http://deploymentfundamentals.com Disclaimer: This script is provided "AS IS" with no warranties, con...
USE SoftUni GO CREATE PROC usp_GetEmployeesSalaryAbove35000 AS SELECT FirstName, LastName FROM Employees WHERE Salary > 35000 EXEC usp_GetEmployeesSalaryAbove35000
<reponame>Slevian/posta<filename>posta.sql /* SQLyog Enterprise - MySQL GUI v8.14 MySQL - 5.6.20 : Database - posta ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHEC...
use master go IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_NAME = 'GetVolumeInfo2') begin EXEC ('CREATE PROC dbo.GetVolumeInfo2 AS SELECT ''PCR code''') end go ALTER PROCEDURE [dbo].[GetVolumeInfo2] ( @pCOLUMN_NAME varchar(128) = '' ) /* *********************************...
<filename>app/vendor.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 1172.16.58.3 -- Generation Time: Aug 21, 2021 at 01:30 AM -- Server version: 10.4.20-MariaDB -- PHP Version: 8.0.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; ...
SELECT * FROM cts.cts_protocols WHERE create_date LIKE '%2017';
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64) -- -- Host: localhost Database: hoa -- ------------------------------------------------------ -- Server version 5.7.18-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!...
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for tbl_order -- ---------------------------- DROP TABLE IF EXISTS `tbl_order`; CREATE TABLE `tbl_order` ( `uuid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '1', `code` varchar(255) CHARAC...
create database if not exists `hinny-security` default character set = utf8; use `hinny-security`; /* ==================================================================================================================== domain -- 数据域 =================================================================================...
<gh_stars>1-10 CREATE PROCEDURE [dbo].[uspGetExternalServices] AS SELECT [ID] 'ServiceId' ,[ServiceName] ,[ServiceShortName] ,[ServiceDescription] ,[IsEmployerAllowed] ,[IsTrainingProviderAllowed] ,[IsThirdPartyAllowed] FROM [ExternalService]
-- file:matview.sql ln:115 expect:true CREATE VIEW mvtest_vt1 AS SELECT 1 moo
<filename>src/main/resources/db/schema-h2.sql<gh_stars>10-100 -- DROP TABLE IF EXISTS T_KAKFA_USER; -- kafka ACL启用SASL_SCRAM中的用户 CREATE TABLE IF NOT EXISTS T_KAFKA_USER ( ID IDENTITY NOT NULL COMMENT '主键ID', USERNAME VARCHAR(50) NOT NULL DEFAULT '' COMMENT '用户名', PASSWORD VARC...
<gh_stars>1000+ -- 2017-11-24T13:37:48.762 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_RelationType (AD_Client_ID,AD_Org_ID,AD_RelationType_ID,Created,CreatedBy,EntityType,IsActive,IsDirected,Name,Updated,UpdatedBy) VALUES (0,0,540196,TO_TIMESTAMP('2017-11-24 13:37:48','YYYY-MM-DD H...
<filename>backend/de.metas.serviceprovider/src/main/sql/postgresql/system/45-de.metas.serviceprovider/5557180_sys_gh5816-app_default_filter_adjustments.sql -- 2020-04-14T09:38:54.261Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Reference_ID=16, FieldLength=20,Updated=TO_TIM...
<filename>w/extensions/FlaggedRevs/backend/schema/mysql/patch-flaggedrevs_promote.sql -- This stores user demotions and stats CREATE TABLE /*$wgDBprefix*/flaggedrevs_promote ( -- Foreign key to user.user_id frp_user_id integer unsigned NOT NULL, frp_user_params mediumblob NOT NULL default '', PRIMARY KEY (fr...
<gh_stars>1-10 drop table if exists review cascade; create table review ( id uuid not null, product_id uuid, reviewer varchar(255), text varchar(255), primary key (id) );
<reponame>ignatev/hard-core CREATE DATABASE hardcore; USE hardcore; CREATE TABLE IF NOT EXISTS City ( id integer NOT NULL, name varchar(120) NOT NULL, countrycode character(3) NOT NULL, ...
-- ============================================= -- Author: <NAME> -- Create date: 2020-05-13 -- Updates: -- Deleting submission entries in all relevant tables on or before May 06 2020. -- ============================================= USE HMR_DEV; -- uncomment appropriate instance --USE HMR_TST; --USE HMR_UAT; --...
-- readings. CREATE TABLE IF NOT EXISTS readings( rid serial, ssid varchar(256), provider varchar(512), record_start timestamp, record_end timestamp, record_duration int, speed_download numeric, speed_upload numeric );
<gh_stars>1-10 -- datetime, other select coalesce(datetime'01/01/2000', datetime'01/02/2000'); select coalesce(datetime'01/01/2000', timestamp'01/02/2000'); select coalesce(datetime'01/01/2000', date'01/02/2000'); select coalesce(datetime'01/01/2000', time'00:00:00'); select coalesce(datetime'01/01/2000', '01/02...
-- 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 */; /...
<filename>sql/init.sql CREATE TABLE users ( id bigserial NOT NULL, color character varying(255) NOT NULL, group_id bigint NOT NULL, name character varying(255) NOT NULL, surname character varying(255) NOT NULL, CONSTRAINT users_pkey PRIMARY KEY (id) ); CREATE TABLE currency ( id bigserial NOT NULL, nam...
create schema if not exists flashcrow_dev_data; -- MATERIALIZED VIEW SCHEMAS drop table if exists flashcrow_dev_data.counts_arteries_centreline; drop table if exists flashcrow_dev_data.gis_hospital; drop table if exists flashcrow_dev_data.gis_school; drop table if exists flashcrow_dev_data.location_search_centrelin...
<gh_stars>0 INSERT INTO burgers (burger_name, devoured) VALUES ("Baby You Can Chive My Car Burger", false); INSERT INTO burgers (burger_name, devoured) VALUES ("Don't be Bacon my Heart, Cheese Burger", false); INSERT INTO burgers (burger_name, devoured) VALUES ("Turkey Burger", false); INSERT INTO burgers (burger_na...
DELETE SEJOUR WHERE NO_RESERVATION = 16; DELETE RESERVATION WHERE NO_RESERVATION = 16;
<gh_stars>0 /****** Object: Table [dbo].[Program] Script Date: 26/04/2017 11:59:26 ******/ DROP TABLE [dbo].[Program] GO
<reponame>MHayet/Bankonet insert into client(Nom, Prenom, Login, MDP, Identifiant) values ("Kirigaya","Kazuto","kirito","asuna","KirigayaKazuto"), ("Yuki","Asuna","asuna","kirito","YukiAsuna"), ("Kirigaya","Suguha","leaffa","alo","KirigayaSuguha"); insert into comptecourant(Numero, Intitule, Solde, DecouvertMaximum) v...
USE learning_pointers; INSERT INTO users (password, email, name) VALUES ('nu', 'imi', 'pasa'); INSERT INTO users (password, email, name) VALUES ('si', 'totusi', 'nu'); INSERT INTO users (password, email, name) VALUES ('desi', 'poate', 'ar trebui'); LOCK TABLES `courses` WRITE; INSERT INTO `courses` VALUES (1,'lorem',3...
CREATE OR REPLACE FUNCTION openclinica_fdw.dm_create_dm_subject_event_crf_join() RETURNS VOID AS $BODY$ BEGIN EXECUTE $query$ CREATE MATERIALIZED VIEW dm.subject_event_crf_join AS SELECT e.study_name, e.site_oid, s.site_name, s.subject_person_i...
<reponame>Adwip/BumdesApp -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 06, 2020 at 09:16 AM -- Server version: 10.1.40-MariaDB -- PHP Version: 7.3.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "...
<reponame>jdkoren/sqlite-parser -- fkey2.test -- -- execsql { -- CREATE TEMP TABLE t1(a PRIMARY KEY); -- CREATE TEMP TABLE t2(a, b); -- } CREATE TEMP TABLE t1(a PRIMARY KEY); CREATE TEMP TABLE t2(a, b);
<gh_stars>1000+ -- 2018-12-18T14:18:54.951 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2018-12-18 14:18:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=563716 ; -- 2018-12-18T14:18:55.745 -- I forgot to set the DICTIONARY_ID...
 -- 2017-12-21T13:51:28.404 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('C_BPartner','ALTER TABLE public.C_BPartner ADD COLUMN IsSourceSupplyCert CHAR(1) DEFAULT ''N'' CHECK (IsSourceSupplyCert IN (''Y'',''N'')) NOT NULL') ;
<reponame>leetsao1/Employee-Tracker DROP DATABASE IF EXISTS employee_trackerDB; CREATE DATABASE employee_trackerDB; USE employee_trackerDB; -- TABLE ONE CREATE TABLE departments( id INTEGER (10) AUTO_INCREMENT, name VARCHAR (30), PRIMARY KEY (id) ); -- TABLE TWO CREATE TABLE role( id INTEGER (10) AU...
ALTER TABLE "public"."zones_stats" ALTER COLUMN "ibc_tx_out_mainnet_rating_diff" SET NOT NULL;
<reponame>blinkops/blink-aws-query select db_snapshot_identifier, arn, type, encrypted from aws.aws_rds_db_snapshot where db_snapshot_identifier = 'dummy-{{ resourceName }}'
<gh_stars>0 \d+ p_diff_aligned_varlena
<filename>meenspy.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : ven. 05 avr. 2019 à 04:53 -- Version du serveur : 10.1.26-MariaDB -- Version de PHP : 7.1.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET...
<gh_stars>0 DECLARE @table VARCHAR(256) set @table = 'xxx' DECLARE @index VARCHAR(256) set @index = 'zzz' PRINT 'Delete index [' + @index + '] for table [' + @table + ']' IF EXISTS ( SELECT * FROM sys.indexes i INNER JOIN sys.objects o on i.object_id = o.object_id WHERE i.name = @index AND o.name = @table ) BEGIN...
-- @testpoint:opengauss关键字is(保留),作为角色名 --关键字不带引号-合理报错 drop role if exists is; create role is with password '<PASSWORD>' valid until '2020-12-31'; --关键字带双引号-成功 drop role if exists "is"; create role "is" with password '<PASSWORD>' valid until '2020-12-31'; --清理环境 drop role "is"; --关键字带单引号-合理报错 drop role if exists 'i...
<filename>src/test/regress/sql/ce_type_binarys.sql \! gs_ktool -d all \! gs_ktool -g DROP CLIENT MASTER KEY IF EXISTS binaryCMK CASCADE; CREATE CLIENT MASTER KEY binaryCMK WITH ( KEY_STORE = gs_ktool , KEY_PATH = "gs_ktool/1" , ALGORITHM = AES_256_CBC); CREATE COLUMN ENCRYPTION KEY binaryCEK WITH VALUES (CLIENT_MASTE...
SELECT 'This is a test script to test new workflow.' GO USE [MillennialResort_DB] GO print '' print 'Inserting Departments' GO INSERT INTO [Department] ( [DepartmentID], [Description] ) VALUES ("Everything", "They do everything.") GO print '' print 'Inserting Employee' GO INSERT INTO [Employee] ( [FirstName], [La...
<gh_stars>0 START TRANSACTION; INSERT INTO role (id, name, description) VALUES (uuid_generate_v4(), 'admin', 'Grants all permisions without scope'), (uuid_generate_v4(), 'maintainer', 'Grants read/write permissions on accounts, releases and deployments for a registry or namepsace'), (uuid_generate_v4(), 'develop...
with OriginalTables as ( select s.name + '.' + o.name QualifiedTableName from sys.objects o join sys.schemas s on s.schema_id = o.schema_id where type = 'u' and s.name = 'safran' and o.name not like '%staging%' and o.name not like '%a2o%' and o.name not like '%v3%' ) , A2oTables a...
 INSERT INTO [dbo].[Courses] ([CourseName]) VALUES ('Chemistry'),('Algebra'),('Physics'),('Astronomy') GO INSERT INTO [dbo].[Students] ([FirstName] ,[LastName]) VALUES ('Vasiliy','Petrov'), ('Petr','Stepanov'), ('Aleksandr','Matrosov'), ('Stepan','Pechkin...
<filename>DatabaseScripts/InsertInitData.sql USE StudentDb GO INSERT INTO Students (Id, FirstName, LastName) VALUES (1, 'jon', 'doe'), (2, 'bob', 'miler'), (3, 'mita', 'roy'), (4, 'rahul', 'roy'), (5, 'mukul', 'dev')
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th5 05, 2021 lúc 01:32 PM -- Phiên bản máy phục vụ: 10.4.14-MariaDB -- Phiên bản PHP: 7.4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
<reponame>karthisgk/quiz<filename>quiz.sql -- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 02, 2018 at 03:17 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @...
ALTER TABLE uris ADD CONSTRAINT id_ne_data CHECK (id <> data);
<reponame>BrunoLopes20/Estudo-Quarkus //INSERT INTO Car (Id) //VALUES (1);
<reponame>navikt/veilarbdialog<filename>src/test/resources/db/testdata/dialog.sql<gh_stars>0 insert into DIALOG (DIALOG_ID, AKTOR_ID, OPPDATERT) values (123, '12345', current_timestamp);
EXEC [EST].[Proc_yjbb_Ins] @Code = N'601336',@CutoffDate = N'2017-09-30',@EPS = N'1.62',@EPSDeduct = N'1.64',@Revenue = N'1155.61亿',@RevenueYoy = N'-1.89',@RevenueQoq = N'18.52',@Profit = N'50.42亿',@ProfitYoy = N'5.35',@ProfiltQoq = N'28.93',@NAVPerUnit = N'20.3878',@ROE = N'8.18',@CashPerUnit = N'1.3891',@GrossProfitR...
-- MySQL dump 10.13 Distrib 5.1.73, for redhat-linux-gnu (x86_64) -- -- Host: localhost Database: fcgi_app_core -- ------------------------------------------------------ -- Server version 5.1.73 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE...
INSERT INTO `msg_audit_database`.`fac_crit` (`id`, `reference_id`, `name`, `goal`) VALUES ('1', NULL, '1 Effektivität', 'Genauigkeit und Vollständigkeit mit dem Nutzerinnen und Nutzer spezifische Ziele erreichen.'); INSERT INTO `msg_audit_database`.`fac_crit` (`id`, `reference_id`, `name`, `goal`) VALUES ('2', NULL, '2...
ALTER TABLE ski_lift_schedules DROP COLUMN opens_time; ALTER TABLE ski_lift_schedules ADD COLUMN opens_time TIME WITHOUT TIME ZONE; ALTER TABLE ski_lift_schedules DROP COLUMN closes_time; ALTER TABLE ski_lift_schedules ADD COLUMN closes_time TIME WITHOUT TIME ZONE; INSERT INTO price_lists (id_price_list, start_d...
<reponame>reisvini1/ceubexpress-back /* Warnings: - You are about to drop the column `product_id` on the `purchase` table. All the data in the column will be lost. - You are about to drop the column `user_id` on the `purchase` table. All the data in the column will be lost. */ -- AlterTable ALTER TABLE `purchas...
INSERT INTO "_JutsuToNatureType" ("A", "B") VALUES (2, 1), (2, 4), (2, 8), (4, 1), (4, 2), (4, 3), (4, 4), (4, 9), (4, 10), (5, 3), (8, 4), (10, 2), (18, 4), (22, 8), (32, 2), (33, 3), (35, 21), (36, 21), (37, 21), (38, 21), (39, 12), (40, 9), (46, 2), (46, 21), (53, 11), (56, 7), (62, 15), (63, 3), (63, 24), (64, 2), ...
-- -- create tables -- CREATE TABLE products ( id INTEGER PRIMARY KEY AUTOINCREMENT, code VARCHAR(7), name VARCHAR(255), brand_id VARCHAR(255), voorraad_id VARCHAR(255), color VARCHAR(255), categorie_id VARCHAR(255), description TEXT, price NUMERIC(10, 2) ); CREATE TABLE brand ( id INTEGER PRIMARY ...
-- Query for: 28. Network Policy Information show network policies;
<gh_stars>10-100 -- file:insert.sql ln:5 expect:true insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT, DEFAULT)
<reponame>blenderskool/diode<filename>prisma/migrations/20211114143143_/migration.sql -- DropForeignKey ALTER TABLE "ApiRoute" DROP CONSTRAINT "ApiRoute_projectId_fkey"; -- DropForeignKey ALTER TABLE "Secret" DROP CONSTRAINT "Secret_projectId_fkey"; -- AddForeignKey ALTER TABLE "ApiRoute" ADD CONSTRAINT "ApiRoute_pro...
CREATE TABLE [dbo].[Songs]( [FileID] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY CLUSTERED, [Title] [nvarchar](256) NOT NULL, [Artist] [nvarchar](256) NULL, [AlbumArtist] [nvarchar](256) NULL, [Album] [nvarchar](256) NULL, [Composer] [nvarchar](256) NULL, [Genre] [nvarchar](256) NULL, [Year] [int] NULL, [Track] ...
<gh_stars>0 CREATE TABLE [dbo].[TBL_ROLE]( [ROLE_ID] [nvarchar](50) NOT NULL, [DESCRIPCION] NVARCHAR(100) NOT NULL, [HOMEPAGE] NVARCHAR(100) NOT NULL, [ESTADO] NVARCHAR(10) NOT NULL, CONSTRAINT [PK_TBL_ROLE] PRIMARY KEY ([ROLE_ID]) )
<reponame>unachoza/Cancel-RKelly-with-Spotify-Auth<filename>db/schema.sql DROP DATABASE cancel; CREATE DATABASE cancel; \c cancel; CREATE TABLE songs( id SERIAL PRIMARY KEY, name text NOT NULL, artist text NOT NULL, deleted BOOLEAN ); CREATE TABLE users( id SERIAL PRIMARY KEY, display_name text NOT NULL, email text ...
<gh_stars>0 select user_id , user_guid , first_name , last_name , hashed_email , hashed_phone_number , hashed_address , zipcode , state , country , created_at_utc from {{ ref('stg_users') }} left join {{ ref('int_hashed_pii') }} using(user_guid) left join {{ ref('stg_addresses') }} using(address_g...
CREATE TABLE [HumanResources].[EmployeeData]( [FirstName] [dbo].[Name] NOT NULL, [MiddleName] [dbo].[Name] NULL, [LastName] [dbo].[Name] NOT NULL, [Suffix] [nvarchar](10) NULL, [JobTitle] [nvarchar](50) NOT NULL, [PhoneNumber] [dbo].[Phone] NULL, [PhoneNumberType] [dbo].[Name] NULL, [EmailAddress] [nvar...
DROP TABLE DATABASECHANGELOG; DROP TABLE DATABASECHANGELOGLOCK;
CREATE DATABASE Tracker; CREATE TABLE Roles ( Role_ID serial primary key, Role varchar(2000) NOT NULL UNIQUE ); CREATE TABLE Rules ( Rule_ID serial primary key, Rule varchar(2000) NOT NULL UNIQUE ); CREATE TABLE Users ( User_ID serial primary key, Full_name varchar(2000) NOT NULL, Role_ID integer refer...
<reponame>dnvriend/spring-boot-study drop table people if exists; drop sequence if exists hibernate_sequence; create sequence hibernate_sequence start with 1 increment by 1; create table people (id bigint not null, age integer, date_of_birth date, created timestamp, updated timestamp, name varchar(255), primary key (id...
DELIMITER ;; CREATE PROCEDURE `createKeyGroup_adminer_55b00388b299c` (IN `key_count` int, IN `min_val` int) BEGIN DECLARE i INT; SET i = 0; START TRANSACTION; WHILE i <= key_count DO CALL insertSessionKey(min_val + i); SET i = i + 1; END WHILE; COMMIT; END;; DELIM...
with data as ( select * from {{ ref('data_date_trunc') }} ) {% if target.type == 'sqlserver' %} select {{dbt_utils_sqlserver.date_trunc('day', 'updated_at') }} as actual, day(day) as expected from data union all select {{ dbt_utils_sqlserver.date_trunc('month', 'updated_at') }} as actual, ...
<reponame>kuro-channel/knowledge-1 SELECT NOTICES.* FROM NOTICES WHERE NOTICES.START_DATETIME < now() AND NOTICES.END_DATETIME > now() AND NOTICES.DELETE_FLAG = 0
<reponame>mholck/cql_engine library LogicalOperator version '1' //And define TrueAndTrue : true and true define TrueAndFalse : true and false define TrueAndNull : true and null define FalseAndTrue : false and true define FalseAndFalse : false and false define FalseAndNull : false and null define NullAndTrue : null and...
<filename>patches/data_base_04.sql CREATE TABLE public.proccessed_content_table ( userId serial NOT NULL, file_name varchar(40) NOT NULL, doi varchar(64) NOT NULL, unprocessed_id int NULL, time_stamp varchar(20) NOT NULL DEFAULT to_char(CURRENT_TIMESTAMP, 'YYYY-MM-DD HH:MM'::text) ); ALTER TABLE public.proccessed...
CREATE TABLE [dbo].[B_Inspection] ( [Id] INT IDENTITY (1, 1) NOT NULL, [Entitlement] NVARCHAR (255) NULL, [Comments] NVARCHAR (255) NULL, [FromDate] DATETIME2 (7) NULL, [ToDate] DATETIME NULL, [Status] INT NULL, [C_Date] DATETIME ...
-- --- -- Globals -- --- -- SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- SET FOREIGN_KEY_CHECKS=0; -- --- -- Table 'restaurant' -- -- --- DROP TABLE IF EXISTS `restaurant`; CREATE TABLE `restaurant` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `id_cuisine` INTEGER NOT NULL, `name` VARCHAR(255) NULL DEFAULT NULL, ...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.6.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: -- Версия на сървъра: 10.1.13-MariaDB -- PHP Version: 5.6.21 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 -- USE employee_tracker; -- select department.id, first_name, last_name, title, department_id, salary, manager_id -- from department -- left join role on department.id = role.department_id -- left join employee on role.id = employee.role_id -- USE employee_tracker; -- SELECT employee.id, employee.first_nam...
-- MySQL dump 10.13 Distrib 8.0.21, for macos10.15 (x86_64) -- -- Host: 127.0.0.1 Database: asopf_db -- ------------------------------------------------------ -- Server version 8.0.22 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *...
create trigger Cofoundry.PageDirectory_CascadeDelete on Cofoundry.PageDirectory instead of delete AS begin set nocount on; if not exists (select * from deleted) return declare @DefinitionCode char(6) = 'COFDIR' declare @PageDirectoryToDelete table (PageDirectoryId int); with cteExpandedDirectories as ( ...
-- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64) -- -- Host: localhost Database: tcc -- ------------------------------------------------------ -- Server version 8.0.16 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!4010...
DROP INDEX IF EXISTS lists_is_public_idx;
copy (Select distinct route_id, shape_id from trips) to '/Users/matt/FindMyBus/api/model/json/shapes.csv' With CSV DELIMITER ',';
/********************************************************************************************************************** * Change Control: 29/07/2011 - <NAME> - Excludes accessory orders from the Segments in the header. * 02/04/2012 - <NAME> - Accessory orders are now included * 22...
-- http://www.postgresql.org/docs/current/interactive/populate.html \set ON_ERROR_STOP true BEGIN; SET TIMEZONE=:'il_time_zone'; -- get rid of all the original data (cascades throughout app) TRUNCATE "il_stop" RESTART IDENTITY CASCADE; TRUNCATE "il_agency" RESTART IDENTITY CASCADE; -- import stops \set import_file...
SELECT TOP(2) w.DepositGroup FROM WizzardDeposits AS w GROUP BY w.DepositGroup ORDER BY AVG(w.MagicWandSize)
<gh_stars>10-100 -- file:gin.sql ln:36 expect:true vacuum gin_test_tbl
--! Previous: sha1:36ad057449551ddbeed33661df7ff3cf44537845 --! Hash: sha1:faf8e52c35c4d58571992e00cd625029b4aa8d83 --! split: 1-current.sql -- Enter migration here ALTER TABLE app_public.items DROP CONSTRAINT items_flavor_check; ALTER TABLE app_public.items ADD CONSTRAINT items_flavor_check CHECK ( (length(flavor...
<reponame>leo-leong/wwt-scheduler<filename>Microsoft.Sample.Automation/SchedulingStore/dbo/Tables/SchedulingPool.sql<gh_stars>0 -- Creating table 'SchedulingPool' -- Creating table 'SchedulingPool' CREATE TABLE [dbo].[SchedulingPool] ( [Id] int IDENTITY(1,1) NOT NULL, [ScheduleID] bigint NOT NULL, [Dispat...
alter table mailer.message add constraint ck_mailer_message_body_type check ( body_type in ( 'MIME', 'PLAIN', 'XML' ) );
-- phpMyAdmin SQL Dump -- version 4.4.12 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 07, 2015 at 10:34 PM -- Server version: 5.6.25 -- PHP Version: 5.6.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; SET time_zone = "+00:00"; CREATE DATABASE IF NOT EXISTS `turn_tracker` D...