text
stringlengths
1
1.05M
BEGIN TRANSACTION; CREATE TABLE queue ( queue_id INTEGER PRIMARY KEY AUTOINCREMENT, queue_name VARCHAR(100) NOT NULL, timeout INTEGER NOT NULL DEFAULT 30 ); CREATE TABLE message ( message_id INTEGER PRIMARY KEY AUTOINCREMENT, queue_id INTEGER, handle CHAR(32), body VARCHAR(8192) NOT NULL, md5 CHAR(32) N...
CREATE TABLE SAKSSTATISTIKK_MELLOMLAGRING ( ID BIGINT NOT NULL PRIMARY KEY, OFFSET_VERDI BIGINT NOT NULL, FUNKSJONELL_ID VARCHAR NOT NULL, TYPE VARCHAR NOT NU...
CREATE TABLE NATION ( N_NATIONKEY INTEGER NOT NULL, N_NAME CHAR(25) NOT NULL, N_REGIONKEY INTEGER NOT NULL, N_COMMENT VARCHAR(152) );
drop schema nass cascade; create schema nass; set search_path=nass,public; -- Now we start to build our tables -- Crosswalk between counties and ag_districts create table location as select distinct (state_fips_code||county_code)::varchar(12) as location, county_name||', '||state_alpha as name from usda_region ...
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- 主机: localhost -- 生成日期: 2013 年 08 月 10 日 08:42 -- 服务器版本: 5.6.12-log -- PHP 版本: 5.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACT...
INSERT INTO WorkerSkill (WorkerNumber, SkillCategoryId, SkillId, SkillLevel) VALUES (N'10000', N'26', N'4', N'novice'); INSERT INTO WorkerSkill (WorkerNumber, SkillCategoryId, SkillId, SkillLevel) VALUES (N'10000', N'34', N'3', N'intermediate'); INSERT INTO WorkerSkill (WorkerNumber, SkillCategoryId, SkillId, SkillLeve...
CREATE TABLE fruits ( id int, items jsonb ); INSERT INTO fruits VALUES (1, '["apple"]'); INSERT INTO fruits VALUES (2, '["banana", "apple"]'); INSERT INTO fruits VALUES (3, '["peach"]'); CREATE INDEX pgroonga_index ON fruits USING pgroonga (items pgroonga.jsonb_ops); SET enable_seqscan = off; SET enable_indexs...
\set ON_ERROR_STOP 0 \c single :ROLE_SUPERUSER SET client_min_messages = ERROR; DROP TABLESPACE IF EXISTS tablespace1; DROP TABLESPACE IF EXISTS tablespace2; SET client_min_messages = NOTICE; --test hypertable with tables space CREATE TABLESPACE tablespace1 OWNER :ROLE_DEFAULT_PERM_USER LOCATION :TEST_TABLESPACE1_PAT...
DROP DATABASE IF EXISTS love_db; CREATE DATABASE love_db;
CREATE TABLE IF NOT EXISTS `leonafx_accounts` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` varchar(16) NOT NULL, `username` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, `hwid` text NOT NULL, `hwid_status` int(1) NOT NULL DEFAULT 1, `email` text NOT NULL, `ip` varchar(50) NOT NULL, `ra...
ALTER TABLE taxa ADD COLUMN marine_flag boolean NOT NULL DEFAULT false; COMMENT ON COLUMN taxa.marine_flag IS 'Set to true for marine species.';
------------------------------------------------------------------------------------------------------- -- the following insert statements populate some data for the Javalin Bank ------------------------------------------------------------------------------------------------------- --1 ADDTING THE MAIN 2 ROLES insert...
delete from Todo where Todo.id = $1
SET @s := '{ { set @x := 3; } } '; call run(@s); SELECT @x = 3;
CREATE TABLE article ( article_id INT NOT NULL AUTO_INCREMENT, article_name varchar(20) NOT NULL, article_desc text NOT NULL, primary key (article_id) );
SELECT * FROM LOCALES ORDER BY INSERT_DATETIME %s;
set current_schema=vector_engine; set enable_nestloop=off; set enable_vector_engine=off; explain (costs off) select o_orderpriority, count(*) as order_count from orders where o_orderdate >= '1993-07-01'::date and o_orderdate < '1993-07-01'::date + interval '3 month' and exists ( select * from lineitem ...
DROP TABLE IF EXISTS t1; DROP SEQUENCE IF EXISTS s1; CREATE SEQUENCE s1; CREATE TABLE t1 ( a INT DEFAULT(NEXT VALUE FOR s1), b INT, PRIMARY KEY (a) ); INSERT INTO t1 (b) VALUES (5), (7); INSERT INTO t1 (b) VALUES (8); SELECT * FROM t1;
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Sep 28, 2017 at 07:08 AM -- Server version: 5.6.12-log -- PHP Version: 5.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
CREATE TRIGGER test_trigger ON posts AFTER UPDATE AS RAISERROR ('error', 1, 1) DROP TRIGGER test_trigger
-- file:xml.sql ln:87 expect:true SELECT xmlpi(name xmlstuff)
-- This SQL code was generated by sklearn2sql (development version). -- Copyright 2018 -- Model : CaretClassifier_svmPoly -- Dataset : BreastCancer -- Database : db2 -- This SQL code can contain one or more statements, to be executed in the order they appear in this file. -- Model deployment code WITH kernel_inp...
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 26, 2019 at 07:18 PM -- Server version: 10.1.32-MariaDB -- PHP Version: 7.2.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
use payroll execute p_issue_paycheck @employee_id=5, @payperiod_id='20190215' execute p_issue_paycheck @employee_id=1, @payperiod_id='20190215' execute p_issue_paycheck @employee_id=39, @payperiod_id='20190215' execute p_issue_paycheck @employee_id=12, @payperiod_id='20190215' execute p_issue_paycheck @employee_id=53...
CREATE DATABASE mulas; \c mulas CREATE TABLE news( id SERIAL PRIMARY KEY, title VARCHAR, content VARCHAR, departmentId INTEGER ); CREATE TABLE users( id SERIAL PRIMARY KEY, name VARCHAR, userPosition VARCHAR, role VARCHAR, departmentId INTEGER ); CREATE TABLE departments( id ...
drop table if exists carlist; create table carlist ( id bigint not null auto_increment, name varchar(255), color varchar (45), primary key (id));
----------------------------------------------------------------------------------- -- -- Copyright "2015" "Wuppertal Institut" -- ...
-- MySQL Script generated by MySQL Workbench -- ter 02 fev 2021 17:17:42 -03 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE...
-- 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'Dropping [edfi].[StudentOtherName_DF_Creat...
CREATE TABLE `dmarc_scheduled_records` ( `id` varchar(255) NOT NULL, `last_checked` datetime NOT NULL, PRIMARY KEY (`id`), KEY `idx_last_checked` (`last_checked`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Revert FilterType to the version in the previous migration 20200103101609_TableTypes.sql CREATE TYPE FilterType AS TABLE ( Id UNIQUEIDENTIFIER NOT NULL, Hint VARCHAR(MAX) NOT NULL, Label VARCHAR(MAX) NOT NULL, Name VARCHAR(MAX) NOT NULL, SubjectId UNIQUEIDENTIFIER...
USE [perpetuumsa] GO ----------------------------------------------- --OPP 2 Year of LIVE server anniversary gifts! --New robot definition --New Package and gifts --Procedure call to distribute gifts --Date: 2020/04/07 ----------------------------------------------- DECLARE @botName VARCHAR(100); SET @botName = 'def_...
DROP TABLE projects CASCADE; DROP TABLE workspaces; DROP TABLE project_models; ALTER TABLE experiments DROP COLUMN project_id; DROP INDEX IF EXISTS ix_experiments_project_id; DROP INDEX IF EXISTS ix_projects_workspace_id; DROP INDEX IF EXISTS ix_projects_user_id; DROP INDEX IF EXISTS ix_project_models_project_id; DROP...
CREATE TABLE antonia_responses_config ( id SMALLINT PRIMARY KEY, nsfw_config JSON NOT NULL, sfw_config JSON NOT NULL );
Wow64CsrClientConnectToServer,6 Wow64CsrNewThread,0 Wow64CsrIdentifyAlertableThread,0 Wow64CsrClientCallServer,4 Wow64CsrAllocateCaptureBuffer,2 Wow64CsrFreeCaptureBuffer,1 Wow64CsrAllocateMessagePointer,3 Wow64CsrCaptureMessageBuffer,4 Wow64CsrCaptureMessageString,5 Wow64CsrSetPriorityClass,2 DbgUiConnectToD...
CREATE FOREIGN TABLE table_1 ( column_1 string(3) NOT NULL, column_2 string(4) NOT NULL, column_3 timestamp NOT NULL, column_4 string(8) NOT NULL, PRIMARY KEY(column_1, column_2, column_3, column_4), CONSTRAINT fk_to_table_2 FOREIGN KEY(column_1, column_2, column_3) REFERENCES table_2 (column_1,...
DROP TABLE IF EXISTS projects; DROP FUNCTION IF EXISTS update_timestamp() CASCADE;
-- boundary3.test -- -- db eval { -- SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real) -- WHERE t2.a=6 -- ORDER BY t1.rowid DESC -- } SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real) WHERE t2.a=6 ORDER BY t1.rowid DESC
CREATE TABLE [dbo].[System] ( [Id] INT NOT NULL PRIMARY KEY, [Name] NVARCHAR(50) NOT NULL )
CREATE OR REPLACE PROCEDURE SP_UPDATE_CONSUMER ( P_OSR_USA_ID_REF IN NUMBER, P_OSR_CONSUMER_KEY IN VARCHAR2, P_OSR_CONSUMER_SECRET IN VARCHAR2, P_OSR_REQUESTER_NAME IN VARCHAR2, P_OSR_REQUESTER...
INSERT INTO "testdrive" VALUES (default,37,40), (default,13,28), (default,26,27), (default,29,5), (default,43,38), (default,39,60), (default,21,5), (default,11,34), (default,54,29), (default,59,26), (default,26,17), (default,38,41), (default,12,10), (default,45,40...
/* = new game == wizard starting positions Wizards start the game in positions set by how many wizards there are in a game: These figures are only valid iff there are 2-8 wizards and the board is 15 x 10. */ select module('Chaos.Server.NewGame'); create table wizard_starting_positions ( wizard_count int, place ...
-- -- OpenAPI Petstore. -- Prepared SQL queries for 'User' definition. -- -- -- SELECT template for table `User` -- SELECT `id`, `username`, `firstName`, `lastName`, `email`, `password`, `phone`, `userStatus`, `userType` FROM `User` WHERE 1; -- -- INSERT template for table `User` -- INSERT INTO `User`(`id`, `usernam...
USE photos; DROP TABLE IF EXISTS photos; CREATE TABLE photos ( id SERIAL NOT NULL PRIMARY KEY, name TEXT NOT NULL );
# This is a fix for InnoDB in MySQL >= 4.1.x # It "suspends judgement" for fkey relationships until are tables are set. SET FOREIGN_KEY_CHECKS = 0; -- --------------------------------------------------------------------- -- company -- --------------------------------------------------------------------- DROP TABLE I...
-- @testpoint: opengauss关键字pli(非保留),作为函数名,部分测试点合理报错 --关键字不带引号-成功 drop function if exists pli; create function pli(i integer) returns integer as $$ begin return i+1; end; $$ language plpgsql; / --关键字带双引号-成功 drop function if exists "pli"; create function "pli"(i integer) returns integer as $$ begin return i+1; e...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 14, 2021 at 10:51 AM -- Server version: 10.4.16-MariaDB -- PHP Version: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
-- boundary2.test -- -- db eval { -- SELECT a FROM t1 WHERE r >= 4294967296 ORDER BY a DESC -- } SELECT a FROM t1 WHERE r >= 4294967296 ORDER BY a DESC
create index gps_points_device_point_index_idx on gps_points (device, point_index);
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50726 Source Host : localhost:3306 Source Schema : mayi Target Server Type : MySQL Target Server Version : 50726 File Encoding : 65001 Date: 07/05/2020 18:06...
CREATE OR REPLACE FUNCTION island_rank(area real) RETURNS int AS $$ SELECT CASE WHEN area < 10000000 THEN 6 WHEN area BETWEEN 1000000 AND 15000000 THEN 5 WHEN area BETWEEN 15000000 AND 40000000 THEN 4 WHEN area > 40000000 THEN 3 ELSE 7 END; $$ LANGUAGE S...
-- collate1.test -- -- execsql { -- SELECT c2+0 FROM collate1t1 ORDER BY 1; -- } SELECT c2+0 FROM collate1t1 ORDER BY 1;
SELECT name, (victories + draws + defeats) as "matches", victories, defeats, draws, (3 * board.victories + board.draws ) as "score" FROM ( SELECT teams.name, count( CASE WHEN (M.team_1_goals > M.team_2_goals AND teams.id = M.team_1) OR (M.team_2_goals > M.team_1_goals AND teams.id = M.team_2) THEN 1 END ) a...
EXEC [EST].[Proc_yjbb_Ins] @Code = N'600295',@CutoffDate = N'2017-09-30',@EPS = N'0.35',@EPSDeduct = N'0',@Revenue = N'153.65亿',@RevenueYoy = N'36.19',@RevenueQoq = N'8.36',@Profit = N'3.62亿',@ProfitYoy = N'93.61',@ProfiltQoq = N'234.00',@NAVPerUnit = N'7.3484',@ROE = N'4.86',@CashPerUnit = N'2.3709',@GrossProfitRate =...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 07 Jan 2022 pada 23.26 -- Versi server: 10.4.18-MariaDB -- Versi PHP: 8.0.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
CREATE PROCEDURE [dal].[Units__Delete] @Ids [dbo].[IndexedIdList] READONLY AS BEGIN SET NOCOUNT ON; DELETE FROM [dbo].[Units] WHERE Id IN (SELECT Id FROM @Ids); END;
-- -- Copyright 2019 The Android Open Source Project -- -- 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 copy of the License at -- -- https://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applica...
select id, name, description from tests;
CREATE PROCEDURE [dbo].[spRequiredArtifact_DeleteById] @inId INT AS BEGIN SET NOCOUNT ON; -- don't give how many rows affected IF EXISTS (SELECT * FROM [tblRequiredArtifact] WHERE Id = @inId) BEGIN; DELETE FROM [tblRequiredArtifact] WHERE Id = @inId; END ELSE BEGIN; -- We tried to delete a row that didn...
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 10, 2019 at 06:01 AM -- Server version: 10.3.14-MariaDB -- PHP Version: 7.2.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
CREATE PROCEDURE tSQLt.RemoveObject @ObjectName NVARCHAR(MAX), @NewName NVARCHAR(MAX) = NULL OUTPUT, @IfExists INT = 0 AS BEGIN DECLARE @ObjectId INT; SELECT @ObjectId = OBJECT_ID(@ObjectName); IF(@ObjectId IS NULL) BEGIN IF(@IfExists = 1) RETURN; RAISERROR('%s does not exist!',16,10,@O...
CREATE PROCEDURE [dbo].[UpdateDataLockStatus] ( @DataLockEventId BIGINT, @DataLockEventDatetime DATETIME, @PriceEpisodeIdentifier NVARCHAR(25), @ApprenticeshipId BIGINT, @IlrTrainingCourseCode NVARCHAR(20), @IlrTrainingType TINYINT, @IlrActualStartDate DATETIME, @IlrEffectiveFromDate DATETIME, @Il...
CREATE TABLE IF NOT EXISTS aggregator_metods ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT ); CREATE TABLE IF NOT EXISTS aggregator_snapshots ( id INTEGER PRIMARY KEY AUTOINCREMENT, calls_count INTEGER NOT NULL, app TEXT DEFAULT NULL, label TEXT DEFAULT NULL, date TEXT NOT NULL, %SNAPSHOT_CUSTOM_FI...
--导入数据后删除文件 insert into example(id,name,desc) values (1,'example1','desc1'); insert into role(id,role_name) values (1,'product_manager'); insert into user(id,username,password) values (1,'admin','11111'); insert into user_role(user_id,role_id) values(1,1);
CREATE TABLE DICOMROI ( RoiId INTEGER PRIMARY KEY AUTOINCREMENT, Name VARCHAR(128), Priority INTEGER DEFAULT -1 );
/* Q4. New topics \set personId 10995116277918 \set startDate '\'2010-10-01\''::date \set durationDays 31 */ select t_name, count(*) as postCount from tag, message, message_tag recent, knows where m_messageid = mt_messageid and mt_tagid = t_tagid and m_creatorid = k_person2id and m_c_replyof IS NULL an...
-- ===================================================================================================== -- Generated by Data Dictionary -- Date: 31 January 2017 16:16 -- Rulebase Versions: -- ILR Apprenticeship Earnings Calc 1617, Version 1617.12 -- ============================================================...
DROP DATABASE IF EXISTS casino_db; CREATE DATABASE casino_db;
DROP MATERIALIZED VIEW IF EXISTS ALINE_LABS CASCADE; CREATE MATERIALIZED VIEW ALINE_LABS as with labs_preceeding as ( select co.icustay_id , l.valuenum, l.charttime , case when itemid = 51006 then 'BUN' when itemid = 50806 then 'CHLORIDE' when itemid = 50902 then 'CHLORI...
-- Create CreateJson Stored Procedure --USE W0115559 USE CS4450Spring2017 GO --CREATE PROCEDURE [dbo].[sp_GetPingraphData] ALTER PROCEDURE [dbo].[sp_GetPingraphData] @CourseList VARCHAR(MAX), @UserID int AS BEGIN SELECT DISTINCT t.ID AS [TestId] , CASE WHEN up.UserID IS NOT NULL OR u.Id = @userId THEN u...
SELECT toleranzstufepos.t_id AS tid, toleranzstufepos.toleranzstufepos_von, toleranzstufepos.pos, toleranzstufepos.ori, halignment.itfcode AS hali, toleranzstufepos.hali AS hali_txt, valignment.itfcode AS vali, toleranzstufepos.vali AS vali_txt, schriftgroesse.itfcode AS groesse, ...
{%- test expect_table_columns_to_contain_set(model, column_list, transform="upper") -%} {%- if execute -%} {%- set column_list = column_list | map(transform) | list -%} {%- set relation_column_names = dbt_expectations._get_column_list(model, transform) -%} {%- set matching_columns = dbt_expectations._list_i...
-- SELECT Product Images from Database By in SKU's SELECT * FROM catalog_product_entity_media_gallery WHERE value_id in( SELECT value_id FROM catalog_product_entity_media_gallery_value_to_entity WHERE entity_id in( SELECT entity_id FROM catalog_product_entity WHERE ...
ALTER TABLE `CubeCart_admin_log` CHANGE `ipAddress` `ipAddress` VARCHAR(45) NOT NULL DEFAULT ''; #EOQ ALTER TABLE `CubeCart_reviews` CHANGE `ip` `ip` VARCHAR (45) NOT NULL DEFAULT ''; #EOQ ALTER TABLE `CubeCart_blocker` CHANGE `ip` `ip` VARCHAR (45) NOT NULL DEFAULT ''; #EOQ ALTER TABLE `CubeCart_SpamBot` CHANGE `userI...
CREATE TABLE list (id VARCHAR(2) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "list" ("id", "value") VALUES (E'AL', E'阿尔巴尼亚'); INSERT INTO "list" ("id", "value") VALUES (E'DZ', E'阿尔及利亚'); INSERT INTO "list" ("id", "value") VALUES (E'AF', E'阿富汗'); INSERT INTO "list" ("id", "value") VALUES (E'AR',...
CREATE TABLE #Codesets ( codeset_id int NOT NULL, concept_id bigint NOT NULL ) ; INSERT INTO #Codesets (codeset_id, concept_id) SELECT 0 as codeset_id, c.concept_id FROM (select distinct I.concept_id FROM ( select concept_id from @vocabulary_database_schema.CONCEPT where concept_id in (377604,4029488,4245975,43...
CREATE TABLE [dbo].[CodeStrategyResponse] ( [CodeStrategyResponsePK] [int] NOT NULL, [Description] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [EndDate] [datetime] NULL, [OrderBy] [int] NOT NULL, [StartDate] [datetime] NOT NULL ) ON [PRIMARY] GO ALTER TABLE [dbo].[CodeStrategyResponse] ADD C...
DROP TABLE IF EXISTS PUBLIC."event_tag"; DROP TABLE IF EXISTS PUBLIC."event_journal"; DROP TABLE IF EXISTS PUBLIC."snapshot"; DROP TABLE IF EXISTS PUBLIC."durable_state"; DROP SEQUENCE IF EXISTS PUBLIC."global_offset_seq";
source 1_set_vars.sql SELECT concat('use ', @db, ';'); SELECT ''; SELECT concat('INSERT IGNORE INTO query_objects(instance,scope,module,section,target,short_desc,standard,primary_link,secondary_link) values(\'', @instance, '\',\'', @lqscope, '\',\'query\',\'', @lqsection, '\',\'', @lqtarget, '\',\'', @instrname, '\',1...
SELECT * FROM users WHERE birthday_at IN ('may', 'august'); SELECT * FROM users WHERE DATE_FORMAT(birthday_at, '%M') IN ('may', 'august');
alter table Two add FavoriteNumber int null;
CREATE OR REPLACE VIEW vw_psa_uat_sb1_purchased_products AS WITH -- 29-Mar-2021,R.Donakonda: Removed ProductTerminationDT > SYSDATE check from OLD_DATA -- 05-Jan-2021, O.Khaykin: created psl as ( SELECT /*+ materialize*/ psuid FROM vw_psa_plan_sponsor_list ), new_data AS ( SELECT --+ material...
-- Script: Get-ServerLink.sql -- Decription: Return a list of SQL Server links and their properties. -- Reference: https://msdn.microsoft.com/en-us/library/ms178530.aspx -- Note: Use open query or four part names to query links SELECT a.server_id, a.name AS [DATABASE_LINK_NAME], CASE a.Server_id WHEN 0 THEN 'C...
-- phpMyAdmin SQL Dump -- version 4.6.6 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Mar 16, 2017 at 06:58 AM -- Server version: 5.7.17 -- PHP Version: 7.0.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE...
/* psql -h localhost -p 5433 -d randomTime -U randomTime --password */ DROP TABLE IF EXISTS weekplan; CREATE TABLE weekplan (id INT PRIMARY KEY, author VARCHAR(50), plan TEXT, config TEXT, password VARCHAR(50)); INSERT INTO weekplan (id, author) VALUES (1, 'John Doe');
ALTER TABLE k_workareas DROP FOREIGN KEY f1_workareas; ALTER TABLE k_x_group_user DROP FOREIGN KEY f1_x_group_user; ALTER TABLE k_x_group_user DROP FOREIGN KEY f2_x_group_user; ALTER TABLE k_acl_groups DROP FOREIGN KEY f2_acl_groups; ALTER TABLE k_users DROP FOREIGN KEY f2_users; ALTER TABLE k_domains DROP...
-- pager1.test -- -- execsql { -- PRAGMA journal_mode = DELETE; -- ATTACH 'test.db2' AS two; -- CREATE TABLE t1(a, b); -- CREATE TABLE two.t2(a, b); -- INSERT INTO t1 VALUES(1, 't1.1'); -- INSERT INTO t2 VALUES(1, 't2.1'); -- BEGIN; -- UPDATE t1 SET b = 't1.2'; -- UPDATE t2 SET ...
CREATE TABLE [dbo].[Matches] ( [Id] BIGINT NOT NULL PRIMARY KEY IDENTITY, [LocalTeam] BIGINT NOT NULL, [RoadTeam] BIGINT NOT NULL, [TieOdds] DECIMAL(5, 2) NULL, [MatchDttm] DATETIME NOT NULL, [Pick] NVARCHAR(MAX) NOT NULL, [Sport] NVARCHAR(MAX) NOT NULL, [Result] NVARCHAR(MAX) NULL,...
--liquibase formatted sql --changeset jgke:3 -- Unique tag values means destruction. DELETE FROM tags_sources; DELETE FROM tags; ALTER TABLE types ADD CONSTRAINT types_has_unique_value UNIQUE (value); --rollback ALTER TABLE types DROP CONSTRAINT types_has_unique_value; ALTER TABLE tags ADD CONSTRAINT tags_has_unique...
{% macro generate_schema_name(custom_schema_name=none) -%} {%- set default_schema = target.schema -%} {%- if custom_schema_name is none -%} {{ default_schema }} {%- else -%} {{ custom_schema_name | trim }} {%- endif -%} {%- endmacro %}
if exists (select * from sysobjects where id = object_id(N'[dbo].[DataLoad_UserDetails]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[DataLoad_UserDetails] GO CREATE PROCEDURE [dbo].[DataLoad_UserDetails] @FirstName NVARCHAR(100), @Surname NVARCHAR(100), @HasNewsLetter BIT, @EmailAddr...
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Sep 04, 2018 at 08:07 AM -- Server version: 5.5.45 -- PHP Version: 7.0.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
-- Exported from quickdatabasediagrams, edits and changes made -- Dropping tables if existing DROP TABLE IF EXISTS "Titles"; DROP TABLE IF EXISTS "Employees"; DROP TABLE IF EXISTS "Departments"; DROP TABLE IF EXISTS "Dept_Manager" CASCADE; DROP TABLE IF EXISTS "Dept_Employees"; DROP TABLE IF EXISTS "Salaries"; -- -- D...
set send_logs_level = 'none'; drop table if exists ttl; create table ttl (d Date, a Int) engine = MergeTree order by a partition by toDayOfMonth(d); alter table ttl modify ttl d + interval 1 day; show create table ttl; insert into ttl values (toDateTime('2000-10-10 00:00:00'), 1); insert into ttl values (toDateTime('...
insert into users (id, login_name, password_hash, role_name) values (-1, 'user', 'PBKDF2WithHmacSHA256:2048:e9vXAAs/amAf2/PT/eVw2UbG6DcdtIZArf0FqMG8ClI=:UTOAQ8LsucZL3nua/RQj3VyDid3KhaSUFc5AaVI8T4A=', 'USER') insert into users (id, login_name, password_hash, role_name) values (-2, 'manager', 'PBKDF2WithHmacSHA256:2048:e...
-- This file and its contents are licensed under the Apache License 2.0. -- Please see the included NOTICE for copyright information and -- LICENSE-APACHE for a copy of the license. \o /dev/null \ir include/insert_two_partitions.sql \o SELECT * FROM test.show_columnsp('_timescaledb_internal.%_hyper%'); -- Test that ...
-- DaoTerritories_S1_Insert -- 2014/2/9 日立 太郎 INSERT INTO [Territories] ( [TerritoryID], [TerritoryDescription], [RegionID] ) VALUES ( @TerritoryID, @TerritoryDescription, @RegionID )
-- Deploy ggircs-portal:function_ciip_user_certification_requests to pg -- requires: table_ciip_user -- requires: table_certification_url -- requires: table_application begin; drop function ggircs_portal.ciip_user_has_certification_requests; commit;
/* MySQL Database Backup Tools Server:127.0.0.1: Database:tp5api Data:2017-11-06 16:18:38 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for mk_common_file -- ---------------------------- DROP TABLE IF EXISTS `mk_common_file`; CREATE TABLE `mk_common_file` ( `id` int(10) unsigned NOT ...
<#if qywxMessagelog.wxAgentId ?exists && qywxMessagelog.wxAgentId ?length gt 0> /* 应用id */ and qm.wx_agent_id like CONCAT('%', :qywxMessagelog.wxAgentId ,'%') </#if> <#if qywxMessagelog.topartysId ?exists && qywxMessagelog.topartysId ?length gt 0> /* 部门id */ and qm.topartys_id like CONCAT('%', ...