sql
stringlengths
6
1.05M
-- 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 projetotc...
<reponame>austundag/recruitment-registry -- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: ...
--Test For substr set compatible_mode to 'oracle'; set datestyle to ISO,YMD; SELECT substr(21212, 2, 2) "substr"; SELECT substr(21212, 2) "substr"; SELECT substr(21212::int2, 2::int2, 2::int2) "substr"; SELECT substr(21221212::int4, 21::int4, 2::int4) "substr"; SELECT substr(21221212::int4, 21::int4) "substr"; SELECT s...
<reponame>taritom/bn-api UPDATE organizations SET event_fee_in_cents = 0 where event_fee_in_cents IS NULL; UPDATE events SET fee_in_cents = 0 where fee_in_cents IS NULL; ALTER TABLE organizations ALTER COLUMN event_fee_in_cents SET NOT NULL; ALTER TABLE organizations ALTER COLUMN event_fee_in_cents SET DEFAUL...
<reponame>Zhaojia2019/cubrid-testcases -- [er]create table with smallint data type and tests a create syntax with conditions like 'smallint NOT NULL SHARED UNIQUE' and then report syntax error CREATE CLASS ddl_0001( col1 smallint NOT NULL SHARED UNIQUE ); drop ddl_0001;
<reponame>jappeace/flora-server -- Copyright 2015 Six Colors AB -- Copyright 2021 Flora.pm development team -- -- 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.or...
<reponame>Lord-Drakyla/Education CREATE TABLE public.category ( id int PRIMARY KEY, name varchar(20) ); insert into category values (1, 'Овощи'), (2, 'Фрукты'), (3, 'Прочее'); CREATE TABLE public.sales ( id int PRIMARY KEY, customer_id int, product_id int, count int ); insert...
<reponame>jspilinek/oracleperf COL READTIM HEADING 'READTIM (cs)' COL WRITETIM HEADING 'WRITETIM (cs)' COL SINGLEBLKRDTIM HEADING 'SINGLEBLKRDTIM (cs)' COL AVGIOTIM HEADING 'AVGIOTIM (cs)' COL LSTIOTIM HEADING 'LSTIOTIM (cs)' COL MINIOTIM HEADING 'MINIOTIM (cs)' COL MAXIORTM HEADING 'MAXIORTM (cs)' COL MAXIOWTM ...
VACUUM;PRAGMA foreign_keys=ON;PRAGMA auto_vacuum=NONE;
<filename>queries.sql -- Multi-Table Query Practice -- Display the ProductName and CategoryName for all products in the database. Shows 77 records. select c.CategoryName as Category, p.ProductName as Product from [Product] as p join [Category] as c on p.CategoryId = c.Id -- Display the order Id and shipper CompanyNam...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 11, 2019 at 09:53 AM -- Server version: 10.1.19-MariaDB -- PHP Version: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
INSERT INTO [Assistant] ([Name]) VALUES ('Alfred'); INSERT INTO [Assistant] ([Name]) VALUES ('<NAME>'); INSERT INTO [Assistant] ([Name]) VALUES ('<NAME>');
<filename>sql/3 - Jun-2018/script_actualizacion_tablas_v1.1.sql  -- |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -- -- -- ACTUALIZACION DE TABLA EGRESOS -- -- |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -- If Exists(Select * From sys.foreign_keys Whe...
<reponame>rechandler/contractGenerator<filename>api/db/migrations/20210729003446_update_source/migration.sql /* Warnings: - You are about to drop the column `categoryId` on the `Source` table. All the data in the column will be lost. */ -- DropForeignKey ALTER TABLE "Source" DROP CONSTRAINT "Source_categoryId_fke...
{%- macro comment(kwargs) -%} {# ---- INTENT: generates a comment statmemt for post-hooks. If column is defined, the comment is column level. ---- Otherwise the comment is table-level. ---- ARGS: ---- - kwargs (dict) an object containing: ---- column (string) the name of the subject column, if...
create table Expressions ( left_operand varchar(255) null, operator enum ('<', '>', '=') null, right_operand varchar(255) null ); INSERT INTO leetcode_medium.Expressions (left_operand, operator, right_operand) VALUES ('x', '>', 'y'); INSERT INTO leetcode_medium.Expressions (left_opera...
<reponame>marymlucas/mimic_explore -- not 100% sure of this one, need to check as giving negative hours (ML) DROP TABLE IF EXISTS icustay_hourly; CREATE TABLE icustay_hourly AS -- This query generates a row for every hour the patient is in the ICU. -- The hours are based on clock-hours (i.e. 02:00, 03:00). -- The hou...
<filename>src/main/resources/updatedb.sql USE conflux_dex; -- 2020.12.09 CREATE TABLE IF NOT EXISTS t_order_archive ( id BIGINT NOT NULL AUTO_INCREMENT, product_id INT NOT NULL, user_id BIGINT NOT NULL, client_order_id VARCHAR(64), type VARCHAR(32) NOT NULL, side VARCHAR(32) NOT NULL, status VARCHA...
<filename>test-fixtures/postgres/books.sql CREATE TABLE books ( id SERIAL, title VARCHAR(100) NOT NULL, author VARCHAR(100) NOT NULL, published_date TIMESTAMP NOT NULL, isbn INT, PRIMARY KEY (id), UNIQUE (isbn) );
<gh_stars>10-100 ALTER TABLE SAKAI_PERSON_T CHANGE NOTES NOTES varchar(4000);
SET foreign_key_checks = 0; USE `mp3dbweb`; DROP TABLE IF EXISTS `album`; CREATE TABLE IF NOT EXISTS `album` ( `album_id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT '<unknown>', `albumfolder` varchar(255), `artist_id` int(11) NOT NULL, `albumartist_id` int(11) NOT NULL, PRIMARY KEY (`alb...
<reponame>carloscvj/Spain USE `Spain` ; insert into Spain.Municipios values(1001,"Alegría-Dulantzi",1); insert into Spain.Municipios values(1002,"Amurrio",1); insert into Spain.Municipios values(1003,"Aramaio",1); insert into Spain.Municipios values(1004,"Artziniega",1); insert into Spain.Municipios values(1006,"Armiñó...
<reponame>Thynkon/simple-orm TRUNCATE `answer`; TRUNCATE `question`; TRUNCATE `question_type`; TRUNCATE `quiz`; TRUNCATE `quiz_type`;
<reponame>totemsoft/jms<gh_stars>0 -- UI access UPDATE SYSTEM_FUNCTION SET NAME = '/uaaIncident', DESCRIPTION = 'Unwanted Alarm Activation (UAA) Incident Details' WHERE SYSTEM_FUNCTION_ID = 1147; INSERT INTO SYSTEM_FUNCTION (SYSTEM_FUNCTION_ID, MODULE, NAME, DESCRIPTION) VALUES (1149, '/file', '/uaaInvoice', 'U...
-- pset0.sql -- $Id: pset0.sql,v 1.1 2005/04/04 18:19:58 rkh Exp $ -- differential update of pset 0. drop table pset0; create temp table pset0 as select distinct pseq_id from palias where origin_id=origin_id('kabat'); create index pset0_pseq_id on pset0(pseq_id); analyze pset0; delete from pseqset where pset_id=0 ...
SET send_logs_level = 'fatal'; DROP DATABASE IF EXISTS database_for_dict; CREATE DATABASE database_for_dict; CREATE TABLE database_for_dict.table_for_dict ( key_column UInt64, second_column UInt8, third_column String, fourth_column Float64 ) ENGINE = MergeTree() ORDER BY key_column; INSERT INTO database_for...
<gh_stars>10-100 CREATE FUNCTION func145() RETURNS integer LANGUAGE plpgsql AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE266);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE70);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE214);val:=(SELECT CO...
<filename>SQL/testingInvQuery.sql SELECT feature_id as fid, proj_age_1 as age, proj_height_1 as height , crown_closure as crownclosure FROM veg_comp_lyr_r1_poly_finalv3_deliveryv2 WHERE feature_id IN ( 2244131, 2244131, 2244131, 2244131, 2244131, 2244131, 2244131 ,1975241 ,1975241, 3114307, 3114307 ,3114307, 19565...
-- // CB-12871 Altering the table to detached column and indexs to include detached flag -- Migration SQL that makes the change goes here. DROP INDEX IF EXISTS idx_sdxcluster_accountid_envname_deleted; DROP INDEX IF EXISTS unq_index_sdxcluster_accountid_envname_deleted_is_null; DROP INDEX IF EXISTS unq_index_sdxcluste...
-- Convert schema 'lib/auto/Tapper/Schema/Tapper-Schema-ReportsDB-3.000002-SQLite.sql' to 'lib/auto/Tapper/Schema/Tapper-Schema-ReportsDB-3.000004-SQLite.sql':; BEGIN; ALTER TABLE reportgrouparbitrary ADD COLUMN owner VARCHAR(255); ALTER TABLE reportgrouptestrun ADD COLUMN owner VARCHAR(255); COMMIT;
ALTER TABLE `version_previews` DROP FOREIGN KEY `version_previews_version_id_fk_versions_id`, CHANGE COLUMN `version_id` `version_id` INT (10) UNSIGNED NOT NULL, CHANGE COLUMN `position` `position` INT (11) NOT NULL, ADD INDEX `version_previews_version_id_49b254c1_fk_versions_id` (`version_id`), ADD...
-- create table of range partition having boundary values and maxvalue on string field that using to_time function and query all partitions CREATE TABLE za ( store_id string ) PARTITION BY range(to_time(store_id)) ( partition p0 values less than ('09:00:00'), partition p1 values less than ('12:00:00'), partition p...
START TRANSACTION; INSERT INTO `account` (`id`, `client_id`, `username`, `<PASSWORD>`, `insert_date`, `last_access`, `activationstatus_id`) VALUES (1, 1, 'test', '<PASSWORD>','2015-07-25 23:59:59', '2015-07-26 00:00:00', 1); COMMIT;
<gh_stars>1-10 create table t1 (a integer auto_increment, i1 integer, s1 varchar(10), d1 double, c1 set(int)); -- expected domain = int prepare st from 'insert into t1(i1) values ( mod (? , ?))' execute st using 5, 3; prepare st from 'insert into t1(i1) values ( mod (? , ?))' execute st using 5, '3'; prepare st from...
DROP TABLE IF EXISTS `lib_book`; DROP TABLE IF EXISTS `lib_publisher`; CREATE TABLE `lib_publisher` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(40) NOT NULL, `place` varchar(32) DEFAULT NULL, PRIMARY KEY (`id`) ); insert into `lib_publisher`(`id`,`name`,`place`) values (1,'Wiley','Hoboken, NJ'), (2,...
<filename>src/SFA.DAS.DATA.MANAGEMENT/Tables/ASDataPL_Comt_Providers.sql CREATE TABLE [ASData_PL].[Comt_Providers] ( UKPRN [bigint] NOT NULL, Name [nvarchar](100) NOT NULL, Created [datetime2](7) NOT NULL, Updated [datetime2](7) NULL, AsDm_UpdatedDateTime datetime2 default getdate(), CONSTRAINT PK_Comt_Prov...
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Waktu pembuatan: 27 Jan 2021 pada 04.33 -- Versi server: 5.7.24 -- Versi PHP: 5.6.37 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTE...
set echo off set linesize 200 set pagesize 0 set heading off set trimspool on set feedback off set serveroutput on spool test4.csv WITH a AS ( SELECT TO_CHAR(employee_id) AS "Emp ID", last_name||', '||first_name AS "Fname", hire_date AS "Date,Hire,YYYYMMDD", salary AS "Salary" FROM hr.employees UNION ALL ...
CREATE TABLE 'test' ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `name` VARCHAR(128) NOT NULL DEFAULT "", PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
<filename>SQL/weatherStation3.sql<gh_stars>0 select distinct(CITY) from STATION where mod(ID, 2) = 0;
<filename>blog/user/backup/backup-2018-07-08-at-09-09-59.sql<gh_stars>0 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT=0; START TRANSACTION; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=...
<filename>mysql/cmd/info.function.sql<gh_stars>10-100 sql @info.procedure.sql
<reponame>AirPageInc/pg-utils -- Deploy procedures/verify_role to pg BEGIN; CREATE FUNCTION verify_role (_user text) RETURNS boolean AS $$ BEGIN IF EXISTS ( SELECT 1 FROM pg_roles WHERE rolname = _user) THEN RETUR...
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[SQLCop].[test Instant File Initialization]') AND type in (N'P', N'PC')) DROP PROCEDURE [SQLCop].[test Instant File Initialization] GO CREATE PROCEDURE [SQLCop].[test Instant File Initialization] AS BEGIN -- Written by <NAME> -- February 25, 2012 -...
<filename>src/sql/42.sql ALTER TABLE `option_blocks` ADD `rand_prob` FLOAT NULL DEFAULT NULL AFTER `rand_bytes`; INSERT INTO modules SET module_name='SingleElimination';
-- file:tablesample.sql ln:11 expect:true SELECT id FROM test_tablesample TABLESAMPLE BERNOULLI (5.5) REPEATABLE (0)
<reponame>chengwenxin/sqlite-parser -- original: randexpr1.test -- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test SELECT case b*coalesce((select coalesce((select max(coalesce((select t1.b from t1 where t1.a<>11),17+~19)) from t1 where (t1.e<>e)),case 13 when 17 then 13 else c-coalesce((select max(case whe...
<gh_stars>1000+ CREATE TABLE foo ( other text NOT NULL, total bigint NOT NULL, retyped text NOT NULL ); CREATE TABLE bar ( other text NOT NULL, total bigint NOT NULL, also_retyped text NOT NULL ); CREATE TABLE baz ( other text NOT NULL, total ...
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/RELEASE-SCRIPTS/KC-RELEASE-3_2-SCRIPT/oracle/dml/KR_DML_01_KRACOEUS-5086_B000.sql INSERT INTO KRNS_PARM_T (APPL_NMSPC_CD,CONS_CD,NMSPC_CD,OBJ_ID,PARM_DESC_TXT,PARM_DTL_TYP_CD,PARM_NM,PARM_TYP_CD,TXT,VER_NBR) VALUES ('KC','A','KC-PD',SYS_GUID()...
<reponame>phoenixsbk/kvmmgr<filename>packaging/dbscripts/upgrade/03_03_0160_increase_guest_ram.sql update vm_static set mem_size_mb = 1024 where vm_guid = '00000000-0000-0000-0000-000000000000' and mem_size_mb < 1024;
<reponame>hutomadotAI/web-api<gh_stars>1-10 USE `hutoma`; LOCK TABLES `entity_value` WRITE; ALTER TABLE `hutoma`.`entity_value` CHANGE `value` `value` VARCHAR(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL; UNLOCK TABLES;
<filename>work-logs.sql /* Navicat MySQL Data Transfer Source Server : 127.0.0.1 Source Server Version : 50719 Source Host : 127.0.0.1:3306 Source Database : work-logs Target Server Type : MYSQL Target Server Version : 50719 File Encoding : 65001 Date: 2020-08-12 21:40:03 */ SET F...
<filename>framework-db/framework-db-demo/src/main/java/com/hbasesoft/framework/db/demo/dao/IStudentDao_queryStudentCourse.h2.sql select s.id, s.name, s.age, sc.score, c.course_name from t_student s, t_course c, t_student_course sc where s.id = sc.student_id and c.id = sc.course_id #if($entity.name) ...
<gh_stars>0 /********************table structure salary_earnings_head******************************/ CREATE TABLE `salary_earnings_head` ( `seh_id` INT(11) NOT NULL AUTO_INCREMENT , `seh_empid` INT(11) NOT NULL , `seh_headid` int(11) NOT NULL, `seh_headname` VARCHAR(255) NOT NULL , ...
<filename>SampleDatabaseProvider.Tests/ExecutionService/Sample/Sample_bootstrap.sql CREATE TABLE DUMMY%Machine% (ID INT NOT NULL, VAL int) INSERT INTO DUMMY%Machine% (ID, VAL) VALUES (1, 1) CREATE TABLE BIG_DATA%Machine%(ID int NOT NULL, VAL_SMALL1 nvarchar(50), VAL_SMALL2 nvarchar(50), VAL_BIG1 nclob, VAL_BIG2 nclob)
INSERT INTO `#__js_vehiclemanager_config` (`configname`, `configvalue`, `configfor`) VALUES ('topmenu_controlpanel', '1', 'topmenu'); REPLACE INTO `#__js_vehiclemanager_config` (`configname`, `configvalue`, `configfor`) VALUES ('productversion', '110', 'default');
<reponame>vithep/SQL /* TRIGGERS */ CREATE TABLE PRODUTOS( IDPRODUTO INT IDENTITY PRIMARY KEY, NOME VARCHAR(50) NOT NULL, CATEGORIA VARCHAR(30) NOT NULL, PRECO NUMERIC(10,2) NOT NULL ) GO CREATE TABLE HISTORICO( IDOPERACAO INT PRIMARY KEY IDENTITY, PRODUTO VARCHAR(50) NOT NULL, CATEGORIA VARCHAR(30) NOT NULL,...
<filename>src/main/resources/data.sql INSERT INTO `supermarket`(`name`,`price`,`quantity`)VAlUES('apple',0.49,10);
<reponame>RollingSoftware/L2J_HighFive_Hardcore<gh_stars>0 ALTER TABLE `items` DROP `time_left`; alter table `items` add `time` decimal NOT NULL DEFAULT 0 after `mana_left`;
create database if not exists `montaja` charset=utf8_general_ci collate=utf8; create table if not exists `fotos`( `id` int(11) auto_increment not null, `pedido` int(11) not null, `endereco` varchar(255) not null, `cidade` varchar(100) not null, `montador` varchar(100) not null, `telefone` varchar(20) not null, `data` ...
<filename>db/quanlycafe_8-10-2016 12h.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 08, 2016 at 06:48 AM -- Server version: 10.1.16-MariaDB -- PHP Version: 5.5.38 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!4...
<filename>install/Plugin/Install/sql/structure.sql ALTER DATABASE `[[[[database]]]]` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; DROP TABLE IF EXISTS `ip_page`; CREATE TABLE `ip_page` ( `id` int(11) NOT NULL AUTO_INCREMENT, `languageCode` varchar(6) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAU...
<gh_stars>0 -- GAME DATABASE QUERIES -- SER 322 Deliverable 3 -- Authors: <NAME> (mgdb), <NAME> (jcpowel5) -- * realistic select queries for each tables * -- -- get the series information and a list of game names associated with that series need prepared statement to fully query -- SELECT s.description, s.name, g.eng...
-- ============================================================================ -- These functions are common to all bindings of the Repertoire faceting API -- -- <NAME> -- MIT Hyperstudio -- February 2014 -- ============================================================================ -- Aggregator to measure how man...
SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = ON; SET check_function_bodies = FALSE; SET client_min_messages = WARNING; CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; SET...
-- file:select_parallel.sql ln:44 expect:true explain (costs off) execute tenk1_count(1)
/* Add number of mental health occurrences to the fact table and relevant dimensions to the dimension tables. Counts one offence per mental health incident, per person, per march ye. Incidents come from the previously created intermediate.mha_events table, which has mental-health-related interactions with pharamceut...
<reponame>DhrumilShah98/Dalhousie_University_CSCI5408_DMWA -- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64) -- -- Host: localhost Database: csci5408_a1_p1_2 -- ------------------------------------------------------ -- Server version 5.7.23 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!...
CREATE TABLE IF NOT EXISTS steads ( id INT NOT NULL PRIMARY KEY, objectid INT NOT NULL, objectguid UUID NOT NULL, changeid INT NOT NULL, number VARCHAR(250) NOT NULL, opertypeid VARCHAR(2) NOT NULL, previd INT, nextid INT, updatedate DATE NOT NULL, startdate DATE NOT NULL, en...
DROP DATABASE IF EXISTS employeeManager_db; CREATE DATABASE employeeManager_db; -- departments table USE employeeManager_db; CREATE TABLE departments ( id INT AUTO_INCREMENT PRIMARY KEY NOT NULL, name VARCHAR(30) NOT NULL ); -- roles table USE employeeManager_db; CREATE TABLE roles ( id INT AUTO_INCREMENT PRIMARY KEY...
-- ************************************************************************************************** -- Table:MeasureType -- ************************************************************************************************** IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'MeasureLocation') AND OBJECTPR...
-- populate fasstr.fasstr_flows from the HYDAT schema. with flows as ( select f.station_number, year, month, flow1, flow2, flow3, flow4, flow5, flow6, flow7, flow8, flow9, flow10, flow11, flow12, flow13, flow14, flow15, flow16, flow17, ...
CREATE PROCEDURE [dbo].[PointSurvey_Save] @Id UNIQUEIDENTIFIER, @LocationId UNIQUEIDENTIFIER, @StartTime DATETIME, @EndTime DATETIME, @NoiseCode TINYINT, @SiteVisitId UNIQUEIDENTIFIER AS SET NOCOUNT ON; UPDATE dbo.PointSurvey SET LocationId = @LocationId, StartTime = @StartTime, EndTime ...
<gh_stars>0 /* * Create extensions * Usage: psql -U postgres -h host.docker.internal -p 5432 -d turbinator -f 01_create_extensions.sql */ BEGIN; CREATE EXTENSION postgis; END;
-- Created by <NAME> <<EMAIL>> CREATE TABLE if not exists gems__systemuser_setup ( gsus_id_user bigint unsigned not null references gems__staff (gsf_id_user), gsus_secret_key varchar(400) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null default null, gsus_create_user ...
-- alter table which create using int,time,date,timestamp to add 1 range partition on date field create table range_test(id int not null , test_time time, test_date date, test_timestamp timestamp,primary key(id,test_date)); ALTER TABLE range_test PARTITION BY RANGE (test_date) ( PARTITION p0 VALUES LESS TH...
SELECT "a"."happy" as "a.happy", "r"."fun" as "r.fun", "q" FROM happiness as a INNER JOIN rainbows r on a.id = r.happy_id;
<reponame>opengauss-mirror/Yat -- @testpoint:opengauss关键字Local(非保留),作为字段数据类型(合理报错) --前置条件 drop table if exists explain_test cascade; --关键字不带引号-合理报错 create table explain_test(id int,name Local); --关键字带双引号-合理报错 create table explain_test(id int,name "Local"); --关键字带单引号-合理报错 create table explain_test(id int,name 'Loca...
<filename>01.Database-Basics/03.Build-in-Functions.sql<gh_stars>0 USE SoftUni; -- 1.Find Names of All Employees by First Name SELECT FirstName, LastName FROM Employees WHERE FirstName LIKE 'SA%'; -- 2.Find Names of All employees by Last Name SELECT FirstName, LastName FROM Employees WHERE LastName ...
-- MySQL Script generated by MySQL Workbench -- 05/03/17 16:00:22 -- 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='TRADITION...
SELECT a.tag_name, a.tag_id, a.discussion_count, a.post_count, b.last_posted_discussion_id, b.last_posted_at, b.last_posted_user_id FROM ( SELECT t.name as tag_name, t.id as tag_id, count(td.discussion_id) as discussion_count, COALESCE(sum(d.comment_count), 0) as post_count, MAX(d.last_posted_at) as max_las...
/* drop database is only for the purpose of this exercise */ DROP DATABASE IF EXISTS employeeTracker_db; CREATE DATABASE employeeTracker_db; USE employeeTracker_db; CREATE TABLE department ( id INT NOT NULL AUTO_INCREMENT, dept_name VARCHAR(30) DEFAULT NULL, PRIMARY KEY (id) ); CREATE TABLE role ( id INT NOT...
-- MySQL Script generated by MySQL Workbench -- Sat Dec 19 15:08:55 2020 -- 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...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.3.8 -- http://www.phpmyadmin.net -- -- Хост: localhost -- Время создания: Июл 05 2017 г., 04:26 -- Версия сервера: 5.6.32-78.1-log -- Версия PHP: 5.6.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER...
-- ----------------------------------------------------- -- Table `posting_requirement` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `posting_requirement` ( `posting_requirement_id` INT NOT NULL AUTO_INCREMENT, ...
<gh_stars>0 -- MySQL dump 10.13 Distrib 5.5.62, for Linux (x86_64) -- -- Host: localhost Database: anugrahc_podcast -- ------------------------------------------------------ -- Server version 5.5.62-cll /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHAR...
<reponame>cy-xu/MAT259_Data_Visualization SELECT * FROM spl_2016.inraw WHERE title LIKE '%obama%' AND YEAR(cout) > 2015 LIMIT 10000
<filename>webauth/resources/sql/user.log.event.sql<gh_stars>1-10 INSERT INTO webauth_user_log(user_id, event, ip, d) VALUES (:id, :event, :ip, :d)
<reponame>lgongmsft/sql-server-samples -- ******************************************************** -- -- Table variable deferred compilation -- See https://aka.ms/IQP for more background -- Demo scripts: https://aka.ms/IQPDemos -- This demo is on SQL Server 2019 Public Preview and works in Azure SQL DB too -- Emai...
<gh_stars>1-10 -- -------------------------------------------------------- -- Servidor: 127.0.0.1 -- Versão do servidor: 5.7.31 - MySQL Community Server (GPL) -- OS do Servidor: Win32 -- HeidiSQL Versão: 11.3.0.6295 -- --------------------------------------------...
<reponame>SkillsFundingAgency/das-assessor-service -- To check Certificate and learner states /* STATE 1. Certificate Submitted 2. EPA Fail 3. EPA Pass 4. Draft Certificate (in UI) 5. Draft Certificate (in API) 6. Previous Fail now back in Draft Certificate in UI 7. Deleted Certificate 8. No EPA / Certificate 9. No mat...
<reponame>jdkoren/sqlite-parser<filename>src/test/resources/tkt3493.test_24.sql<gh_stars>100-1000 -- tkt3493.test -- -- execsql { SELECT a>b COLLATE BINARY FROM t2 GROUP BY a, b} SELECT a>b COLLATE BINARY FROM t2 GROUP BY a, b
-- -- Copyright 2004-2014 The Kuali Foundation -- -- Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php -- -- Unless required by ap...
<gh_stars>1-10 -- -- drop tables that are no longer used -- drop table qrtz_job_listeners; drop table qrtz_trigger_listeners; -- -- drop columns that are no longer used -- alter table qrtz_job_details drop column is_volatile; alter table qrtz_triggers drop column is_volatile; alter table qrtz_fired_triggers drop column...
USE ota; INSERT INTO Instrument (Name) values ('AUD/CAD'); INSERT INTO Instrument (Name) values ('CHF/JPY'); INSERT INTO Instrument (Name) values ('EUR/NZD'); INSERT INTO Instrument (Name) values ('GBP/JPY'); INSERT INTO Instrument (Name) values ('TRY/JPY'); INSERT INTO Instrument (Name) values ('USD/SEK'); IN...
<gh_stars>0 -- Add build timestamp column to android appliation table. It is maintained by business logic since database takes care of application dirty timestamp. ALTER TABLE `atlas`.`androidapp` ADD COLUMN `buildTimestamp` TIMESTAMP NOT NULL DEFAULT '1970-01-02 12:00:00' AFTER `timestamp`;
CREATE TABLE [dbo].[__MigrationLog] ( [migration_id] [uniqueidentifier] NOT NULL, [script_checksum] [nvarchar] (64) COLLATE Latin1_General_CI_AS NOT NULL, [script_filename] [nvarchar] (255) COLLATE Latin1_General_CI_AS NOT NULL, [complete_dt] [datetime2] NOT NULL, [applied_by] [nvarchar] (100) COLLATE Latin1_General_CI...
<filename>models/stg_lever__resume.sql with base as ( select * from {{ ref('stg_lever__resume_tmp') }} ), fields as ( select {{ fivetran_utils.fill_staging_columns( source_columns=adapter.get_columns_in_relation(ref('stg_lever__resume_tmp')), staging...
UPDATE user SET pending_roles = roles; UPDATE user SET roles = 'ROLE_USER';
<filename>src/test/resources/db/migration/V1__create_table.sql<gh_stars>10-100 create table TESTTABLE ();