text
stringlengths
1
1.05M
with completed_workflows as ( select w.created_at as created_at, w.id, w.head_sha from commons.workflow_run w where status = 'completed' AND w.repository.full_name = 'pytorch/pytorch' and PARSE_TIMESTAMP_ISO8601(w.created_at) > PARSE_TIMESTAMP_ISO8601(...
-- @@@ START COPYRIGHT @@@ -- -- 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...
CREATE OR ALTER PROCEDURE [projection].[test nulls_format_correctly] AS BEGIN ----------------------------------------------------------------------------------------------------------------- -- Arrange: --------------------------------------------------------------------------------------------------------------...
-- Deploy octopod:remove_archived_column to pg BEGIN; ALTER TABLE "public"."deployments" DROP COLUMN "archived"; COMMIT;
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 26, 2017 at 11:22 AM -- Server version: 10.1.16-MariaDB -- PHP Version: 5.6.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
CREATE TABLE `memo` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `message` text NOT NULL, `createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE = InnoDB DEFAULT CHARS...
-- @testpoint:join条件 create table zsharding_tbl(c_id int, c_int int, c_integer integer); select distinct B.c_id CID,B.c_int CINT,B.c_integer INTER from zsharding_tbl a join zsharding_tbl b on concat(B.c_id,B.c_int)='34'; drop table zsharding_tbl;
-- file:updatable_views.sql ln:92 expect:true UPDATE rw_view16 SET aa=-3 WHERE a=3
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 17, 2016 at 09:45 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
-- This query extracts dose+durations of phenylephrine administration select stay_id, linkorderid , rate as vaso_rate , amount as vaso_amount , starttime , endtime from mimic_icu.inputevents where itemid = 221749 -- phenylephrine
-- Get number of retirees by department SELECT d.dept_name as "Department", count(de.emp_no) as "Count" FROM dept_emp as de INNER JOIN employees as e ON de.emp_no = e.emp_no INNER JOIN departments as d ON d.dept_no = de.dept_no WHERE de.to_date = '9999-01-01' AND (e.birth_date BETWEEN '1952-01-01' AND '1955-12-31') GR...
SELECT geo_region as region, domain, sum(win_cost_micros_usd)/1000000 as cost, sum(clicks + companion_clicks) as clicks, count(*) as impressions from Wins_buffer where line_item_id = 98 and region not like '' GROUP By region,`domain` HAVING impressions > 52 order by clicks desc
INSERT INTO tb_user(email) VALUES ('maria@gmail.com'); INSERT INTO tb_user(email) VALUES ('joao@gmail.com'); INSERT INTO tb_user(email) VALUES ('ana@gmail.com'); INSERT INTO tb_user(email) VALUES ('lucia@gmail.com'); INSERT INTO tb_user(email) VALUES ('joaquim@gmail.com'); INSERT INTO tb_movie(score, count, title, ima...
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SE...
/* ███████████████████████████ FULLDATA.NL ██████████████████████████████ ███████╗██╗ ██╗██╗ ██╗ ██████╗ █████╗ ████████╗ █████╗ ██╔════╝██║ ██║██║ ██║ ██╔══██╗██╔══██╗╚══██╔══╝██╔══██╗ █████╗ ██║ ██║██║ ██║ ██║ ██║███████║ ██║ ███████║ ██╔══╝ ██║ ██║██║ █...
/** * Author: brijeshdhaker * Created: Jan 12, 2021 */ CREATE TABLE `CART_ITEMS` ( `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, `CART_ID` int(11) unsigned NOT NULL, `ITEM_ID` int(11) unsigned NOT NULL, `QTY` int(11) unsigned NOT NULL, PRIMARY KEY (`ID`) ); /** ...
-- MySQL Script generated by MySQL Workbench -- Thu Apr 29 17:53:39 2021 -- 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='ON...
CREATE TABLE [dbo].[TagStatus] ( [Id] BIGINT IDENTITY(1, 1) NOT NULL, [Code] NVARCHAR(32) NOT NULL, [Title] NVARCHAR(128) NOT NULL, [Note] NVARCHAR(1024) NULL, ...
SELECT DISTINCT(CITY) FROM STATION WHERE SUBSTR(CITY, LENGTH(CITY), 1) NOT IN ('A', 'E', 'I', 'O', 'U');
CREATE TABLE [dbo].[dnn_EasyDNNNewsAuthorGroupImages] ( [GroupID] INT NOT NULL, [ModuleID] INT NOT NULL, [Width] INT NOT NULL, [Height] INT NOT NULL, [Created] BIT NOT NULL, [Resizing] NVARCHAR (15) NOT NULL, CONSTRAINT [PK_dnn_EasyDN...
DROP TABLE IF EXISTS `events`; CREATE TABLE `events` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `description` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `published_status` tinyint(4) NOT NULL, `...
-- IFS-6284 Adding date competition moved to PS tab. ALTER TABLE competition ADD COLUMN project_setup_started datetime; UPDATE competition c INNER JOIN application app ON app.competition = c.id INNER JOIN project p ON p.application_id=app.id SET c.project_setup_started = (SELECT MIN(manage_funding_email_date) FROM ap...
----------------------------------------------------------------------------------- --Do not modify this file, instead use an alter proc to over-write the procedure.-- --Make sure you follow the same expected interface of parameters, and resultsets.-- --------------------------------------------------------------------...
SELECT {{ columnNames }} FROM users_followers JOIN users ON users_followers.follower_user_id = users.user_id WHERE users_followers.user_id = '{{ userID }}';
CREATE TABLE squawk ( id serial, code integer NULL, country varchar(4) NULL, usage varchar(255) NULL ); INSERT INTO squawk (id, code, country, usage) VALUES (2, 0, 'FR', 'NON ATTRIBUE'), (3, 1, 'FR', 'VOL MILITAIRE'), (4, 2, 'FR', 'VOL MILITAIRE'), (5, 3, 'FR', 'VOL MILITAIRE'), (6, 4, 'FR', 'VOL MILITAIRE'), ...
-- -- POCOR-2489 -- -- security_functions DELETE FROM `security_functions` WHERE `id` = '6008'; -- db_patches DELETE FROM `db_patches` WHERE `issue` = 'POCOR-2489';
-- 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='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema wzq -- --...
-- Create table create table INDICATOR_TYPES ( id NUMBER(8) not null, name VARCHAR2(256) not null, priority NUMBER(1) not null, name_rus VARCHAR2(256) not null ) pctfree 10 initrans 1 maxtrans 255 storage ( initial 64K next 64K minextents 1 maxextents unlimited pctincreas...
/* * 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 ...
-- 10.03.2016 11:06 -- URL zum Konzept INSERT INTO AD_JavaClass (AD_Client_ID,AD_EntityType_ID,AD_JavaClass_ID,AD_JavaClass_Type_ID,AD_Org_ID,Classname,Created,CreatedBy,IsActive,IsInterface,Name,Updated,UpdatedBy) VALUES (0,540081,540039,540039,0,'org.compiere.session.ServerBase',TO_TIMESTAMP('2016-03-10 11:06:50','Y...
SELECT * FROM CIDADES; SELECT * FROM PREFEITOS; -- SOMENTE A INTERSECÇÃO SELECT * FROM CIDADES C INNER JOIN PREFEITOS P ON C.ID = P.CIDADE_ID; -- INTERSECÇÃO + ESQUERDA (TODAS AS CIDADES) SELECT * FROM CIDADES C LEFT JOIN PREFEITOS P ON C.ID = P.CIDADE_ID; -- INTERSECÇÃO + DIREITA (TODOS OS PREFEITOS) SELECT * FROM...
CREATE OR REPLACE FUNCTION update_modified_column() RETURNS TRIGGER AS $$ BEGIN NEW.modified = now(); RETURN NEW; END; $$ language 'plpgsql'; CREATE TRIGGER update_modtime BEFORE UPDATE ON users FOR EACH ROW EXECUTE PROCEDURE update_modified_column();
CREATE TABLE list (id VARCHAR(64) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "list" ("id", "value") VALUES ('ab', 'абхазки'); INSERT INTO "list" ("id", "value") VALUES ('awa', 'авади'); INSERT INTO "list" ("id", "value") VALUES ('av', 'аварски'); INSERT INTO "list" ("id", "value") VALUES ('ae'...
-- file:rowsecurity.sql ln:380 expect:true INSERT INTO part_document VALUES (100, 99, 1, 'regress_rls_dave', 'testing pp1r')
-- FlatPage ----------- -- title ALTER TABLE flatpages_flatpage ALTER COLUMN external_url SET DEFAULT ''; -- content ALTER TABLE flatpages_flatpage ALTER COLUMN target SET DEFAULT 'all'; -- source -- portal -- order ALTER TABLE flatpages_flatpage ALTER COLUMN date_insert SET DEFAULT now(); ALTER TABLE flatpages_flatpag...
CREATE TABLE IF NOT EXISTS feeds ( ContentType text NOT NULL PRIMARY KEY, ContentValue text DEFAULT "" ); INSERT OR IGNORE INTO feeds (ContentType, ContentValue) VALUES ("video", ""), ("vod", ""), ("stream_start", ""), ("stream_end", ""), ("stream_live", "0"), ("stream_message", ""); C...
USE [AIDE] GO /****** Object: StoredProcedure [dbo].[sp_GetAnnouncements] Script Date: 07/25/2019 9:59:13 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date,,> -- Description: <Description,,> ...
SELECT document.document_id, document.created, document.updated, document.document_title, document.status, _note.note_id, _note.note, _user.user_id, _user.email_address, _user.title, _user.first_name, _user.last_name, _user.institute_id, institute.institute_name, ...
-- -- Copyright 2009-2016 the original author or 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 -- -- Unles...
-- Deploy tupa:public_app_report to pg BEGIN; ALTER TABLE app_report DROP COLUMN user_id, DROP COLUMN status; COMMIT;
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 30-10-2021 a las 22:14:56 -- Versión del servidor: 10.4.11-MariaDB -- Versión de PHP: 7.4.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
-- file:foreign_data.sql ln:158 expect:false ALTER SERVER s0
---------------------------- -- Copyright (C) 2021 CARTO ---------------------------- CREATE OR REPLACE FUNCTION _CENTERMEDIAN (geojson STRING) RETURNS STRING LANGUAGE JAVASCRIPT IMMUTABLE AS $$ if (!GEOJSON) { return null; } @@SF_LIBRARY_CENTER@@ const medianCenter = transformationsLib.cente...
USE TelerikAcademy CREATE TABLE WorkHours ( EmployeeId INT IDENTITY, [Date] DATETIME, Task NVARCHAR(100), [Hours] INT, Comments NVARCHAR(300) CONSTRAINT PK_WorkHours PRIMARY KEY(EmployeeId) CONSTRAINT FK_WorkHours_Employees FOREIGN KEY(EmployeeId) REFERENCES Employees(EmployeeId) ) GO INSERT INTO WorkHours VA...
declare @tableNames varchar(max) = 'GeneralJournalEntry,GeneralJournalAccountEntry,Ledger,DimensionFinancialTag,DimensionAttributeValueCombination,DirPartyTable,OMOperatingUnit,MainAccount,DimensionAttribute,DimensionAttributeDirCategory'; Select X.Table_Name, X.Data_Path, X.Manifest_Path, X.Manifest_Name, 'NO_PARTIT...
-- @(#)2.sql 2.1.8.2 -- TPC-H/TPC-R Minimum Cost Supplier Query (Q2) -- Functional Query Definition -- Approved February 1998 :b :x :o :n 100 SELECT S_ACCTBAL, S_NAME, N_NAME, P_PARTKEY, P_MFGR, S_ADDRESS, S_PHONE, S_COMMENT FROM PART, SUPPLIER, PARTSUPP, NATION, REGION WHERE P_P...
CREATE TRIGGER trg_auth_users_100_log_changes BEFORE INSERT OR UPDATE OF password ON auth.users FOR EACH ROW EXECUTE PROCEDURE auth.crypt_user_password() = CREATE TRIGGER trg_auth_users_100_log_changes BEFORE INSERT OR UPDATE OF password ON auth.users FOR EACH ROW EXECUTE PROCEDURE auth.crypt_user_password() ...
-- @testpoint: 文本检索函数strip()处理int类型,合理报错 drop table if exists ts_zhparser; create table ts_zhparser(id int, body text); insert into ts_zhparser values(2, 'cat dat'); select strip(id) from ts_zhparser; --清理环境 drop table if exists ts_zhparser;
CREATE TABLE 테이블; ALTER TABLE 테이블 ADD COLUMN 나이 INT DEFAULT 0 NOT NULL; INSERT INTO 테이블(나이) VALUES(20),(30),(40); ALTER TABLE 테이블 ADD COLUMN 이름 VARCHAR FIRST; ALTER TABLE 테이블 ADD COLUMN 신분증 INT NOT NULL AUTO_INCREMENT UNIQUE; ALTER TABLE 테이블 ADD COLUMN 전화 VARCHAR(13) DEFAULT '000-0000-0000' AFTER 이름; ALTER TABLE 테이블 A...
CREATE TABLE `syslog_events`( `timestamp` string, `host` string, `message` string) PARTITIONED BY (`date` string, `hour` string) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS textfile
/* Assumptions channels channe_type = 1 primaire watergangen 1. if the left embankment or right embankment of a channel is larger than 0.30 or smaller than 0.1 or not filled at all, than the embankment will be filled as 2 for primary channels and 1.5 for not primary channels. 2. If the difference between the bed level...
CREATE TABLE IF NOT EXISTS `routes` ( `RouteID` int(11) NOT NULL AUTO_INCREMENT, `CallSign` varchar(8), `Operator_ICAO` varchar(4), `FromAirport_ICAO` varchar(4), `FromAirport_Time` varchar(10) NULL, `ToAirport_ICAO` varchar(4), `ToAirport_Time` varchar(10) NULL, `RouteStop` varchar(255), `Source` var...
ALTER TABLE `cms_file` DROP INDEX `author`, DROP INDEX `title`; ALTER TABLE `cms_file` DROP COLUMN `author`; ALTER TABLE `cms_file` DROP COLUMN `title`; ALTER TABLE `cms_file` DROP COLUMN `source`; ALTER TABLE `cms_file` ADD COLUMN `data` TEXT AFTER `original`;
set termout off create or replace package empty_suite as -- %suite procedure not_a_test; end; / create or replace package body empty_suite as procedure not_a_test is begin null; end; end; / set termout on declare l_result integer; begin select * into l_result from table(ut.run('empty_suite',utplsql_tes...
CREATE DATABASE IF NOT EXISTS `dei_db` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `dei_db`; -- MySQL dump 10.13 Distrib 5.5.55, for debian-linux-gnu (x86_64) -- -- Host: 127.0.0.1 Database: dei_db -- ------------------------------------------------------ -- Server version 5.5.55-0ubuntu0.14.04.1 /*!40101 SET @...
--- --- --- --- --- --- --- --- --- --- --- TSTORE FINAL UPDATES --- NAMESPACE "COUNTRY*", preparing and building from sources. -- -- Insert canonics into country-code namespace. -- WITH t AS (SELECT DISTINCT jinfo->>'iso3166_1_alpha_2' as iso2 FROM tlib.tmp_codes ORDER BY 1) SELECT tStore.upsert( iso2, -...
CREATE OR REPLACE TRIGGER SECURITY_HOUR_CHECK BEFORE DELETE OR UPDATE ON employee DECLARE --Declare variables HH_OF_DAY number(2); BEGIN --Set variables hh_of_day := TO_CHAR(SYSDATE,'HH24'); --Test the hour of the day IF HH_OF_DAY NOT BETWEEN 8 AND 17 THEN --Raise an application error ...
ALTER TABLE `web_domain` ADD COLUMN `ssl_letsencrypt_exclude` enum('n','y') NOT NULL DEFAULT 'n' AFTER `ssl_letsencrypt`; ALTER TABLE `remote_user` ADD `remote_access` ENUM('y','n') NOT NULL DEFAULT 'y' AFTER `remote_password`; ALTER TABLE `remote_user` ADD `remote_ips` TEXT AFTER `remote_access`;
CREATE TABLE [dbo].[TTrainPartSequence] ( --From MergedXSDs XSD --From 'genericRailML' Namespace [TTrainPartSequenceId] BIGINT NOT NULL, [Any] VARCHAR(MAX) NOT NULL, [Sequence] NVARCHAR(MAX) NOT NULL, [PathStatus] NVARCHAR(MAX) NOT NULL, [CategoryRef] NVARCHAR(MAX) NOT NULL, CONSTRAINT [PK_TTrain...
SELECT * FROM (SELECT old_hash_value, CASE SUM(executions) WHEN 0 THEN 0 ELSE SUM(${columnToSum})/SUM(executions) END AS "${sumColumnName}/Execution" FROM ( SELECT old_hash_value, -${columnToSum} AS ${columnToSum}, -executions AS executions FROM stats$sql_summary s WHERE snap_id = ${beginSnap} AND s.module = '${m...
-- phpMyAdmin SQL Dump -- version 4.9.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Generation Time: May 24, 2022 at 04:12 AM -- Server version: 5.7.32 -- PHP Version: 7.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `amazon` -- -- ----------------------------...
UPDATE character_quests SET name='Q00648_AnIceMerchantsDream' WHERE name='648_AnIceMerchantsDream';
-- Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. -- -- This program is licensed to you under the Apache License Version 2.0, -- and you may not use this file except in compliance with the Apache License Version 2.0. -- You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/li...
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- 主机: localhost -- 生成日期: 2014 年 08 月 03 日 02:24 -- 服务器版本: 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...
-- generate citations from nested doi json create or replace function util.f_extract_citation_dois(citation_json character varying(65535)) RETURNS character varying(65535) STABLE AS $$ import re import json dois = re.findall('"doi": "(10.*?)"', citation_json) return json.dumps([doi.lower() for doi in dois]) $$LANG...
SET search_path = pg_catalog; -- DEPCY: This VIEW depends on the COLUMN: public.testtable.c2 DROP VIEW public.testview; ALTER TABLE public.testtable ALTER COLUMN c2 TYPE text USING c2::text; /* TYPE change - table: public.testtable original: integer new: text */ CREATE VIEW public.testview AS SELECT testtable.c1,...
DROP TABLE IF EXISTS hmda_public.lar_2006; CREATE TABLE hmda_public.lar_2006( activity_year VARCHAR, respondent_id VARCHAR, agency_code VARCHAR, loan_type VARCHAR, loan_purpose VARCHAR, occupancy_type VARCHAR, loan_amount VARCHAR, action_taken VARCHAR, msa_md VARCHAR, state_co...
if exists (select * from INFORMATION_SCHEMA.VIEWS where TABLE_NAME = 'vwSqlForeignKeys') Drop View dbo.vwSqlForeignKeys; GO /********************************************************************************************************************** * Copyright (C) 2005-2022 SplendidCRM Software, Inc. * MIT Lice...
CREATE PROCEDURE [templateSchema__templateDimCoreName_dimSetup_Idempotent_MissingMember_usp].[test Does Not Update] AS BEGIN --ASSEMBLE IF OBJECT_ID('[templateSchema__templateDimCoreName_dimSetup_Idempotent_MissingMember_usp].ACTUAL') IS NOT NULL DROP TABLE [templateSchema__templateDimCoreName_dimSetup_Idempotent_Mi...
autocommit off; select product, quantity, location, shipment_pending from inventory_c i where product.product_code > 5; insert into inventory_c (product, quantity, location, shipment_pending) select product, quantity, location, shipment_pending from inventory_c where product.product_code > 5; select product, quan...
CREATE TABLE activity ( id_activity BIGSERIAL NOT NULL PRIMARY KEY, id_dependence_activity BIGINT, id_user_control BIGINT, description_activity VARCHAR(255) UNIQUE NOT NULL, startdate_activity TIMESTAMP NOT NULL DEFAULT (now() AT TIME ZONE 'u...
create table user_types( id serial primary key, user_type text not null unique ); insert into user_types (id, user_type) values (1,'standard'), (2,'administrator'); create table users( id serial primary key, first_name text not null, last_name text not null, email text not null unique, ...
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[IndexOptimize]') AND type in (N'P', N'PC')) BEGIN EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[IndexOptimize] AS' END GO ALTER PROCEDURE [dbo].[IndexOptimize] @Dat...
-- SQLite CREATE TABLE users( id INTEGER PRIMARY KEY, name VARCHAR(255) NOT NULL, username VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, created_at DATETIME DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ); CREATE TABLE quotes( id INTEGER PRIMARY KEY, ...
-- MySQL dump 10.13 Distrib 5.7.29, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: oasys -- ------------------------------------------------------ -- Server version 5.7.29 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40...
CREATE TABLE IF NOT EXISTS hero ( id SERIAL NOT NULL, "name" character varying(255) NOT NULL, "identity" character varying(255) NOT NULL, hometown character varying(255) NOT NULL, age INT NOT NULL, created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NO...
CREATE TABLE cuisines ( id UUID PRIMARY KEY, name VARCHAR(255) NOT NULL )
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 10 Jul 2019 pada 05.40 -- 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 ...
CREATE PROCEDURE [dbo].[dnn_GetAllFiles] AS BEGIN SELECT FileId, PortalId, [FileName], Extension, Size, Width, Height, ContentType, FolderID, Folder, StorageLocation, IsCached, UniqueId, VersionGuid, SHA1Hash, FolderMappingID, LastModificat...
-- test cases for array functions create temporary view data as select * from values ("one", array(11, 12, 13), array(array(111, 112, 113), array(121, 122, 123))), ("two", array(21, 22, 23), array(array(211, 212, 213), array(221, 222, 223))) as data(a, b, c); select * from data; -- index into array select a, b...
CREATE TABLE [dbo].[LanguageType] ( [LanguageTypeId] INT NOT NULL, [Code] VARCHAR (50) NOT NULL, [DisplayText] NVARCHAR (128) NOT NULL, [DisplayPriority] INT CONSTRAINT [DF_LanguageType_DisplayPriority] DEFAULT ((100)) ...
-- original: randexpr1.test -- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test SELECT case when t1.d not between (abs(d)/abs(t1.e))+t1.f*t1.a*a and 17*e then case when 11 between a and coalesce((select max(t1.b) from t1 where (case when t1.e+(t1.b) not in (t1.e,d,f) or 13<>17 then 17 when a>e then 11 else ...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 18, 2021 at 09:03 AM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.3.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
-- Function: public.annotation_creator_create(integer, integer, integer, character varying, jsonb, character varying[], jsonb[], text[], jsonb[], character varying, text[], jsonb[], text[], jsonb[], text[], jsonb[]) -- DROP FUNCTION public.annotation_creator_create(integer, integer, integer, character varying, jsonb, ...
CREATE TABLE Empresa_prestadora_servicio ( Num_nit BIGINT NOT NULL, Str_estado_empresa CHAR(1) NOT NULL, Str_servicios_prestados BIGINT NOT NULL, PRIMARY KEY (Num_nit) ) ;
COPY (SELECT id, created, modified, income_id, savings_id, deductions_id FROM legalaid_person WHERE (modified >= %(from_date)s::timestamp AND modified <= %(to_date)s::timestamp) OR (created >= %(from_date)s::timestamp AND created <= %(to_date)s::timestamp)) TO STDOUT CSV HEADER;
alter table STORY drop constraint STORY_TO_SPRINT_FK; alter table TASK drop constraint TASK_TO_STORY_FK; drop table if exists MESSAGE_EVENT cascade; drop table if exists SPRINT cascade; drop table if exists STORY cascade; drop table if exists TASK cascade; drop sequence TASK_ID_SEQ;
USE devops_ci_op; SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS=0; INSERT IGNORE INTO devops_ci_op.`role` VALUES (1,'超级管理员','admin',NULL,NULL,NULL); INSERT IGNORE INTO devops_ci_op.`schema_version` VALUES (1,'1','<< Flyway Baseline >>','BASELINE','<< Flyway Baseline >>',NULL,'root','2018-08-15 08:30:29',0,1); INSERT IG...
-- 2017-06-25T10:43:06.784 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy,Value) VALUES (0,0,257,540326,TO_TIMESTAMP('2017-06-25 10:43:06','YYYY-MM-DD HH24:MI:SS'),100,'Y',2...
-- @testpoint: 插入指数形式值 drop table if exists binary_integer07; create table binary_integer07 (name binary_integer); insert into binary_integer07 values (exp(3)); insert into binary_integer07 values (exp(3.222)); insert into binary_integer07 values (exp(-5)); insert into binary_integer07 values (exp(-0.112)); select * f...
# # TABLE STRUCTURE FOR: alistamientos # DROP TABLE IF EXISTS `alistamientos`; CREATE TABLE `alistamientos` ( `id` int(11) NOT NULL AUTO_INCREMENT, `vehiculo_id` int(11) DEFAULT NULL, `conductor_id` int(11) DEFAULT NULL, `licencia_chk` tinyint(1) DEFAULT NULL, `licencia_obs` text COLLATE utf8_spanish_ci, ...
-- start query 7 in stream 0 using template query7.tpl select i_item_id, avg(ss_quantity) agg1, avg(ss_list_price) agg2, avg(ss_coupon_amt) agg3, avg(ss_sales_price) agg4 from store_sales, customer_demographics, date_dim, item, promotion where ss_sold_date_sk = d_date_sk and ...
TRUNCATE TABLE VALID_NARR_FORMS DROP STORAGE / INSERT INTO VALID_NARR_FORMS (VALID_NARR_FORMS_ID,FORM_NAME,NARRATIVE_TYPE_CODE,MANDATORY,UPDATE_USER,UPDATE_TIMESTAMP) VALUES (SEQ_VALID_NARR_FORMS_ID.NEXTVAL,'Project-V1.0',(SELECT NARRATIVE_TYPE_CODE FROM NARRATIVE_TYPE WHERE DESCRIPTION = 'Project_Attachments'),nu...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 08-07-2016 a las 00:15:56 -- Versión del servidor: 10.1.10-MariaDB -- Versión de PHP: 7.0.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=...
ALTER SYSTEM SET wal_level = replica;
DROP TABLE IF EXISTS parties; DROP TABLE IF EXISTS candidates; DROP TABLE IF EXISTS voters; DROP TABLE IF EXISTS votes; CREATE TABLE candidates ( id INTEGER PRIMARY KEY, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(30) NOT NULL, industry_connected BOOLEAN NOT NULL, party_id INTEGER UNSIGNED, CONSTRAIN...
-- select8.test -- -- execsql { -- CREATE TABLE songs(songid, artist, timesplayed); -- INSERT INTO songs VALUES(1,'one',1); -- INSERT INTO songs VALUES(2,'one',2); -- INSERT INTO songs VALUES(3,'two',3); -- INSERT INTO songs VALUES(4,'three',5); -- INSERT INTO songs VALUES(5,'one',7); -- INSERT INTO song...
INSERT INTO NOTE(TITLE, CONTENT) VALUES ('Must do today','Lorem ipsum dolor sit amet, consectetur adipiscing elit. In volutpat, turpis vitae ultrices maximus, orci leo condimentum nunc, id faucibus lectus lacus id arcu.'), ('Pentatonic scale practice routine','Ut feugiat leo et commodo tincidunt. Nulla feugiat interdum...
CREATE TABLE IF NOT EXISTS user ( user_id INTEGER PRIMARY KEY, user_name TEXT, descrip TEXT, cookies INTEGER ); CREATE TABLE IF NOT EXISTS guild ( guild_id INTEGER PRIMARY KEY, guild_name TEXT, prefix TEXT, mod_mail INTEGER, log_channel INTEGER );
CREATE TABLE release_tags ( project string, application string, tag string, version string, ); CREATE UNIQUE INDEX IF NOT EXISTS release_tags_pk ON release_tags(project, application, tag)