text
stringlengths
1
1.05M
drop function cucb.user_prefs_or_default;
-- DML = data manipulation language use StoreApplicationDB; go -- INSERT insert into Customer.Customer ([Name], Active) values ("fred", 1), ("Tyler", 1), ("Cory", 1); insert into Store.Product ([Name], Price, Active) values ("computer", 500, 1), ("monitor", 200, 1); insert into Store.Store ([Name], A...
USE tracker_db; INSERT INTO department (dept_name) VALUES ("Management"); INSERT INTO department (dept_name) VALUES ("Sales"); INSERT INTO department (dept_name) VALUES ("Human Resources"); INSERT INTO department (dept_name) VALUES ("Administration"); INSERT INTO department (dept_name) VALUES ("Finance"); INSERT INTO ...
drop table if exists BAT_CIF_ADDR_ELEC; /*==============================================================*/ /* Table: BAT_CIF_ADDR_ELEC */ /*==============================================================*/ create table BAT_CIF_ADDR_ELEC ( PARTY_ID varchar(20) comment '客户号', ...
-- @testpoint: 插入非法空值,合理报错 drop table if exists float4_08; create table float4_08 (id int,name float4); insert into float4_08 values (1,' '); drop table float4_08;
DROP LOGIN WebLogin CREATE LOGIN WebLogin WITH PASSWORD = 'SQLPass1234!' GO DROP USER IF EXISTS WebUser CREATE USER WebUser FROM LOGIN WebLogin GO DROP ROLE IF EXISTS WebUserRole CREATE ROLE WebUserRole GO GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE TO WebUserRole EXEC sp_addrolemember N'WebUserRole', N'WebUser' ...
CREATE TABLE "Wins_4"( "col_000" float8 NOT NULL, "col_001" decimal(5, 3) NOT NULL, "col_002" decimal(4, 2) NOT NULL, "col_003" smallint NOT NULL, "col_004" decimal(4, 2) NOT NULL, "col_005" decimal(4, 2) NOT NULL, "col_006" decimal(4, 2) NOT NULL, "col_007" decimal(4, 2) NOT NULL, "col_008" decimal(4, 2) NOT NULL, "co...
create temp table temp_qa_to_scan AS select rna.upi urs, COALESCE(rna.seq_short, rna.seq_long) as sequence from rna ; create index ix_temp_qa_to_scan on temp_qa_to_scan(urs); delete from temp_qa_to_scan qa using xref where not exists(select 1 from xref where xref.deleted = 'N' and qa.urs = xref.upi) ; delete f...
select 1 as id union all select * from {{ ref('node_0') }} union all select * from {{ ref('node_3') }} union all select * from {{ ref('node_6') }} union all select * from {{ ref('node_8') }} union all select * from {{ ref('node_17') }} union all select * from {{ ref('node_25') }} union all select * from {{ ref('node_47...
--============================================================================== -- GPI - Gunther Pippèrr -- Desc: get the tablespaces of the user - parameter - Owner -- Date: November 2013 -- --============================================================================== set verify off set linesize 130 pagesiz...
--================================================================================== -- Drop function template for Azure SQL Database and Azure Synapse Analytics Database --=================================================================================== IF OBJECT_ID (N'<schema_name, sysname, dbo>.<function_name, sy...
INSERT INTO `#__joomlawatch_ip2c` (`start`, `end`, `a2`, `a3`, `country`) VALUES (3471529216, 3471529983, 'CA', 'CAN', 'CANADA'), (3471529984, 3471558655, 'US', 'USA', 'UNITED STATES'), (3471558656, 3471560703, 'CA', 'CAN', 'CANADA'), (3471560704, 3471570943, 'US', 'USA', 'UNITED STATES'), (3471570944, 3471572991, ...
CAST(MD5_BINARY(CONCAT( IFNULL(NULLIF(UPPER(TRIM(CAST(CUSTOMER_ID AS VARCHAR))), ''), '^^') )) AS BINARY(16)) AS CUSTOMER_PK
CREATE TABLE IF NOT EXISTS `metadata_value` ( `fk_reference` smallint(4) unsigned NOT NULL, `cd_info` tinyint(1) unsigned NOT NULL, `value_date` date DEFAULT NULL, `value_datetime` datetime DEFAULT NULL, `value_integer` int(11) DEFAULT NULL, `value_boolean` tinyint(1) DEFAULT NULL, `value_text` text, `v...
CREATE TABLE advocacia ( id_advocacia INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, nome_advocacia VARCHAR(45) NULL, end_advocacia VARCHAR(45) NULL, tel_advocacia VARCHAR(11) NULL, PRIMARY KEY(id_advocacia) ); CREATE TABLE advogado ( id_advogado INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, nome_advogado VARCHAR...
UPDATE USER_BASE set email='lingo.shinetechchina@gmail.com' where id=1; UPDATE USER_BASE set email='vivian.shinetechchina@gmail.com' where id=2; UPDATE USER_BASE set email='demo.shinetechchina@gmail.com' where id=3; UPDATE USER_BASE set email='demo.shinetechchina@gmail.com' where id=4; UPDATE USER_BASE set emai...
-- MySQL Workbench Forward Engineering -- ----------------------------------------------------- -- Procedure `pro_ds_getChild` 查询树形结构的存储过程 -- ----------------------------------------------------- DROP PROCEDURE IF EXISTS `pro_ds_getChild`; CREATE PROCEDURE `pro_ds_getChild`(rootId varchar(36)) BEGIN DECLARE ptemp ...
-- dbstatus.test -- -- db eval { -- CREATE TABLE t2(y); -- } CREATE TABLE t2(y);
CREATE TABLE weather_data_grouped (id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY) SELECT site_code,site_name, latitude, longitude, region, observation_date, AVG(wind_speed) as wind_speed_avg, MIN(wind_speed) as wind_speed_min, MAX(wind_speed) as wind_speed_max, AVG(visibility) as visibility_avg, MIN(visibility) as vi...
select A.nome from Animais A where not exists ( select * from Veterinários where cidade = "Prinópolis" and CRMV not in ( select CRMV from Consultas where Consultas.COD_AN = A.COD_AN ) );
-- AUTO-GENERATED BY igluctl DO NOT EDIT -- Generator: igluctl 0.3.0 -- Generated: 2018-01-22 08:40 CREATE SCHEMA IF NOT EXISTS atomic; CREATE TABLE IF NOT EXISTS atomic.com_google_analytics_measurement_protocol_custom_dimension_1 ( "schema_vendor" VARCHAR(128) ENCODE RUNLENGTH NOT NULL, "schema_name" VA...
ALTER CERTIFICATE Shipping04 WITH PRIVATE KEY (DECRYPTION BY PASSWORD = 'pGF$5DGvbd2439587y', ENCRYPTION BY PASSWORD = '4-329578thlkajdshglXCSgf'); GO ALTER CERTIFICATE Shipping11 WITH PRIVATE KEY (ENCRYPTION BY PASSWORD = '34958tosdgfkh##38', DECRYPTION BY PASSWORD = '95hkjdskghFDGGG4%'); GO A...
# # Copyright 2017 Amazon.com # # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
INSERT INTO `dictionary` VALUES (1,'奇幻玄幻','tag',0); INSERT INTO `dictionary` VALUES (2,'武侠仙侠','tag',0); INSERT INTO `dictionary` VALUES (3,'都市官场','tag',0); INSERT INTO `dictionary` VALUES (4,'历史军事','tag',0); INSERT INTO `dictionary` VALUES (5,'游戏竞技','tag',0); INSERT INTO `dictionary` VALUES (6,'言情穿越','tag',0); INSERT ...
/****** Object: StoredProcedure [AddCircTypeTagEdit] ******/ IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[AddCircTypeTagEdit]') AND type in (N'P', N'PC')) DROP PROCEDURE [AddCircTypeTagEdit] GO CREATE PROCEDURE [AddCircTypeTagEdit] @CircTypeID int OUTPUT, @CircTypeTag varchar...
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 (437233,436059) ) I ) C U...
DROP table if exists bar3 cascade; DROP table if exists foo3 cascade; CREATE table foo3 (a int) distributed by (a); CREATE table bar3 (a int) distributed by (a); CREATE rule three as on insert to bar3 do instead insert into foo3(a) values(1); SELECT oid,gp_segment_id,rulename,ev_class::regclass from pg_rewrite where...
DROP TABLE IF EXISTS billionaires; CREATE TABLE billionaires ( id INT AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(250) NOT NULL, last_name VARCHAR(250) NOT NULL, career VARCHAR(250) DEFAULT NULL ); INSERT INTO billionaires (first_name, last_name, career) VALUES ('Aliko', 'Dangote', 'Billionaire Industrial...
-- Tags: disabled SET allow_experimental_window_view = 1; DROP TABLE IF EXISTS mt; DROP TABLE IF EXISTS dst; DROP TABLE IF EXISTS wv; CREATE TABLE dst(count UInt64) Engine=MergeTree ORDER BY tuple(); CREATE TABLE mt(a Int32) ENGINE=MergeTree ORDER BY tuple(); CREATE WINDOW VIEW wv TO dst AS SELECT count(a) AS count ...
/* Database state codes */ CREATE TABLE [dbo].[State]( [StateCode] [int] NOT NULL, [Name] [nvarchar](20) NOT NULL, [Description] [nvarchar](1000) NOT NULL, [IsActive] [bit] NOT NULL, CONSTRAINT [PK_State] PRIMARY KEY CLUSTERED ( [StateCode] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_...
delete where { ?x <ub:name> <FullProfessor0> . }
/* Deployment script for Observations This code was generated by a tool. Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. */ GO SET ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CONCAT_NULL_YIELDS_NULL, QUOTED_IDENTIFIER ON; SET NUMERIC_ROUNDABORT OFF; GO :setv...
-- update module version UPDATE `sys_modules` SET `version` = '1.3.4' WHERE `uri` = 'store' AND `version` = '1.3.3';
# # %CopyrightBegin% # # Copyright Ericsson AB 1996-2017. All Rights Reserved. # # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
/* Navicat MySQL Data Transfer Source Server : 192.168.56.10_3306 Source Server Version : 50727 Source Host : 192.168.56.10:3306 Source Database : gulimall_admin Target Server Type : MYSQL Target Server Version : 50727 File Encoding : 65001 Date: 2020-03-11 17:35:40 */ SET FOREIGN...
CREATE TABLE IF NOT EXISTS address ( id serial PRIMARY KEY, account_id uuid REFERENCES account(id) ON DELETE CASCADE NOT NULL, payment_network varchar(20) NOT NULL, environment varchar(20), details jsonb NOT NULL, -- AUDIT COLUMNS created_at timestamp with time zone NOT NULL DEFAULT(CURRENT_TIMESTAMP), updat...
CREATE TYPE [dbo].[AdminPermissionList] AS TABLE ( [Index] INT DEFAULT 0, [HeaderIndex] INT DEFAULT 0, PRIMARY KEY ([HeaderIndex], [Index]), [Id] INT NOT NULL DEFAULT 0, [View] NVARCHAR (255) NOT NULL, [Action] NVARCHAR (255) NOT NULL, [Criteria] NVARCHAR(1024), -- compiles into SQL expression ...
-- Tags: distributed SET send_logs_level = 'fatal'; DROP TABLE IF EXISTS test_local_1; DROP TABLE IF EXISTS test_local_2; DROP TABLE IF EXISTS test_distributed_1; DROP TABLE IF EXISTS test_distributed_2; CREATE TABLE test_local_1 (date Date, value UInt32) ENGINE = MergeTree(date, date, 8192); CREATE TABLE test_local...
/* [df:title] EndComment NotFound Select [df:description] The SQL is wrong. The END comment does not exist. */ -- #df:x# select mb.MEMBER_ID , mb.MEMBER_NAME , (select sum(purchase.PURCHASE_PRICE) from PURCHASE purchase where purchase.MEMBER_ID = mb.MEMBER_ID ...
# # NMS_Pokemon # Collectible Monster Generator # Uses my silly pet name generator, some animal stuff, and the Pokemon # types, below # :Start 1,[NMS_Stardew_Pet_Names.Start] [Types] [Creatures.Start] x [Creatures.Start] ;Types 5,[PokemonTypes] 1,[PokemonTypes] [PokemonTypes] 1,[WeirdoTypes] ;Pokemon...
/********* FIELD_IS_STANDARD_VALID_CONCEPT all standard concept id fields are standard and valid Parameters used in this template: cdmDatabaseSchema = @cdmDatabaseSchema vocabDatabaseSchema = @vocabDatabaseSchema cdmTableName = @cdmTableName cdmFieldName = @cdmFieldName {@cohort & '@runForCohort' == 'Yes'}?{ cohortD...
CREATE TABLE IF NOT EXISTS solutions ( id SERIAL NOT NULL, size integer NOT NULL, board integer[][], PRIMARY KEY (id) );
use exercice; /* Obtenir la liste des 10 villes les plus peuplées en 2012 */ SELECT * FROM villes_france_free ORDER BY ville_population_2012 DESC LIMIT 0,10; /* Obtenir la liste des 50 villes ayant la plus faible superficie */ SELECT * FROM villes_france_free ORDER BY ville_surface ASC LIMIT 50; /* Obtenir la liste ...
-- call account.get_account_status(@err, 123, @oaccstatus); DROP PROCEDURE IF EXISTS account.get_account_status; DELIMITER $$ CREATE PROCEDURE account.get_account_status(OUT error_code INT, IN account_id_in BIGINT, ...
-- MySQL dump 10.13 Distrib 5.7.28, for Linux (x86_64) -- -- Host: 127.0.0.1 Database: polestar -- ------------------------------------------------------ -- Server version 5.7.28-0ubuntu0.18.04.4 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_S...
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_HI_PRO_INST_END') drop index ACT_HI_PROCINST.ACT_IDX_HI_PRO_INST_END; IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_HI_PRO_I_BUSKEY') drop index ACT_HI_PROCINST.ACT_IDX_HI_PRO_I_BUSKEY; IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT...
-- Z 3.13 -- ispisi sve podeatke o stud kojima ime ili počinje ili završava samoglasnikom SELECT * FROM stud WHERE stud.imeStud RLIKE '^[aeiouAEIOU].*' OR stud.imeStud RLIKE '^.*[aeiouAEIOU]$'; SELECT * FROM stud WHERE stud.imeStud RLIKE '^[aeiou].*[aeiou]$'; --OR stud.imeStud RLIKE '^.*[aeiouAEIOU]$'; SELECT * FR...
/* 13. Sacar la media de sueldos entre todos los vendedores por grupo */ SELECT CEIL(AVG(v.sueldo)) AS 'MEDIA SALARIAL', g.nombre, g.ciudad FROM vendedores v INNER JOIN grupos g ON g.id = v.grupo_id GROUP BY grupo_id;
update users set deleted_at = now(), deleted_by_guid = (select guid from users where email='admin@apidoc.me' and deleted_at is null) where deleted_at is null and email in('jenglert@gitl.com', 'mbryzek-test@gilt.com', 'michael-public@gilt.com'); update users set email = 'nitay@actioniq.com' where emai...
CREATE TABLE `mst_projbudgetrev` ( `projbudgetrev_id` varchar(30) NOT NULL , `dept_id` varchar(30) NOT NULL , `projbudget_id` varchar(30) NOT NULL , `projbudgetrev_descr` varchar(255) NOT NULL , `project_id` varchar(30) NOT NULL , `projbudget_year` int(4) NOT NULL , `projbudget_month` int(2) NOT NUL...
/************************************************************************** * Copyright 2016 Observational Health Data Sciences and Informatics (OHDSI) * * 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 Li...
1 1 5.000E+01 3.43727E-17 1.27641E-17 2.21401E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E-17 2.15915E...
insert into p.parent(id, name) values (1, 'parent1'), (2, 'parent2'), (3, 'parent3'); insert into p.taggs(id,taggable_id,taggable_type,content) values (1,1,'Parent','tagged on parent1'), (2,2,'Parent','tagged on parent2'), (3,2,'Parent','2nd tagged on parent2'); insert into p.unique_taggs(id,unique_taggable_i...
CREATE TABLE IF NOT EXISTS `weiapp_member_info` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `member_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id对应member表uid', `real_name` varchar(20) NOT NULL DEFAULT '' COMMENT '用户真实姓名', `mobile` char(11) NOT NULL DEFAULT '' COMMENT '用户手机号码', `app_type` tinyin...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 10 Jul 2019 pada 05.14 -- Versi Server: 10.1.10-MariaDB -- PHP Version: 7.0.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
ALTER TABLE `products` ADD COLUMN `url` VARCHAR(255) NOT NULL AFTER `slug`, ADD COLUMN `category_string` TEXT NULL DEFAULT NULL AFTER `url`;
CREATE TABLE "selfservice_login_requests" ( "id" TEXT PRIMARY KEY, "request_url" TEXT NOT NULL, "issued_at" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, "expires_at" DATETIME NOT NULL, "active_method" TEXT NOT NULL, "csrf_token" TEXT NOT NULL, "created_at" DATETIME NOT NULL, "updated_at" DATETIME NOT NULL )
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 22, 2017 at 07:21 AM -- Server version: 10.1.28-MariaDB -- PHP Version: 7.1.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 04-Set-2018 às 21:00 -- Versão do servidor: 10.1.10-MariaDB -- PHP Version: 7.0.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
DROP TABLE IF EXISTS folio_reporting.po_acq_unit_ids; -- These fields in adjustments can be locally defined CREATE TABLE folio_reporting.po_acq_unit_ids AS WITH po_acq_unit AS ( SELECT id AS po_id, po_number AS po_number, json_array_elements_text(json_extract_path(data, 'acqUnitIds')) AS po...
USE NPPES DROP TABLE [dbo].[npigeo]; GO CREATE TABLE [dbo].[npigeo] ( [NPI] numeric not null, [Matchflag] varchar(20) null, [Matchtype] varchar(20) null, [Longitude] float null, [Latitude] float null ); GO
#This solution uses dense rank and since I use the order by its ranking based on the score. SELECT score, DENSE_RANK() OVER (ORDER BY score DESC) AS `rank` FROM scores #OR, another way without using window function as some companies require this. SELECT b.Score, (SELECT COUNT(DISTINCT a.Score) FROM Scores a WHERE...
DROP DATABASE IF EXISTS `pretrip`; CREATE DATABASE IF NOT EXISTS `pretrip`; USE `pretrip`; CREATE TABLE `Conta` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Saldo` double(20,2), PRIMARY KEY (`Id`) ); CREATE TABLE `Endereco` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Numero` int(11), `Complemento` i...
USE `essentialmode`; INSERT INTO `items` (`name`, `label`, `weight`) VALUES ('bread', 'Pao', 1), ('water', 'Agua', 1) ;
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Jan 24, 2018 at 07:49 AM -- Server version: 5.7.19 -- PHP Version: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
SELECT sku, name, category, COALESCE(global_price, 0) AS price, STRUCT( STRUCT( COALESCE(global_impressions, 0) AS impressions, COALESCE(global_clicks, 0) AS clicks, COALESCE(IF(MAX(global_clicks) / MAX(global_impressions) > 1, 1, MAX(global_clicks) / MAX(global_impressions)), 0) AS CTR ...
-- init DO $do$ DECLARE _db TEXT := 'entropy'; _user TEXT := 'lutando'; _password TEXT := 'lutando'; BEGIN CREATE EXTENSION IF NOT EXISTS dblink; IF EXISTS (SELECT 1 FROM pg_database WHERE datname = _db) THEN RAISE NOTICE 'Database already exists'; ELSE PERFORM dblink_connect('host=localhost user=' ||...
-- name: get_overall_status with recursive tds_children as ( select id, parent_id, todo, metadata, tags, desc, path, flags, last_update_ts, created_at, 0 as depth from vimania_todos where id == :id_...
CREATE DATABASE burgers_db; USE burgers_db; CREATE TABLE burgers ( id int NOT NULL AUTO_INCREMENT, name varchar(50) NOT NULL, devoured BOOLEAN DEFAULT false, PRIMARY KEY (id) );
DROP table authorities; DROP table users; create table papeis ( id SERIAL primary key, nome varchar(50) not null UNIQUE ); create table usuarios( cpf varchar(50) not null primary key, senha varchar(100) not null, papel_id INTEGER not null, servidor boolean not null, habilitado boolean not null, siorg ...
-- @testpoint:opengauss关键字references(保留),作为用户组名 --关键字不带引号-合理报错 drop group if exists references; create group references with password 'gauss@123'; --关键字带双引号-成功 drop group if exists "references"; create group "references" with password 'gauss@123'; --清理环境 drop group "references"; --关键字带单引号-合理报错 drop group if exist...
DECLARE @name VARCHAR(100) -- database name declare @i int --counter for while loop declare @maxIdid int --for while loop declare @sql nvarchar(1000) --for dynamic sql DECLARE @Return INT --for error handling set nocount on create table #tempDBName (idid int not null identity(1,1) , DBName varchar(100))...
with ticket as ( select * from {{ ref('stg_zendesk__ticket') }} ), ticket_reply_times as ( select * from {{ ref('int_zendesk__ticket_reply_times') }} ) select ticket.ticket_id, sum(case when is_first_comment then reply_time_calendar_minutes else null end) as first_reply_time_calendar_minutes, su...
-- All GPDB-added functions are here, instead of pg_proc.h. pg_proc.h should -- kept as close as possible to the upstream version, to make merging easier. -- -- This file is translated into DATA rows by catullus.pl. See -- README.add_catalog_function for instructions on how to run it. CREATE FUNCTION float4_decum(_fl...
create table AUTH_GROUP_AUTHORITY ( GROUP_ID int8 not null, AUTHORITY_ID int8 not null ); create table AUTH_USER_GROUP ( USER_ID int8 not null, GROUP_ID int8 not null ); create table AUX_IDENTIFIERS ( id int8 not null, CREATION_DATE timestamp not nu...
CREATE TABLE IF NOT EXISTS thingsboard.entity_views ( id timeuuid, entity_id timeuuid, entity_type text, tenant_id timeuuid, customer_id timeuuid, name text, keys text, start_ts bigint, end_ts bigint, search_text text, additional_info text, PRIMARY KEY (id, entity_id, ten...
--liquibase formatted sql --changeset michaluk.michal:1.init CREATE SCHEMA product_management; CREATE TABLE product_management.product_description ( ref_no character varying(64) NOT NULL PRIMARY KEY, description json NOT NULL );
-- func.test -- -- execsql { -- SELECT match(a,b) FROM t1 WHERE 0; -- } SELECT match(a,b) FROM t1 WHERE 0;
-- -- Copyright 2021 Apollo Authors -- -- 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 -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to i...
-- ============================================= -- Author: Mark Entingh -- Create date: 7/24/2015 12:30 PM -- Description: delete photo after removing from disk -- ============================================= CREATE PROCEDURE [dbo].[DeletePhoto] @websiteId int = 0, @filename nvarchar(25) = '' AS BEGIN SET NOCOU...
USE [Monopoly] GO /****** Object: View [Game].[vwUtilityRentMultiplier] Script Date: 2/19/2022 10:27:42 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE VIEW [Game].[vwUtilityRentMultiplier] AS WITH utility_ownership AS ( SELECT b.[utility], b.[player] FROM [Game].[Utilities] a LEFT OUTER JOIN ...
CREATE TABLE list (id VARCHAR(2) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; INSERT INTO `list` (`id`, `value`) VALUES ('VI', 'ABŞ Vircin Adaları'); INSERT INTO `list` (`id`, `value`) VALUES ('AX', 'Aland Adaları'); INSERT INTO `list` (`id`...
IF NOT EXISTS (select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='dw' and TABLE_NAME='d_virtajtpsektori') BEGIN CREATE TABLE dw.d_virtajtpsektori( id int IDENTITY(1,1) NOT NULL, loadtime datetime NOT NULL, source varchar(100) NOT NULL, username varchar(30) NOT NULL, virtajtpsektori_koodi varchar(4)...
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: crawl-data-amazon -- ------------------------------------------------------ -- Server version 5.5.5-10.1.19-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHAR...
CREATE TABLE [Data_Load].[DAS_LevyDeclarations] ( [Id] BIGINT NOT NULL PRIMARY KEY IDENTITY(1, 1), [DasAccountId] NVARCHAR(100) NOT NULL, [LevyDeclarationId] BIGINT NOT NULL, [PayeSchemeReference] NVARCHAR(20) NOT NULL, [LevyDueYearToDate] DECIMAL(18,5) NULL, [LevyAllowanceForYear] DECIMAL(18,5)...
SET @preparedStatement = (SELECT IF( ( SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'Jobs' AND table_schema = DATABASE() AND column_name = 'Data' AND column_type != 'JSON' ) > 0, 'ALTER TABLE Jobs MODIFY COLUMN Data JSON;', 'SELECT 1' )); PR...
-- @testpoint:openGauss关键字Hour(非保留),作为列名带引号并且排序时使用该列,建表成功,Hour列按字母大小排序 drop table if exists explain_test; create table explain_test( c_id int, c_int int, c_integer integer, c_bool int, c_boolean int, c_bigint integer, c_real real, c_double real, c_decimal decimal(38), c_number number(38), c_numeric numeric(38), ...
-----------------###### DW ETL Dated First SP ######--------------- USE LibraryDW GO CREATE OR ALTER PROCEDURE DW_ETL_Dated_First_SP @cdate date,@fdate date,@ldate date AS BEGIN --- Facts --- ---Cultural-- EXEC DW_Fact_Tran_Research_First_SP INSERT INTO ETL_LOGS VALUES ('Fact Tran Research First Done', ...
SELECT page, url FROM `httparchive.response_bodies.2020_06_01_desktop` WHERE url LIKE '%.js%' AND body LIKE '%WebAssembly%'
/****** Object: Table [T_Organisms] ******/ /****** RowCount: 319 ******/ SET IDENTITY_INSERT [T_Organisms] ON INSERT INTO [T_Organisms] (OG_name, Organism_ID, OG_organismDBPath, OG_organismDBName, OG_created, OG_description, OG_Short_Name, OG_Storage_Location, OG_Domain, OG_Kingdom, OG_Phylum, OG_Class, OG_Order, ...
ALTER TABLE corporation_wallet ALTER COLUMN owner SET NOT NULL;
/* SQLyog Ultimate v12.09 (64 bit) MySQL - 10.1.21-MariaDB : Database - gpcomp ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KE...
-- -- ALTER_TABLE -- add attribute -- CREATE TABLE tmp (initial int4); COMMENT ON TABLE tmp_wrong IS 'table comment'; COMMENT ON TABLE tmp IS 'table comment'; COMMENT ON TABLE tmp IS NULL; ALTER TABLE tmp ADD COLUMN xmin integer; -- fails ALTER TABLE tmp ADD COLUMN a int4 default 3; ALTER TABLE tmp ADD COLUMN b na...
select name, topic_id, freeform_tags, description, lifecycle_state from oci.oci_ons_notification_topic where topic_id = '{{ output.resource_id.value }}';
ALTER TABLE `kancolle`.`t_member_log` CHANGE COLUMN `index` `createTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, DROP PRIMARY KEY, ADD PRIMARY KEY (`createTime`);
-- ALBUM BIRTHDAY CREATE TABLE stolat.album_birthday_intermediate ( album_mbid UUID NOT NULL, album_year INTEGER, album_month INTEGER, album_day INTEGER ); CREATE TABLE stolat.album_birthday ( album_mbid UUID PRIMARY KEY, album_year INTEGER, album_month INTEGER, album_day INTEGER, ...
DELETE FROM "auth"."roles" WHERE "role" = 'manager';
DELIMITER / INSERT INTO KRIM_PERM_ID_BS_S VALUES(NULL) / -- Create the modify and view permissions INSERT INTO KRIM_PERM_T (PERM_ID,PERM_TMPL_ID,NMSPC_CD,NM,DESC_TXT,ACTV_IND,OBJ_ID,VER_NBR) VALUES ((SELECT (MAX(ID)) FROM KRIM_PERM_ID_BS_S), (SELECT PERM_TMPL_ID FROM KRIM_PERM_TMPL_T WHERE NMSPC_CD = 'KR-NS' AND NM = ...
/* SQLyog Ultimate v11.52 (64 bit) MySQL - 5.7.17-log : Database - md_account ********************************************************************* */ /*!40101 SET NAMES utf8mb4 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=...