sql
stringlengths
6
1.05M
<reponame>mwwhited/BinaryDataDecoders<filename>src/BinaryDataDecoders.SqlServer.Samples/Service Broker/local___Message_Request.sql<gh_stars>1-10 CREATE MESSAGE TYPE [local://Message/Request] AUTHORIZATION [dbo] VALIDATION = NONE;
<filename>dataTransformation/sql/prepare.sql<gh_stars>0 -- voorwaarden: -- Software geinstalleerd en adressen en straten ingelezen (zie readme.md) -- Add "source" and "target" column ALTER TABLE stratenpatroon1903 ADD COLUMN "source" int4; ALTER TABLE stratenpatroon1903 ADD COLUMN "target" int4; -- Run topology funct...
CREATE OR REPLACE PROCEDURE GET_ORG_CONTACT( AS_PROPOSAL_NUMBER IN OSP$BUDGET_PERIODS.PROPOSAL_NUMBER%TYPE, cur_generic IN OUT result_sets.cur_generic) is liCount number; begin SELECT COUNT(*) INTO liCount FROM OSP$PERSON P, OSP$UNIT U, OSP$EPS_PROP_UNITS PU WHERE PU.PROPOSAL_NU...
INSERT INTO notice (`id`,`creator`, `organization`, `publish_status`, `visibility`, `importance`, `public_type`, `version`, `title`, `content`, `content_type`, `create_time`, `start_time`, `end_time`, `ref`) VALUES (1, "root", 1, 4, 0, 1, 0, 1, "环境配置", "通知管理系统环境配置", 0, NO...
<gh_stars>0 /* Navicat Premium Data Transfer Source Server : 127.0.0.1 Source Server Type : MySQL Source Server Version : 50646 Source Host : 127.0.0.1:3306 Source Schema : ly-security Target Server Type : MySQL Target Server Version : 50646 File Encoding : 65001 Dat...
<gh_stars>1-10 # --- !Ups CREATE TABLE users ( id INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY, username VARCHAR(32) NOT NULL UNIQUE, email VARCHAR(48) NOT NULL UNIQUE, password CHAR(128) NOT NULL, salt CHAR(32) NOT NULL ) ENGINE = InnoDB DEFAULT CHARSET=utf8; INSERT INTO users (id, username, email,...
<filename>persistence/migrations/20191124215000-createProductSetTable.sql -- +migrate Up create table product_sets ( id serial primary key, uuid uuid not null unique, name text null, description text null, helmet_product_id int null references products(id), jacket_product_id int null references...
/* * Copyright 2020 Rackspace US, Inc. * * 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 agr...
<filename>agrirouter-middleware-application/src/main/resources/db/migration/V1.5__remove_status_and_add_messages_directly_to_endpoint.sql alter table endpoint drop foreign key if exists FKem31x69jtd2uwvrd9ityg7nd3; alter table endpoint drop column if exists status_id; drop table if exists error; drop table if ...
<filename>data/marabaixo.sql<gh_stars>0 create schema global; CREATE SEQUENCE global.arquivo_tipo_id_arquivo_tipo_seq_1; CREATE TABLE global.arquivo_tipo ( id_arquivo_tipo INTEGER NOT NULL DEFAULT nextval('global.arquivo_tipo_id_arquivo_tipo_seq_1'), mime_type VARCHAR(100) NOT NULL, ...
-- @testpoint: opengauss关键字Grouping(非保留),作为游标名,部分测试点合理报错 --前置条件 drop table if exists explain_test cascade; create table explain_test(cid int,fid int); --关键字不带引号-成功 start transaction; cursor Grouping for select * from explain_test order by 1; close Grouping; end; --关键字带双引号-成功 start transaction; cursor "Grouping" for ...
<filename>engine.sql -- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 14, 2017 at 06:37 PM -- Server version: 5.7.14 -- PHP Version: 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
SELECT * FROM (SELECT p.PartId, P.Description, SUM(pn.Quantity) AS Required, SUM(p.StockQty) AS [In Stock], SUM(op.Quantity) AS [Ordered] FROM Parts p JOIN OrderParts op ON op.PartId = p.PartId JOIN Orders o ON o.OrderId = op.OrderId JOIN Jobs j ON j.JobId = o.JobId JOIN PartsNeeded pn ON pn.PartId = ...
#1 Create a file named where_exercises.sql. Make sure to use the employees database. USE employees; SHOW tables; #2 Find all current or previous employees with first names 'Irena', 'Vidya', or 'Maya' using IN. Enter a comment with the number of records returned. SELECT * FROM employees WHERE first_name IN ('Irena', ...
<reponame>intirix/openmm-server<gh_stars>0 SELECT * FROM OPENMM_SHOWS ORDER BY NAME
/* Navicat Premium Data Transfer Source Server : 127.0.0.1 Source Server Type : MySQL Source Server Version : 80018 Source Host : localhost:3306 Source Schema : laboratory Target Server Type : MySQL Target Server Version : 80018 File Encoding : 65001 Date: 12/03/2021...
<filename>31.crawl/sql.sql 分类表 create table category(id int primary,name varchar(128),url varchar(256)); 文章表 create table article(name varchar(128),url varchar(128),cid int)
<gh_stars>1-10 CREATE TABLE IF NOT EXISTS pika ( id_migration SERIAL PRIMARY KEY, migration varchar(500) DEFAULT NULL, up boolean DEFAULT NULL, down boolean DEFAULT NULL, execute_up timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, execute_down timestamp DEFAULT NULL, statements text )
<gh_stars>1-10 create database TripService; use TripService; create table Cities ( Id int not null auto_increment unique primary key, Name nvarchar (20) not null , CountryCode nvarchar (2) not null ); create table Hotels ( Id int not null auto_increment unique primary key, Name nvarchar(30) not null, CityId int not n...
CREATE PROCEDURE [dbo].[uspApprenticeshipOccupationUpdate] @occupationId INT, @description nvarchar(200), @closedDate datetime AS BEGIN SET NOCOUNT ON BEGIN TRY UPDATE [dbo].[ApprenticeshipOccupation] SET [FullName] = @description, [ClosedDate] = @closedDate WHERE [ApprenticeshipOccupationId] = @occupat...
<reponame>MIT-LCP/aline-mimic-iii -- Extract durations of anaesthetic medication, defined as: -- Fentanyl: 30118, 30149 (Conc), 30150 (Base), 30308 (Drip), 221744, 225972 (Push), 225942 (Conc) -- Propofol: 30131, 227210 (Intub), 222168 -- Midazolam: 30124, 221668 -- Dilaudid: 30163, 221833 DROP MATERIALIZED VIEW IF EX...
<reponame>wikimedia/mediawiki-extensions-PageTriage -- Convert unique index to primary key -- See T243073 ALTER TABLE /*_*/pagetriage_page_tags DROP INDEX /*i*/ptrpt_page_tag_id, ADD PRIMARY KEY (ptrpt_page_id,ptrpt_tag_id);
<filename>db/deploy/003.sql -- Deploy pgdd-ui:003 to pg BEGIN; DROP FUNCTION dd_ui.get_schemas(); CREATE FUNCTION dd_ui.get_schemas() RETURNS TABLE(s_name name, description text, table_count bigint, view_count bigint, function_count bigint, size_pretty text, size_plus_indexes text, size_bytes FLOAT, data_source...
CREATE KEYSPACE spark_db WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; USE spark_db; CREATE TABLE users(Login_id text PRIMARY KEY, user_name text, last_login timestamp); INSERT INTO users (Login_id, user_name, last_login) VALUES( '100001', 'Prashant', '2019-02-05 10:05:00'); INSERT INTO user...
-- ================================ -- Drop User-defined Table Type -- ================================ USE <database_name,sysname,AdventureWorks> GO -- Drop the table type - this will fail if it is being used DROP TYPE <schema_name,sysname,dbo>.<type_name,sysname,TVP> GO
<filename>sql/getcommandid.sql<gh_stars>0 SELECT getCommandId($1)
<gh_stars>10-100 create table book ( identifier varchar not null primary key, title varchar not null, isbn varchar unique, year numeric, publisher varchar, number_of_pages numeric, url varchar ); select audit.audit_table('book'); create trigger delpub before delete on book for each row exe...
ALTER TABLE PROTOCOL_ACTION_TYPE ADD (FINAL_ACTION_FOR_BATCH_CORRESP CHAR(1)); UPDATE PROTOCOL_ACTION_TYPE SET FINAL_ACTION_FOR_BATCH_CORRESP = 'N'; UPDATE PROTOCOL_ACTION_TYPE SET FINAL_ACTION_FOR_BATCH_CORRESP = 'Y' WHERE PROTOCOL_ACTION_TYPE_CODE = '300' OR PROTOCOL_ACTION_TYPE_CODE = '302'; ALTER TABLE PROTOCOL...
<filename>sql/na_players.sql<gh_stars>0 /* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50524 Source Host : localhost:3306 Source Database : na_tigergame Target Server Type : MYSQL Target Server Version : 50524 File Encoding : 65001 Date: 2017-09-23...
/* SQLyog Ultimate v8.55 MySQL - 5.5.36 : Database - ahana ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@...
<gh_stars>0 DROP TABLE IF EXISTS `dbsession`; CREATE TABLE `dbsession` ( `id` varchar(128) NOT NULL, `expire` int NULL, `data` mediumblob, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=`utf8mb4` COLLATE=`utf8mb4_unicode_ci`;
<reponame>deoxxa/don create table users ( id text not null primary key, created_at datetime not null, username text not null unique, email text not null unique, hash text not null, display_name text, avatar text, summary text ); create table people ( id text not null primary key, host text not null...
-- @testpoint:opengauss关键字Handler(非保留),作为模式名 --关键字不带引号-成功 drop schema if exists Handler; create schema Handler; drop schema Handler; --关键字带双引号-成功 drop schema if exists "Handler"; create schema "Handler"; drop schema "Handler"; --关键字带单引号-合理报错 drop schema if exists 'Handler'; create schema 'Handler'; --关键字带反引号-合理报错...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 26, 2020 at 06:46 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
DROP TABLE IF EXISTS "tags";
<filename>guest.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: 2017-01-23 08:20:06 -- 服务器版本: 5.7.15-log -- PHP Version: 5.6.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
/* Table with raw data */ CREATE TABLE [dbo].[Row]( [RowID] [bigint] NOT NULL, [HeaderID] [bigint] NULL, [HeaderCode] [char](3) NULL, [RowCode] [char](3) NOT NULL, [TranSeq] [char](8) NULL, [RecordSeq] [char](8) NULL, [TranDate] [char](8) NULL, [TranTime] [char](6) NULL, [SocietyCode] [char](3) NULL, [Soci...
ALTER TABLE nets_emp_info CHANGE CARD_NO CARD_NO VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
<filename>fm_blogging.sql -- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 25, 2020 at 06:06 AM -- Server version: 10.1.28-MariaDB -- PHP Version: 7.1.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+...
<reponame>schosev/burger<filename>db/seeds.sql INSERT INTO burgers (burger_name, devoured) VALUES("Double Cheese Burger", FALSE), ("Bacon Burger", FALSE), ("Veggie Burger", FALSE);
DROP TABLE "public"."total_ratings_stats";
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Feb 19, 2019 at 11:07 PM -- Server version: 5.7.24 -- PHP Version: 7.2.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
SELECT answer_id FROM ' . $this->table_sortables_answers; SELECT * FROM ' . $old_table; SELECT * FROM ' . $this->table_sortables_questions;
<reponame>getwasim/egov-smartcity-suites-test<filename>egov/egov-ptis/src/main/resources/db/migration/main/V20170113150415__ptis_floormasters_alter_table.sql --------------- Property Usage Master ---------------- ALTER TABLE egpt_property_usage_master ADD column VERSION numeric DEFAULT 0; ALTER TABLE egpt_property_usa...
CREATE TABLE protected_characteristics ( pcq_id integer PRIMARY KEY, case_id TEXT, party_id TEXT, channel SMALLINT NOT NULL, completed_date TIMESTAMP NOT NULL, service_id integer NOT NULL, actor SMALLINT NOT NULL, version_number SMALLINT NOT NULL, dob_provided SMALLINT, dob DATE, language_main SMALLINT, la...
DECLARE @OUTPUT DECIMAL(18,4)= (SELECT CAST(MAX(LAT_N)AS DECIMAL(18,4)) FROM STATION WHERE LAT_N<137.2345) SELECT @OUTPUT
CREATE TABLE IF NOT EXISTS `category` ( id int(10) unsigned NOT NULL AUTO_INCREMENT, name varchar(255) COLLATE utf8_unicode_ci NOT NULL, slug varchar(255) NOT NULL, created_at timestamp NULL DEFAULT NULL , updated_at timestamp NULL DEFAULT NULL , PRIMARY KEY (id), UNIQUE (slug) ) ENGINE=Inn...
PRAGMA foreign_keys = ON; PRAGMA journal_mode = MEMORY; PRAGMA synchronous = OFF; DROP TABLE IF EXISTS `nglayouts_block_collection`; DROP TABLE IF EXISTS `nglayouts_collection_slot`; DROP TABLE IF EXISTS `nglayouts_collection_item`; DROP TABLE IF EXISTS `nglayouts_collection_query_translation`; DROP TABLE IF EXISTS `n...
CREATE TABLE "public"."referral" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "invitee" varchar NOT NULL, "referrer" varchar NOT NULL, "status" integer NOT NULL, "expires_on" varchar NOT NULL, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), PRIMARY KEY ("id"), UNIQUE ...
<gh_stars>10-100 select concat(cast(fr.day as varchar), '/', cast(fr.month as varchar), '/', cast(fr.year as varchar)) as flight_date, fr.plane_tail_number, fr.arrival_time as flight1_arrival_time, fr2.departure_time as flight2_departure_time, fr.origin_city_name, fr.dest_city_name as stop_city_name, fr2.dest_city_...
ALTER TABLE allele ADD COLUMN frequency JSONB; COMMENT ON COLUMN allele.frequency IS 'JSON map of frequencies for this allele with keys being biogeographical groups'; ALTER TABLE gene_result ADD COLUMN frequency JSONB; COMMENT ON COLUMN gene_result.frequency IS 'JSON map of frequencies for this gene result with keys b...
<reponame>mrudulpolus/kc update KRNS_PARM_T set TXT = '6' where NMSPC_CD = 'KC-AWARD' AND PARM_DTL_TYP_CD = 'D' AND PARM_NM = 'scope.sync.REPORTS_TAB.AwardReportTerm.reportClassCode'; commit;
<gh_stars>0 use burger_db; insert into burgers (burger_name, devoured) values ("Cheeseburger", true); insert into burgers (burger_name, devoured) values ("Bacon Cheeseburger", true); insert into burgers (burger_name, devoured) values ("Big Mac", false);
<reponame>kirilyunakov/SqlQueriesBase<filename>Codebase/Mkt_definitionCH.sql case [Camp parameter] when "facebook" then "Display" when "fb_test" then "Display" when "fbapp" then "Display" when "gdn_e" then "Display" when "gdn_p" then "Display" when "gdn_s" then "Display" when "brand_fb" then "Display" when "facebook...
<reponame>MUHammadUmerHayat/All-Oracle-SQL-PLSQL-QUERIES alter session set plsql_ccflags='string_op_debug:false'; create or replace package body &tq84_prefix.string_op as -- vi: ft=sql -- -- function strtok (str in varchar2, delimiter in varchar2) -- { return &tq84_prefix.varchar2_t is tokens &t...
ALTER TABLE users ADD COLUMN email_verified TIMESTAMP;
<reponame>thedruz/owncloud -- MySQL dump 10.13 Distrib 5.5.42, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: oc_testing -- ------------------------------------------------------ -- Server version 5.5.42-1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_...
-- no need to unload extensions
USE `resource_profile`; CREATE TABLE `profile_black_list` ( `id` INT PRIMARY KEY NOT NULL AUTO_INCREMENT, `profileTitle` VARCHAR(100) NOT NULL, `userId` VARCHAR(20) NOT NULL, `profileID` INT(11) ); CREATE UNIQUE INDEX profile_black_list_id_uindex ON resource_profile.profile_black_list (id);
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1 -- Время создания: Сен 29 2016 г., 13:57 -- Версия сервера: 5.6.21 -- Версия PHP: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE...
DROP TABLE IF EXISTS attes_example_authors; -- -- The table 'attes_example_authors' records information about authors. -- -- i_id : The author's ID, serves as a primary key. -- s_lastname : The author's lastname. -- s_firstname : The author's firstname. -- s_nationality: The author's nationa...
set timezone '+00:00'; drop table if exists t; create table t(i int auto_increment,j datetime with time zone ,k varchar(20)) partition by range(time_format(j,'%h:%i:%s %p')) ( partition p0 values less than ('12:00:00'), partition p1 values less than maxvalue ); insert into t(j)values(datetimeltz'2014-12-31 23:00:00 +8...
<gh_stars>1-10 -- [er]using incr function with float data type parameter for testing ,then report error ' Semantic: 'incr ' operator is not defined on type float.' create class zoo ( a float); insert into zoo values(1.5); select incr(a) from zoo; select * from zoo; drop zoo;
<filename>migrations/000138_drop_old_symbol_history.down.sql -- Copyright 2021 The Go Authors. All rights reserved. -- Use of this source code is governed by a BSD-style -- license that can be found in the LICENSE file. BEGIN; CREATE TABLE old_symbol_history ( id bigint NOT NULL, created_at timestamp with tim...
CREATE TABLE IF NOT EXISTS `amigo_user` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `email` varchar(150) NOT NULL DEFAULT '', `password` varchar(255) DEFAULT NULL, `admin` tinyint(1) NOT NULL DEFAULT '0', `balance` decimal(10,2) DEFAULT '0.00', `created_at` int(11) unsigned NOT NULL, `active` tinyint...
set pages 9999; break on snapdate skip 2 column snapdate format a16 column filename format a40 select to_char(snap_time,'yyyy-mm-dd HH24'), old.filename, new.wait_count-old.wait_count waits from perfstat.stats$filestatxs old, perfstat.stats$filestatxs new, perfstat.stats$snapshot sn where new...
<reponame>RajeshMaster/House /* Navicat MySQL Data Transfer Source Server : laravel Source Server Version : 50625 Source Host : localhost:3306 Source Database : asset_db Target Server Type : MYSQL Target Server Version : 50625 File Encoding : 65001 Date: 2020-10-05 12:00:21 */ SET...
create database dart_mysql; create table dart_mysql.aluno ( id int not null primary key auto_increment, nome varchar(200) ); create table dart_mysql.conta_corrente ( id int not null primary key auto_increment, saldo decimal (10,2) ); create table dart_mysql.tira_dinheiro ( id int not null primary key auto_...
\echo # Creating user type to be used for the frontend exposure select settings.set('auth.api-schema', current_schema); create type "user" as ( id bigint, email varchar(256), "role" varchar(64) );
ALTER TABLE ring_user_domain ADD COLUMN verified tinyint(1) NOT NULL DEFAULT 0; ALTER TABLE ring_user_domain ADD COLUMN ts_added timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP; INSERT INTO sys_version SET id=15;
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 02, 2017 at 03:25 -- Server version: 10.1.19-MariaDB -- PHP Version: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+07:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE...
<reponame>bradybyrd/hr_demo HOST mkdir "C:\automation\hr\Spool" SPOOL C:\automation\hr\Spool\2017-08-23-060058_Output_Spool.log APPEND SET SERVEROUTPUT ON SET DEFINE OFF SET BLOCKTERMINATOR OFF SET SQLBLANKLINES ON -- Step 1: Creating columns EXECUTE DBMS_OUTPUT.PUT_LINE('Step 1: Creating columns'); ALTER TABLE "CO...
<reponame>workshopI1/recy-api -- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : jeu. 19 nov. 2020 à 16:10 -- Version du serveur : 10.4.10-MariaDB -- Version de PHP : 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; ...
DELETE FROM session; INSERT INTO session(id, cookie, info, expires, created_by, created_at) VALUES (1, 'uuid_1', 'info', (NOW() + INTERVAL 1 HOUR) , 'none', NOW()); INSERT INTO session(id, cookie, info, expires, created_by, created_at) VALUES (2, 'uuid_2', 'info', (NOW() - INTERVAL 1 SECOND) , 'none', NOW());
REVOKE SELECT ON bloomreadertest.UnionUsers FROM readbloomtester; DROP VIEW bloomreadertest.UnionUsers ; CREATE VIEW bloomreadertest.UnionUsers AS SELECT * FROM bloomreadertest.UsersLastThreeMonthsFromLaunch UNION ALL SELECT * FROM bloomreadertest.UsersLastSixMonthsFromLaunch UNION ALL SELECT * FROM bloomrea...
create database Empresa use Empresa create table Fornecedores( codFor int identity, primary key (codFor), empresa varchar(40), contato varchar(30), cargo varchar(30), endereco varchar(60), cidade varchar(15), cep varchar(10), pais varchar(15) ) create table Categorias( codCategoria int identity, primary ...
<filename>db/long_task/triggers/task/task_changed_notify_tr.sql DROP TRIGGER IF EXISTS task_changed_notify_tr ON long_task.task; CREATE TRIGGER task_changed_notify_tr AFTER INSERT OR DELETE OR UPDATE OF state_id, next_start, shed_period_id, shed_period_count, shed_clone, group_id ON long_task.task FOR EACH ROW EXECUT...
-- APPEND A SQL TERMINATOR TO EACH DDL STATEMENT {call DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM, 'SQLTERMINATOR', TRUE)}; -- SUPRESS ALL NON-REFERENTIAL TABLE CONSTRAINTS {call DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM, 'CONSTRAINTS', FALSE)}; -- SUPRESS ALL REFERENTIAL ...
<filename>db/install.sql<gh_stars>10-100 CREATE USER marcus WITH PASSWORD '<PASSWORD>'; CREATE DATABASE metasql OWNER marcus;
-- file:timestamp.sql ln:161 expect:true SELECT '' AS "63", d1 FROM TIMESTAMP_TBL WHERE d1 != timestamp without time zone '1997-01-02'
<gh_stars>10-100 -- file:with.sql ln:535 expect:true WITH RECURSIVE foo(i) AS (SELECT i::numeric(3,0) FROM (VALUES(1),(2)) t(i) UNION ALL SELECT (i+1)::numeric(10,0) FROM foo WHERE i < 10) SELECT * FROM foo
<filename>RPG/Shops/fullshopitem.sql CREATE VIEW fullshopitem AS SELECT shopitem.itemid, shopitem.quantity, shopitem.discount, item.name, item.type, item.target, item.levelrequirement, item.armor, item.damage, item.countable FROM shopitem INNER JOIN item ON item.id=shopitem.itemid
<gh_stars>0 col USERHOST format a17 col os_username format a20 col USERNAME format a17 set linesize 120 set pagesize 120 select os_username, username, userhost, to_char(timestamp,'mm/dd/yyyy hh24:mi:ss') timestamp, returncode from dba_audit_session where action_name = 'LOGON' and returncode > 0 and timestamp > (sysdat...
<reponame>xSpeed1337/Datenbanken_Umfragen_Webseite -- Tabellen erzeugen -- @author <NAME> DROP SCHEMA IF EXISTS Survey_Site_Database; CREATE SCHEMA IF NOT EXISTS Survey_Site_Database DEFAULT CHARACTER SET utf8; USE Survey_Site_Database; -- Umfrager-Tabelle -- @author <NAME> DROP TABLE IF EXISTS surveyor; CREATE TABL...
-- migrate:up CREATE TABLE IF NOT EXISTS roles ( code UUID PRIMARY KEY DEFAULT uuid_generate_v4(), name VARCHAR(20) NOT NULL, description VARCHAR(255) ); -- migrate:down DROP TABLE IF EXISTS roles;
SET IDENTITY_INSERT cedna.app.Operacion ON; INSERT INTO cedna.app.Operacion (Id, nombre, titulo, icono, grupoId, orden, url) VALUES(46, 'abm acciones', 'ABM de Acciones', '', NULL, 1, 'abm/accion'); INSERT INTO cedna.app.Operacion (Id, nombre, titulo, icono, grupoId, orden, url) VALUES(47, 'abm acciones - alta', 'Alt...
BEGIN TRANSACTION; CREATE TABLE "Account" ( sf_id VARCHAR(255) NOT NULL, "Name" VARCHAR(255), "RecordTypeId" VARCHAR(255), "BillingStreet" VARCHAR(255), "BillingCity" VARCHAR(255), "BillingState" VARCHAR(255), "BillingCountry" VARCHAR(255), "BillingPostalCode" VARCHAR(255), "npe01__SYSTEMIsIndividual__...
--check cardinality value in show index statement, 15 columns drop table if exists foo; create table foo (a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int, a10 int, a11 int, a12 int, a13 int, a14 int, a15 int); create index idx1 on foo (a1, a2, a3, a4, a5, a6, a7, ...
/* Replace with your SQL commands */ ALTER TABLE users MODIFY balance varchar(1000)
<reponame>fpacheco/express-pp<gh_stars>0 -- Como usuario postgres -- Creo base de datos DROP DATABASE IF EXISTS bdh_py; CREATE DATABASE bdh_py WITH ENCODING='UTF8' OWNER=utest CONNECTION LIMIT=-1; \c bdh_py BEGIN; -- Esquema de la aplicacion CREATE SCHEMA test AUTHORIZATION utest; -- Cambio busquedas de DB ALTER DATA...
--Include all keys and fact attributes from f_interactions_call and excludes deleted records --Include most commonly used dimensional attributes with high cardinality (territory_type, therapeutic_class, therapeutic_sub_class) --Creating fact table that includes commonly used dimensional attributes -- REM Add compr...
<filename>db schema/schema-turbo-db.sql -- MySQL Script generated by MySQL Workbench -- 01/21/16 21:42:43 -- 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_...
<reponame>Andrsrz/sql-zoo --Change the query shown so that it displays Nobel prizes for 1950. SELECT yr, subject, winner FROM nobel WHERE yr = 1950; --Show who won the 1962 prize for Literature. SELECT winner FROM nobel WHERE yr = 1962 AND subject = 'Literature'; --Show the year and subject that won 'Albert Einstein'...
select name, immediate_gets, immediate_misses, gets, misses, sleeps, waiters_woken from v$latch where waiters_woken > 0;
<reponame>EL-BID/nexso<gh_stars>1-10 CREATE TABLE [dbo].[dnn_TabModules] ( [TabModuleID] INT IDENTITY (1, 1) NOT NULL, [TabID] INT NOT NULL, [ModuleID] INT NOT NULL, [PaneName] NVARCHAR (50) NOT NULL, [ModuleO...
<reponame>stoyanovmiroslav/CSharp-DB-Fundamentals-SoftUni CREATE FUNCTION udf_GetAvailableRoom(@HotelId INT, @Date DATETIME2, @People INT) RETURNS VARCHAR(MAX) AS BEGIN DECLARE @BookedRooms TABLE(Id INT) INSERT INTO @BookedRooms SELECT DISTINCT R.Id ...
<gh_stars>1-10 /****** Object: User Defined Function dbo.RaceType Script Date: 5/1/2004 6:12:43 PM ******/ CREATE FUNCTION dbo.RaceType ( @kdID int ) RETURNS int BEGIN RETURN(SELECT RaceType FROM Kingdoms WHERE kdID = @kdID) END
# 查出1992年4月份到1993年6月份的车型有哪些 select * from 20200604_tb_car where ORDER_TIME between '19920401' and '19930630'; # 超过了27年的订单有哪些 select (year(now()) - year(ORDER_TIME)) from `20200604_tb_car`; select * from `20200604_tb_car` where (year(now()) - year(ORDER_TIME)) >= 27; # 超过了9855天的订单有哪些 select to_days(now()) - to_days(OR...
<reponame>Dagon0577/sql-coverage-test-suite #!default_db:schema1 #LOCK use schema1; drop table if EXISTS sharding_4_t1; CREATE TABLE sharding_4_t1 ( id CHAR(1) CHARACTER SET latin1, c2 CHAR(1) CHARACTER SET ascii); lock tables sharding_4_t1 read; unlock tables; drop table if EXISTS sharding_4_t1; #reserved words creat...
DROP INDEX IF EXISTS sent_sim_sent1 ; DROP TABLE sent_sim ;