sql
stringlengths
6
1.05M
/* * Source <NAME> * * Simple Questions to check the knowledge * */ SELECT 1+2'3' SELECT 1+'2' '3' SELECT A + '2' '3' ---------------- SELECT count(1) SELECT count(2) SELECT count(1+2) SELECT COUNT(1+'A') SELECT COUNT(1/0) SELECT COUNT(1/0/0) SELECT COUNT(1/-1) SELECT COUNT(NULL) SELECT COUNT(NULL/1) SELECT COUNT(1/...
<filename>users.sql -- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 12, 2018 at 07:27 AM -- Server version: 10.1.31-MariaDB -- PHP Version: 5.6.34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"...
-- phpMyAdmin SQL Dump -- version 4.9.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Dec 17, 2020 at 02:47 PM -- Server version: 5.6.49-cll-lve -- PHP Version: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET ...
create database arisa; use arisa; create table rol( idRol int primary key auto_increment, nombre varchar(50), borradoLogico int ); create table usuario( idUser int primary key auto_increment, nombre varchar(50), correo varchar(50), pass varchar(50), image varchar(250), idRol int, borradoLogico int, foreign key(idRol)...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 16 Jan 2020 pada 20.11 -- Versi server: 10.1.35-MariaDB -- Versi PHP: 7.2.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
/* titulo: CortarDeseadoPorManzana.sql descripción: con circuitos definidos por manzanas indeendientes va cortando de a $d$, cantidad deseada de viviendas por segmento sin cortar piso autor: -h fecha: 2019-04-18 Ju */ --- usando windows para ayudar a calcular cortes ---------------------------------------------------...
/****** Object: StoredProcedure [AddF09_Region_ReChild] ******/ IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[AddF09_Region_ReChild]') AND type in (N'P', N'PC')) DROP PROCEDURE [AddF09_Region_ReChild] GO CREATE PROCEDURE [AddF09_Region_ReChild] @Region_ID2 int, @Region_Child_N...
USE [ANTERO] GO /****** Object: View [dw].[v_virta_otp_erikoistumiskoulutukset] Script Date: 26.3.2020 19:42:17 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER VIEW [dw].[v_virta_otp_erikoistumiskoulutukset] AS SELECT d6.vuosi as [Aloitusvuosi], d4.sukupuoli_fi as [Sukupuol...
<reponame>ogobrecht/console set define off set feedback off set serveroutput on whenever sqlerror exit sql.sqlcode rollback --https://blogs.oracle.com/oraclemagazine/sophisticated-call-stack-analysis --https://oracle-base.com/articles/12c/utl-call-stack-12cr1 prompt TEST TRACE exec console.init; prompt - Create test...
<reponame>rentadba/dbaTDPMon<filename>source/common/tables/dbo.appConfigurations.sql -- ============================================================================ -- Copyright (c) 2004-2015 <NAME> (<EMAIL>) -- ============================================================================ -- Author : <NAME> -- Create...
BEGIN; \i /specs/sql-support/insert_platform_user_project.sql SELECT plan(4); SELECT function_returns('payment_service', 'inactive_invalid_subscriptions', '{}'::text[], 'json'); create or replace function test_inactive_invalid_subscriptions() returns setof text language plpgsql as $$ ...
<gh_stars>10-100 DROP TABLE IF EXISTS oracle_queries;
<reponame>mcausse/lechuga-jdbc drop table tex if exists; drop table exp if exists; create table exp ( cod_pos varchar(100) /* id.codPos */ , any_exp smallint /* id.anyExp */ , num_exp integer /* id.numExp */ , descr varchar(100) /* desc */ ); alter table exp add constraint pk_exp primary key (cod_pos,any_exp,num...
<gh_stars>0 CREATE TABLE [dbo].[EmailTemplate] ( [Id] INT IDENTITY (1, 1) NOT NULL, [EmailTypeId] int NOT NULL, [Name] NVARCHAR (50) NOT NULL, [Content] TEXT NOT NULL, [Active] BIT NOT NULL DEFAULT 1, CONSTRAINT [PK_EmailTemplate] PRIMARY KEY CLUSTERED ([Id] ASC),...
<filename>test/sql/partitioned_table.sql /** 测试环境信息 CN:127.0.0.1 WORKER1:worker_1_host/57637 WORKER2:worker_2_host/57638 WORKER3:worker_3_host/57639 worker_1_host、worker_2_host、worker_3_host:都是127.0.0.1 */ set datestyle = ISO, YMD; set search_path = cigration_regress_test, cigration, public; set citus.sh...
<reponame>kxbmap/sbt-jooq<gh_stars>10-100 create table "book_to_book_store" ( "name" varchar2(400) not null, "book_id" integer not null, "stock" integer, primary key ("name", "book_id"), constraint "fk_b2bs_book_store" foreign key ("name") references "book_store" ("name") on delete casca...
/** * Database schema required by \yii\log\DbTarget. * * The indexes declared are not required. They are mainly used to improve the performance * of some queries about message levels and categories. Depending on your actual needs, you may * want to create additional indexes (e.g. index on `log_time`). * *...
--create range partition table with int data type,create other range partition table with int data type,select data from these two tables and order by keyword create table range_test(id int, test_int int, test_smallint smallint, test_numeric numeric(38,10), test_float float, test_real real, tes...
<filename>server/db/insert_genres.sql<gh_stars>0 insert into "Genre"(name, maingenre) values ('acid rock', 'rock'), ('acoustic', 'rock'), ('alternative rock', 'rock'), ('aor', 'rock'), ('arena rock', 'rock'), ('art rock', 'rock'), ('atmospheric black metal', 'rock'), ('avantgarde', 'rock'), ('beat', 'rock'), ('black me...
USE ToTheRescue INSERT INTO AspNetUsers (Id,UserID,Email,EmailConfirmed,PasswordHash,SecurityStamp,PhoneNumber,PhoneNumberConfirmed,TwoFactorEnabled,LockoutEndDateUtc,LockoutEnabled,AccessFailedCount,UserName) VALUES ('0a716881-49cc-4461-a16f-04eec9f76116','7','<EMAIL>','0','AHn+LpDe7SuyqSj++Z4buiH9yND0hZk2lwZgSzURGe...
<gh_stars>0 SELECT model, speed AS MHZ, hd AS GB FROM pc WHERE price < 1200.0; SELECT DISTINCT product.maker FROM product, printer WHERE printer.model = product.model; SELECT model, ram, screen FROM laptop WHERE price > 1000.0; SELECT * FROM printer WHERE color = 'y'; SELECT model, speed, hd FROM pc WHERE c...
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 21, 2019 at 11:03 AM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<reponame>zonafets/TSQL-Utils<gh_stars>0 /* leave this l:see LICENSE file g:utility,script v:131201.0900\s.zaglio: adapted to change of tids.svr->tids.srv v:131125\s.zaglio: moved manage of log_ddl into sp__utility_setup v:131002\s.zaglio: moved code from trigger db to sp__script_store v:12092...
<reponame>pschlump/Go-FTL<filename>server/midlib/SessionRedis/sql/mon-test-pt3.sql update "t_monitor_stuff" set "timeout_event" = current_timestamp - interval ' 1 minute ' where "id" = '000ef9f5-c82d-4866-8316-a9097cbcff97' ;
<gh_stars>10-100  -- test #1 DECLARE @StreamId UNIQUEIDENTIFIER = newid(), @Events [dbo].[Events], @CorrelationId UNIQUEIDENTIFIER = newid(), @PreCommitState VARCHAR(MAX), @PostCommitState VARCHAR(MAX), @Counter INT = 0; -- add events WHILE @Counter < 1 BEGIN INSERT INTO @Even...
ALTER TABLE egdu_uploadregistry ALTER COLUMN createdby TYPE varchar(512); ALTER TABLE egdu_uploadregistry ALTER COLUMN lastmodifiedby TYPE varchar(512);
<gh_stars>10-100  -- ogr2ogr -f postgresql -skipfailures -update -append -nlt MULTIPOLYGON PG:"dbname='gis' host='172.16.17.32' port='5432' user='postgres' password='<PASSWORD>'" ../GAUL/g2013_2012_2/g2013_2012_2/G2013_2012_2.shp --DELETE FROM g2013_2012_2 DROP TABLE g2013_2012_2; -- NOW change geometry to generic Geo...
-- file:vacuum.sql ln:6 expect:true INSERT INTO vactst VALUES (1)
<filename>novice/sql/gen-survey-database.sql -- The `Person` table is used to explain the most basic queries. -- Note that `danforth` has no measurements. create table Person( ident text, personal text, family text ); insert into Person values('dyer', 'William', 'Dyer'); insert into Person values('pb', ...
/* Replace with your SQL commands */ ALTER TABLE water.billing_batches RENAME COLUMN bill_run_number TO bill_run_id;
ALTER TABLE job_runs DROP COLUMN job_run_definition_guid; ALTER TABLE db_table_versions DROP COLUMN db_guid; DROP TABLE ownerships; DROP TABLE job_run_definitions; DROP TABLE stream_dataset_versions; DROP TABLE iceberg_dataset_versions; DROP TABLE db_dataset_versions; DROP TABLE dbs; DROP TABLE dataset_versions;
<gh_stars>0 DELETE FROM PRODUCTS_LOCATIONS; DELETE FROM ORDER_DETAILS; DELETE FROM PRODUCTS; DELETE FROM PRODUCT_CATEGORIES; DELETE FROM PRODUCT_DETAILS; DELETE FROM ORDERS; DELETE FROM USERS_JOIN_ROLES; DELETE FROM USER_ROLES; DELETE FROM USERS; DELETE FROM LOCATIONS; DELETE FROM EMPLOYEES; DELETE FROM CUSTOMERS; DELE...
<reponame>alexavila150/luciddb -- test STRING builtin functions set schema 's'; select s1 || '-' || s2, upper(s1), lower(s2), trim(s3), substring(s2 from 4 for 3), position('RI' in s2), position('ri' in s2), char_length(s2) from boris ; select position('ing' in s2), position('' in s2), position('ing' in snull) from b...
<gh_stars>1-10 CREATE TABLE tbl_signups ( id INT AUTO_INCREMENT PRIMARY KEY, token VARCHAR(100) NOT NULL UNIQUE KEY, error VARCHAR(100), email VARCHAR(320), username VARCHAR(100), challenge CHAR(8), created_unix INT UNSIGNED NOT NULL, user INT NULL, FOREIGN KEY (user) REFERENCES tbl_...
<gh_stars>1-10 IF (db_id('cdc_test') is null) CREATE DATABASE cdc_test; go use cdc_test go if schema_id('cdc_test') IS NULL BEGIN EXEC('CREATE SCHEMA cdc_test') END if (object_id('cdc_test.ontime') is null) CREATE TABLE cdc_test.cdc_test.ontime ( id bigint primary key, Year int DEFAULT NULL, Quarter tinyint DEF...
select name, arn, endpoint, status from aws.aws_eks_cluster where arn = '{{ output.resource_aka.value }}';
<filename>parse/src/test/resources/ddl/alter/mysql_55.sql CREATE TABLE `tb_epubreeayc` ( `col_embnqthyuu` double NOT NULL, `col_shqnxczemy` binary(149) DEFAULT NULL, `col_gyjfdfpemu` longtext CHARACTER SET utf8, PRIMARY KEY (`col_embnqthyuu`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE `tb_uafierhjhg`...
-- -- COPY -- -- directory paths are passed to us in environment variables \getenv abs_srcdir PG_ABS_SRCDIR \getenv abs_builddir PG_ABS_BUILDDIR --- test copying in CSV mode with various styles --- of embedded line ending characters create temp table copytest ( style text, test text, filler int); insert into co...
set system parameters 'create_table_reuseoid=no'; --+ holdcas on; --get oid with select sql create class t1(x char(1), y char(2)); create class t2(a char(1), b t1); insert into t2 values('x',(insert into t1 values('a','b'))); insert into t2 values('y',(insert into t1 values('c','d'))); insert into t2 values('z',(ins...
-- @testpoint: 验证是否支持匿名块自定义异常删除抛出 drop table if exists emp; create table emp (empno number(4) not null, ename varchar2(10), job varchar2(9), mgr number(4), hiredate date, sal number(7, 2), comm number(7, 2), deptno number(2)); insert into emp values ...
-- @testpoint:opengauss关键字nothing非保留),作为序列名 --关键字不带引号-成功 drop sequence if exists nothing; create sequence nothing start 100 cache 50; drop sequence nothing; --关键字带双引号-成功 drop sequence if exists "nothing"; create sequence "nothing" start 100 cache 50; drop sequence "nothing"; --关键字带单引号-合理报错 drop sequence if exists ...
-- @testpoint: 函数hll_hash_smallint(smallint),入参为非smallint类型时,合理报错 select hll_hash_smallint(-32769); select hll_hash_smallint(32768); select hll_hash_smallint('nihao');
-- MySQL dump 10.13 Distrib 5.6.13, for Win64 (x86_64) -- -- Host: localhost Database: tpzdb -- ------------------------------------------------------ -- Server version 5.6.13-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
-- object: ottoman.cumulative_sale_pk_seq | type: SEQUENCE -- -- DROP SEQUENCE ottoman.cumulative_sale_pk_seq; CREATE SEQUENCE ottoman.cumulative_sale_pk_seq INCREMENT BY 1 MINVALUE 0 MAXVALUE 2147483647 START WITH 1 CACHE 1 NO CYCLE OWNED BY NONE; -- object: ottoman.cumulative_sale | type: TABLE -- -- DROP TAB...
SELECT l.id_operacion_log, l.id_operacion, s.nombre, dbms_lob.substr(l.contexto, 4000) contexto, dbms_lob.substr(l.parametros, 4000) parametros, dbms_lob.substr(l.respuesta, 4000) respuesta, l.contexto, l.parametros, l.respuesta FROM t_operacion_logs l, t_operac...
<reponame>kudelabs/roc-demo2 CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" text, "created_at" datetime, "updated_at" datetime, "user_id" integer); CREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" text, "message_id" integer, "created_at" datetime, "update...
ALTER TABLE "public"."patient" ADD COLUMN "name" text NOT NULL;
<filename>scripts/url_table.sql<gh_stars>0 --create SCHEMA SHORT_URL_APP; /* drop sequence SHORT_URL_APP.Url_Seq RESTRICT; drop table SHORT_URL_APP.URL; drop table SEQUENCE_TABLE; Create table SHORT_URL_APP.URL ( ID INT NOT NULL , SHORT_URL ...
<filename>scripts/package.sql /* package.sql Contains all stored functions and procesdures used for project */ create or replace package refcursor_package as type ref_cursor is ref cursor; --function for showing employees function showEmployees return ref_cursor; --function for showing cust...
INSERT INTO tunings (tuning_name, guitar_type, string_notes) VALUES ('Drop C', '6-String', 'CGCFAD'); INSERT INTO tunings (tuning_name, guitar_type, string_notes) VALUES ('Drop G#', '7-String', 'G#D#G#C#F#A#D#'); INSERT INTO tunings (tuning_name, guitar_type, string_notes) VALUES ('Standard', '8-String', 'F...
<reponame>pietromosca1994/IBM_Data_Science_Professional_Certificate<filename>Databases and SQL for Data Science/Week2/Excercise3/Excercise3 Database1 Week2.sql<gh_stars>0 -- Query A1 -- ( Fail) select * from employees where salary > AVG(salary); -- Query A2 -- select EMP_ID, F_NAME, L_NAME, SALARY from employees wher...
-- La forma más rápida de calcular cuántas filas hay en una tabla es usar la COUNT() función. -- COUNT() es una función que toma el nombre de una columna como argumento y cuenta el número de valores no vacíos en esa columna SELECT COUNT(*) FROM table_name; -- Vamos a contar cuántas aplicaciones hay en la tabla. SEL...
/****** Object: StoredProcedure [AddB11_City_ReChild] ******/ IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[AddB11_City_ReChild]') AND type in (N'P', N'PC')) DROP PROCEDURE [AddB11_City_ReChild] GO CREATE PROCEDURE [AddB11_City_ReChild] @City_ID2 int, @City_Child_Name varchar(...
# after the import is successfully done, add constraints to the dl_deals_lender_programs table. spool constraints_lender_programs.log alter table dl_deals_lender_programs add constraint pk_lender_programs primary key (dealid) USING INDEX PCTFREE 10 INITRANS 10 MAXTRANS 255 COMPUTE STATISTICS NOLOGGING STORAGE(INITIA...
<filename>mmpdblib/schema.sql<gh_stars>10-100 -- mmpdb - matched molecular pair database generation and analysis -- -- Copyright (c) 2015-2017, <NAME> Ltd. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are -- met: -- -- ...
<gh_stars>100-1000 -- randexpr1.test -- -- db eval {SELECT case when not -t1.c in (coalesce((select d from t1 where t1.a not in (t1.c+f, -f,19) and t1.b in (select max(t1.d)+min(19)*min(t1.e) from t1 union select count(distinct d) from t1) and (t1.d) in (select -count(*) from t1 union select -count(*) from t1)),d* ...
-- date.test -- -- db eval {SELECT strftime('%s','2000-07-01 12:34:56')} SELECT strftime('%s','2000-07-01 12:34:56')
INSERT INTO `sample_with_string` (`id`, `varchar`, `text`) VALUES (1,'sample text','last order of columns and include apostrophe and ending parenthesis \') \') \') this pattern can be wrong'),(2,'sample text 2','test text 2');
-- $Id$ -- Description: Adding WF_ASSIGNMENT.ITERATION field alter table WF_ASSIGNMENT add ITERATION integer;
CREATE TABLE `test1` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `col1` int(11) DEFAULT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE ALGORITHM=UNDEFINED DEFINER=`testUser`@`localhost` SQL SECURITY DEFINER VIEW `my_view` AS select `test1`.`id` AS `id`,`test1`.`col1` AS `col1` from `test1`;...
-- Migrationscripts for ebean unittest -- drop dependencies -- not supported: alter table migtest_ckey_detail drop constraint if exists fk_migtest_ckey_detail_parent; -- not supported: alter table migtest_fk_cascade drop constraint if exists fk_migtest_fk_cascade_one_id; -- not supported: alter table migtest_fk_none dr...
-- -- PostgreSQL database dump -- -- Dumped from database version 12.3 -- Dumped by pg_dump version 12.3 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', fal...
<reponame>kodality/blaze<gh_stars>1-10 CREATE OR REPLACE FUNCTION core.set_user(in_user jsonb) RETURNS text AS $BODY$ declare l_str text; begin SELECT set_config('core.client_identifier', in_user::text, false) into l_str; return l_str; end; $BODY$ LANGUAGE plpgsql VOLATILE;
<filename>af/oometa/017-ooexpl_wc_input_counts.rollback.sql BEGIN; select _v.unregister_patch( '017-ooexpl_wc_input_counts'); DROP TABLE ooexpl_wc_input_counts; DROP INDEX "ooexpl_wc_input_counts_probe_cc_idx"; DROP INDEX "ooexpl_wc_input_counts_probe_asn_idx"; DROP INDEX "ooexpl_wc_input_counts_input_idx"; COMMIT;...
<gh_stars>10-100 ---------------------------- -- Copyright (C) 2021 CARTO ---------------------------- CREATE OR REPLACE FUNCTION `@@BQ_PREFIX@@carto.QUADINT_TOQUADKEY` (quadint INT64) RETURNS STRING DETERMINISTIC LANGUAGE js OPTIONS (library=["@@BQ_LIBRARY_BUCKET@@"]) AS """ if (quadint == null) { throw n...
<reponame>Zhaojia2019/cubrid-testcases --+ holdcas on; set system parameters 'dont_reuse_heap_file=yes'; create table t( col_smallint SMALLINT NOT NULL, col_integer INTEGER, col_bigint BIGINT, col_float FLOAT, col_double DOUBLE, col_monetary ...
<reponame>dkclee/l4j-be<gh_stars>0 \echo 'Delete and recreate l4j db?' \prompt 'Return for yes or control-C to cancel > ' foo DROP DATABASE l4j; CREATE DATABASE l4j; \connect l4j \i l4j-schema.sql \i l4j-seed.sql \echo 'Delete and recreate l4j_test db?' \prompt 'Return for yes or control-C to cancel > ' foo DROP DA...
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 09, 2015 at 02:00 PM -- 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 TABLE "users" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "username" TEXT, "password" TEXT, "realname" TEXT, "module" TEXT, "status" INTEGER NOT NULL DEFAULT 0 ); INSERT INTO users VALUES(1,"webmap","1b80cbbda92<PASSWORD>","Webmap User","webmap",1); CREATE TABLE "geostorage" ( "gid" ...
SELECT column_names FROM table_name1 WHERE column_name1 IN (value1, value2, …); SELECT column_names FROM table_name1 WHERE column_name1 IN (SELECT STATEMENT); SELECT column_names FROM table_name1 WHERE column_name1 BETWEEN value1 AND value2; SELECT MIN (column_names) FROM table_name1 WHERE condition; SELECT MAX (column...
<reponame>zunigjor/BI-DBS set echo off prompt #-----------------------# prompt #- Smazat vsechna data -# prompt #-----------------------# exec VYMAZ_DATA_VSECH_TABULEK; prompt #----------------------# prompt #- Vypnout cizi klice -# prompt #----------------------# exec VYPNI_CIZI_KLICE; prompt #---------------# pr...
-- phpMyAdmin SQL Dump -- version 4.9.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Sep 25, 2021 at 11:34 AM -- Server version: 5.7.35 -- PHP Version: 7.3.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
<reponame>christophanneser/Bao-for-Presto SELECT MIN(chn.name) AS uncredited_voiced_character, MIN(t.title) FROM char_name chn, cast_info ci, movie_companies mc, role_type rt, title t WHERE ci.note not like '%(voice)%' AND ci.note like '%(uncredited)%' AND t.production_year > 2010 AND t...
-- schema.sql drop database if exists Test; create database Test; use Test; grant select, insert, update, delete on Test.* to 'test'@'localhost' identified by 'test'; create table users ( `uid` int not null, `name` varchar(16) not null, `email` varchar(64), primary key (`uid`) ) engine=innodb defau...
-- phpMyAdmin SQL Dump -- version 4.6.6 -- https://www.phpmyadmin.net/ -- -- Host: mysql -- Generation Time: Feb 20, 2017 at 10:22 PM -- Server version: 5.7.17-11 -- PHP Version: 7.0.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `my_db` -- CREATE DATABASE IF NOT EXISTS `my_db` D...
<filename>database/migrations/2021-10-05 create initial tables.sql<gh_stars>1-10 create table if not exists users ( id serial primary key, email varchar(255) unique not null, password varchar (255) not null, created_at timestamp not null, last_login timestamp not null ); create table if not exists tasks ...
-- -- 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: -- CREATE EXTENSION IF NOT EXISTS plpgs...
DROP TABLE IF EXISTS `{prefix}players`; CREATE TABLE `{prefix}players` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `wins` int(11) NOT NULL DEFAULT '0', `losses` int(11) NOT NULL DEFAULT '0', `ties` int(11) NOT NULL DEFAULT '0', `points` int(11) NOT NULL DEFAULT '0', `created` datetime D...
-- fts3ao.test -- -- execsql { -- BEGIN; -- INSERT INTO t5 VALUES('Down came a jumbuck to drink at that billabong'); -- ALTER TABLE t5 RENAME TO t6; -- INSERT INTO t6 VALUES('Down came the troopers, one, two, three'); -- ROLLBACK; -- SELECT * FROM t5; -- } BEGIN; INSERT INTO t5 VALUES('Do...
SELECT MIN(mi.info) AS movie_budget, MIN(mi_idx.info) AS movie_votes, MIN(n.name) AS writer, MIN(t.title) AS complete_violent_movie FROM title AS t JOIN (movie_info AS mi JOIN info_type AS it1 ON it1.id = mi.info_type_id) ON t.id = mi.movie_id JOIN (movie_info_idx AS mi_idx JOIN info_type AS it2 ON...
<filename>test/sql/official-suite/e_resolve-1.sql<gh_stars>100-1000 -- original: e_resolve.test -- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test SELECT * FROM n1 ;SELECT * FROM n2 ;SELECT * FROM n3 ;SELECT * FROM n4 ;SELECT * FROM main.n1 ;SELECT * FROM temp.n1 ;SELECT * FROM at1.n1 ;SELECT * FROM at2.n1...
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/log/Release_2_0_logs/KRACOEUS-1347.sql<gh_stars>0 -- Create table create table EPS_PROP_COLUMNS_TO_ALTER ( COLUMN_NAME VARCHAR2(30) not null, COLUMN_LABEL VARCHAR2(30) not null, DATA_TYPE VARCHAR2(9) not null, DATA_LENG...
-- -- 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 ma...
/* Navicat MySQL Data Transfer Source Server : admin Source Server Type : MySQL Source Server Version : 80021 Source Host : localhost:3306 Source Schema : employee Target Server Type : MySQL Target Server Version : 80021 File Encoding : 65001 Date: 04/10/2020 19:31:5...
CREATE TABLE Address ( name VARCHAR(255) NOT NULL, street VARCHAR(255), city VARCHAR(255), zip INT, PRIMARY KEY (name) );
<reponame>MDP66/SampleFormGenerator<filename>SampleFormGenerator.Database/dbo/Tables/TblFormValues.sql<gh_stars>1-10 CREATE TABLE [dbo].[TblFormValues] ( [Id] INT IDENTITY (1, 1) NOT NULL, [Id_ParameterTypeId] INT NOT NULL, [Id_FormData] INT NOT NULL,...
<filename>docs/sql/user_sign_in.sql<gh_stars>1-10 CREATE TABLE `user_sign_in` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `user_id` bigint(20) unsigned NOT NULL COMMENT '用户id', `nickname` varchar(45) NOT NULL COMMENT '用户昵称', `last_sign_in_date` int(10) unsigned NOT NULL COMMENT '最近一次签到日期,格...
-- -- Contents of 0.13.4/01_0.13.4_spanish_english_changes_and_updates.sql -- -- Seccion Encuesta Inicial UPDATE `preferences_text` SET `id` = '1267', `languages_id` = '2', `title` = 'Indios americanos y nativos de Alaska', `description` = 'american_indian_or_alaska_native', `instructions` = '', `placeholder` = '', `de...
<reponame>erikweibust/nfjs-samples<gh_stars>10-100 insert into profiles (username, firstName, lastName) values ('habuma', 'Craig', 'Walls'); insert into profiles (username, firstName, lastName) values ('nate', 'Nate', 'Schutta'); insert into profiles (username, firstName, lastName) values ('ken', 'Ken', 'Kousen');
CREATE TABLE IF NOT EXISTS events_ep2k ( series_storage Int32, "type" Int32, entity_id Int32, processing_ts Float64, from_ts Float64, to_ts Float64, context String ) ENGINE = Log();
CREATE TABLE ${ohdsiSchema}.HERACLES_HEEL_results ( cohort_definition_id int, analysis_id INT, HERACLES_HEEL_warning VARCHAR(255) );
-- -- Modification table pj_opi -- ALTER TABLE pj_opi ADD COLUMN cod_ind_opi VARCHAR(20) NULL DEFAULT NULL COMMENT 'Code individu opi' AFTER cod_opi;
-- -- Database: `sakila` -- Data from https://dev.mysql.com/doc/index-other.html -- -- -------------------------------------------------------- -- -- Table structure for table `film` -- CREATE TABLE IF NOT EXISTS `film` ( `film_id` smallint(5) UNSIGNED NOT NULL, `title` varchar(255) NOT NULL, `description` tex...
-- @testpoint:创建函数给参数指定默认值,使用!=合理报错 drop FUNCTION if EXISTS w_testfun3; CREATE FUNCTION w_testfun3 (c_int int != 0) RETURNS int AS $$ BEGIN RETURN (c_int); END; $$ LANGUAGE plpgsql; /
\echo # Loading roles \set xnat_user `echo $XNAT_DATASOURCE_USERNAME` \set xnat_user_pw `echo $XNAT_DATASOURCE_PASSWORD` \set xnat_db `echo $POSTGRES_DB` drop role if exists :xnat_user; create role :"xnat_user" with login password :'<PASSWORD>'; -- add missing grants for database ALTER DATABASE :"xnat_user" OWNER TO...
select country="CZ", DB="$(DB)", substring(subscriber_server,3,6) as 'Store', convert(varchar(16), last_sync_date, 120) as 'Last replication', status as 'Status' from CZ_TPCentralStockDB.[dbo].[sysmergesubscriptions] with (nolock) order by subscriber_server asc
insert into customer_tbl values (100,'J','ATJ Enterprises','Allen','Jarrett','123 Main Street','Roseville','CA','95661','916-256-9874'), (110,'D','Freds Auto Parts','Fred','Smith','123 First Street','Roseville','CA','95678','916-541-4785'), (120,'G','Grand Auto','Steve','Krantz','412 Campbell Street','Sandusky','OH'...
<reponame>richobaltasar/IOTProject<filename>WebIOT/Database/dbo/Stored Procedures/ModuleData/SP_ModuleData_GetSearch.sql<gh_stars>0 -- exec SP_ModuleData_GetSearch @NamaModule='',@Status=0 CREATE PROCEDURE [dbo].[SP_ModuleData_GetSearch] @NamaModule nvarchar(max), @Status bigint AS select*from DataModule where Na...
-- showpriv.sql -- show roles and privileges for a user or role -- jkstill - 10/26/1999 - allow user to specify wildcards -- rather than forcing in the SQL -- don't skip a line when table_name wraps set recsep off set verify off set pause off echo off set trimspool on set line 90 col grantee ...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 25 Jan 2022 pada 01.33 -- Versi server: 10.4.17-MariaDB -- Versi PHP: 8.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...