sql
stringlengths
6
1.05M
/* Navicat MySQL Data Transfer Source Server : local Source Server Version : 50505 Source Host : localhost:3306 Source Database : bdplanificamype Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2018-02-12 01:20:40 */ SET FOREIGN_KEY_CHECKS=0; ...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 31 Jan 2022 pada 04.31 -- Versi server: 10.4.16-MariaDB -- Versi PHP: 7.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
CREATE TABLE Companies ( CompanyId int NOT NULL IDENTITY(1, 1) PRIMARY KEY, CompanyName varchar(255) NOT NULL ) CREATE TABLE Cars ( CarId int NOT NULL IDENTITY(1, 1) PRIMARY KEY, CarName varchar(255) NOT NULL, CompanyId int FOREIGN KEY REFERENCES Companies(CompanyId) ON DELETE CASCADE )
CREATE TABLE [dbo].[UserDownloads] ( [Id] INT NOT NULL, [UserId] NVARCHAR (128) NOT NULL, [DocumentId] NVARCHAR (128) NOT NULL, [DateDownload] DATETIME NOT NULL, [FileFormat] NVARCHAR (5) NULL, CONSTRAINT [PK_dbo.UserDownloads] PRIMARY KEY CLUSTERED ([Id] ...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 29, 2020 at 03:53 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
-- randexpr1.test -- -- db eval {SELECT t1.c+case when t1.a in (select max(coalesce((select coalesce((select coalesce((select max(19+case t1.f when a then e else t1.d end) from t1 where t1.d> -c),b) from t1 where (t1.c=e) and t1.f=17), -a) from t1 where (e not between e and 11)),t1.f)) & cast(avg(t1.a) AS integer)*max...
CREATE TABLE mto_service_items ( id uuid PRIMARY KEY NOT NULL, move_task_order_id uuid REFERENCES move_task_orders, mto_shipment_id uuid REFERENCES mto_shipments, re_service_id uuid REFERENCES re_services, meta_id uuid NOT NULL, meta_type text NOT NULL, created_at timestamp WITH TIME ZONE NOT NULL, updated_at t...
SELECT DISTINCT(CITY) FROM STATION WHERE REGEXP_LIKE(CITY, '^[^AEIOU].*[^AEIOU]$', 'i');
delete from AD_TreeNodeMM where AD_Tree_ID=1000039; delete from AD_Tree where AD_Tree_ID=1000039;
INSERT INTO organization_memberships(user_id, organization_id, member_role) SELECT owner_id as user_id, id as organization_id, 1 FROM organizations; ALTER TABLE organizations DROP COLUMN owner_id;
INSERT INTO pet (ID, NAME, AGE, SPECIES) VALUES (PET_SEQUENCE.nextval, 'Totor', 6, 'hedgehog');
<gh_stars>1-10 CREATE TABLE IF NOT EXISTS FORMS( id SERIAL PRIMARY KEY, type varchar, status varchar, data varchar );
INSERT INTO `t_xt_gnjs` VALUES ('1', '超级管理员', '', null, '1', '', '1', 'superadmin', null, null, 'N'); INSERT INTO `t_xt_gnjs` VALUES ('2', '普通员工', '', null, '1', '', '1', 'employee', null, null, 'N');
<reponame>trydofor/go-db-ack<filename>demo/sql/tree/test.sql -- ENV "带空格的 时间" '2018-00-00 00:00:00' -- ENV DATE_FROM '2018-11-23 12:34:56' -- ENV ``SELECT YEAR(NOW())`` '2018-00-01 00:00:00' -- STR USER built_env_user # 直接定义 -- STR HOST built_env_host # 直接定义 -- STR DATE built_env_date # 直接定义 -- STR '2018-00-01 00:00:...
-- name: create-table-repos CREATE TABLE IF NOT EXISTS repos ( repo_id SERIAL PRIMARY KEY ,repo_user_id INTEGER ,repo_owner VARCHAR(250) ,repo_name VARCHAR(250) ,repo_full_name VARCHAR(250) ,repo_avatar VARCHAR(500) ,repo_link VARCHAR(1000) ,repo_clone VAR...
CREATE VIEW view17 AS SELECT 1 AS c1 FROM table63 UNION SELECT 1 AS c1 FROM table320 UNION SELECT 1 AS c1 FROM table467 UNION SELECT 1 AS c1 FROM view48 UNION SELECT 1 AS c1 FROM view60 UNION SELECT 1 AS c1 FROM view33; GO
CREATE TABLE test1 (a int, b text); INSERT INTO test1 VALUES (1, 'one'); CREATE INDEX test1_a_idx ON test1 USING brin (a); SELECT brin_page_type(get_raw_page('test1_a_idx', 0)); SELECT brin_page_type(get_raw_page('test1_a_idx', 1)); SELECT brin_page_type(get_raw_page('test1_a_idx', 2)); SELECT * FROM brin_metapage_in...
create table face_info ( id serial primary key, position_x float8, position_y float8, position_z float8, generic_id int, generic_name varchar(255), generic_score float8, specific_id int, specific_name varchar(255), specific_score float8, width int, height int, age int, gender varchar(255), bgr bytea, ro...
<filename>docker/mariadb/schema.sql CREATE DATABASE IF NOT EXISTS lab2_php; CREATE TABLE IF NOT EXISTS `lab2_php`.`urls` ( `id` INT UNSIGNED AUTO_INCREMENT, `url` VARCHAR(255) DEFAULT '' NOT NULL, `clicks` INT UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY(`id`) ) ENGINE=INNODB;
CREATE PROCEDURE dbo.usp_GetRecentAssessments ( @TeacherId INT ) AS BEGIN SELECT TOP 10 sa.Id , ISNULL(sa.UpdatedOn, sa.CreatedOn) Updated , tcs.StudentName , at.AssessmentName AS Assessment FROM dbo.StudentAssessment sa JOIN dbo.TeacherClassStudent tcs on sa.StudentId = tcs.Id JOIN dbo.TeacherClas...
use pettea; /* mysql --host=mysql-vt2016.csc.kth.se */ /* TODO: Add every game played to a table ALT get eBot working on server */ CREATE TABLE users( uid VARCHAR(64) NOT NULL, userName VARCHAR(64), mmr int, cs int, cs1v1 int, dota int, dota1v1 int, trivia int, gamesPlayed int, PRIMARY KEY (uid) ); /...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Tempo de geração: 10-Jul-2021 às 20:53 -- Versão do servidor: 5.7.31 -- versão do PHP: 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
INSERT INTO patient_Treatment VALUES(1,100,'12-may-2017'); INSERT INTO patient_Treatment VALUES(2,101,'22-jun-2017'); INSERT INTO patient_Treatment VALUES(3,102,'30-may-2017'); INSERT INTO patient_Treatment VALUES(10,100,'03-may-2017'); INSERT INTO patient_Treatment VALUES(3,101,'30-may-2017'); INSERT INTO patient_Trea...
<reponame>cwmaguire/budget drop table if exists category_budget cascade; drop table if exists budget_period cascade; drop table if exists category_rule cascade; drop table if exists transaction_category cascade; drop table if exists category cascade; drop table if exists transaction_child_member cascade; drop table if ...
SELECT COUNT(*) FROM site as s, so_user as u1, question as q1, answer as a1, tag as t1, tag_question as tq1, badge as b, account as acc WHERE s.site_id = q1.site_id AND s.site_id = u1.site_id AND s.site_id = a1.site_id AND s.site_id = t1.site_id AND s.site_id = tq1.site_id AND s.site_id = b.site_id AND q1.id = tq1.ques...
/* Navicat Premium Data Transfer Source Server : mysql local Source Server Type : MySQL Source Server Version : 50621 Source Host : localhost:3306 Source Schema : mdn120202021 Target Server Type : MySQL Target Server Version : 50621 File Encoding : 65001 Date: 17/04/...
create table SB_NEWS_NewsEntry ( uuid_ VARCHAR(75) null, newsId LONG not null primary key, groupId LONG, companyId LONG, userId LONG, userName VARCHAR(75) null, createDate DATE null, modifiedDate DATE null, title VARCHAR(75) null, description VARCHAR(75) null );
<reponame>joshtantan/bootcampx<filename>migrations/students_cohorts.sql CREATE TABLE cohorts ( id SERIAL PRIMARY KEY NOT NULL, name VARCHAR(255) NOT NULL, start_date DATE, end_date DATE ); CREATE TABLE students ( id SERIAL PRIMARY KEY NOT NULL, name VARCHAR(255) NOT NULL, email VARCHAR(255), phone VARC...
<reponame>eytienne/esiee-RaPizz DROP SCHEMA public CASCADE; CREATE SCHEMA public;
CREATE TABLE [store].[Product] ( [ProductId] BIGINT IDENTITY (1, 1) NOT NULL, [Name] NVARCHAR (255) NOT NULL, [Description] NVARCHAR (MAX) NULL, [IsActive] BIT DEFAULT ((1)) NULL, [Price] MONEY CONSTRAINT [DF_Product_Price] DEFAULT ((20.00)) NULL, C...
<filename>function/ti/getradiocarbonmethodstable.sql CREATE OR REPLACE FUNCTION ti.getradiocarbonmethodstable() RETURNS TABLE(radiocarbonmethodid integer, radiocarbonmethod character varying) LANGUAGE sql AS $function$ SELECT radiocarbonmethodid, radiocarbonmethod FROM ndb.radiocarbonmethods; $function$
\copy "aisles" from '/home/fotis/dev_projects/model-based-aqp/input/instacart_2017_05_01/aisles.csv' DELIMITER ',' CSV HEADER; \copy "departments" from '/home/fotis/dev_projects/model-based-aqp/input/instacart_2017_05_01/departments.csv' DELIMITER ',' CSV HEADER; \copy "order_products" from '/...
<gh_stars>1-10 -- MySQL dump 10.13 Distrib 5.7.16, for Linux (x86_64) -- -- Host: localhost Database: perflogs -- ------------------------------------------------------ -- Server version 5.7.16-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULT...
<reponame>iuri/tutortronics -- getting rid of backslashes using for escaping -- -- procedure drop_package/1 -- CREATE OR REPLACE FUNCTION drop_package( package_name varchar ) RETURNS varchar AS $$ DECLARE v_rec record; v_drop_cmd varchar; v_pkg_name varchar; BEGIN ...
-- 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 pos_unoes...
DROP TABLE IF EXISTS DK_021; CREATE TABLE IF NOT EXISTS DK_021 ( id INTEGER NOT NULL, num SMALLINT NOT NULL, parentId INTEGER, name VARCHAR(300) NOT NULL, constraint code PRIMARY KEY(id,num), constraint uniqueId UNIQUE(id) )
declare v_normal_object VARCHAR2(100):=apex_application.g_x01; v_compare_version VARCHAR2(100):=apex_application.g_x02; v_ret CLOB; v_object AMB_OBJECT%ROWTYPE; v_output CLOB; begin AMB_UTIL.set_ajax_header('text/xml'); IF v_compare_version IS NOT NULL AND v_compare_version<> AMB_CONSTANT.BUILD_IN_VERSION TH...
<reponame>VEuPathDB/offprint<filename>lib/sql/oprdb.create.userdb.user.sql DEFINE user=&1 DEFINE passwd=&2 CREATE USER &&user IDENTIFIED BY &&passwd DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP; ALTER USER &&user ACCOUNT UNLOCK; GRANT CREATE SESSION TO &&user; GRANT RESOURCE TO &&user; ALTER USER &&user DEFAULT ...
create database job4j; create table roles ( id serial primary key, role varchar(2000) ); create table users ( id serial primary key, name varchar(2000), role_id int references roles(id) ); create table rules ( id serial primary key, rule varchar(2000) ); create table roles_and_rules ( id serial primary key...
<filename>sql/2021/resource-hints/http_headers_hints_adoption.sql #standardSQL # Retrieves resource hints from HTTP headers CREATE TEMPORARY FUNCTION getResourceHints(payload STRING) RETURNS STRUCT<preload BOOLEAN, prefetch BOOLEAN, preconnect BOOLEAN, prerender BOOLEAN, `dns-prefetch` BOOLEAN, `modulepreload` BOOLEAN...
<reponame>hashmapinc/HashmapAnalyticsFramework CREATE TABLE IF NOT EXISTS metadata_config ( id varchar(31) NOT NULL CONSTRAINT metadata_config_pkey PRIMARY KEY, owner_id varchar(31), name varchar, source_id varchar(31), sink_id varchar(31) ); CREATE TABLE IF NOT EXISTS metadata_resource_jdbc ( id varchar(3...
DROP TABLE IF EXISTS `phpcms_mood`;
//// CHANGE name=change0 CREATE TABLE table410 ( id integer NOT NULL, field1 character varying(30), usertype0field usertype0, usertype3field usertype3, usertype7field usertype7 ); GO //// CHANGE name=change1 ALTER TABLE ONLY table410 ADD CONSTRAINT table410_pkey PRIMARY KEY (id); GO
select 'Age at Index' as category, count_value, min_value, max_value, avg_value, stdev_value, p10_value, p25_value, median_value, p75_value, p90_value, 0 as concept_id from @ohdsi_database_schema.heracles_results_dist where analysis_id in (1801) and cohort_definition_id = @cohortDefinitionId
\set ECHO none \i sql/hashlib.sql
<filename>sql/_23_apricot_qa/_01_sql_extension3/_05_analytic_functions/_03_rank/cases/rank_prepare_limit.sql --combination with limit clause and prepare statement create table rank_limit( col1 smallint auto_increment primary key, col2 bigint not null, col3 varchar default 'abc', col4 timestamp default CURRENT_TIM...
<filename>db_spk_electre.sql -- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Feb 21, 2021 at 03:56 PM -- Server version: 5.7.24 -- PHP Version: 7.2.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"...
<gh_stars>0 INSERT INTO tb_funcionario VALUES ('8859483743','1973-05-16','Maria','R','Oliveira', 'Rua Altamira 23',18000, 'F', '8859483743', 1); UPDATE tb_funcionario SET NUMERO_DEPARTAMENTO = 2 WHERE CPF = '8859483743'; UPDATE tb_funcionario SET SALARIO = 1.1 * SALARIO WHERE NUMERO_DEPARTAMENTO = 1; INSERT INTO tb...
-- MySQL dump 10.13 Distrib 5.6.35, for osx10.9 (x86_64) -- -- Host: localhost Database: laraclassified -- ------------------------------------------------------ -- Server version 5.6.35 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULT...
<filename>sql_scripts/SEWA_Hackathon.sql<gh_stars>0 -- CREATE DATABASE `sewa` /*!40100 DEFAULT CHARACTER SET utf8 */; set foreign_key_checks=0; DROP TABLE IF exists category; CREATE TABLE `category` ( `categoryid` int(11) NOT NULL AUTO_INCREMENT, `category_name` varchar(255) DEFAULT NULL, PRIMARY KEY (`category...
<reponame>developersworkspace/EPONS -- Fix Epsilon Scale DECLARE @id uniqueidentifier, @active uniqueidentifier, @actid uniqueidentifier SELECT @id = lis.ParentId, @active = lis.StatusId, @actid = lis.LastUpdateAccountId FROM ListItem lip INNER JOIN ListItem lis ON (lip.ParentId IS NULL AND lip.Name = 'Scale' AND...
<reponame>quis/registers-frontend SELECT registers.id AS register_id, registers.name, CAST(register_name_data.data->'register-name' AS varchar) AS register_name, CAST(register_description_data.data->'text' AS varchar) AS register_description FROM registers LEFT JOIN (SELECT register_id, ...
\i table_car.sql \set variables_file car_ids.list \set variables_target car_ids \i load_variables_file.sql SELECT extract(year FROM delivered) AS year, sum(list_price) AS list_price, sum(value) AS value FROM car WHERE car_id IN (:car_ids) GROUP BY extract(ye...
<reponame>originalix/HTML-CSS-Prictice<gh_stars>10-100 DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id INTEGER PRIMARY KEY AUTOINCREMENT, title STRING NOT NULL, text STRING NOT NULL );
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Waktu pembuatan: 15 Jul 2021 pada 14.38 -- Versi server: 5.7.24 -- Versi PHP: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER...
<filename>files/VLF_usage_before_after_active_VLF.sql<gh_stars>1-10 -- from -- https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-db-log-info-transact-sql?view=sql-server-ver15 -- doesn't work in SQL Server 2014 use [mydatabase] ;WITH cte_vlf AS ( SELECT ROW_NUMBER() OVE...
CREATE PROCEDURE [dbo].[x360ce_UpdateSummariesTable] @inserted x360ce_SummariesTableType READONLY, @deleted x360ce_SummariesTableType READONLY, @updateAll bit = 0 AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; /* -- To update all recor...
-- Retourne les autorisations des utilisateurs SELECT use.usename AS subject, nsp.nspname AS namespace, c.relname AS item, c.relkind AS type, use2.usename AS owner, c.relacl, (use2.usename != use.usename AND c.relacl::text !~ ('({|,)' || use.usename || '='))...
INSERT INTO e_resource (id,created_time,creator_id,modified_time,modifier_id,available,name,parent_id,permission,resource_type,url,cls,lable_key,sort_num,access_code,system_id) VALUES ('com_xx_demo_test_customer',NULL,NULL,NULL,NULL,1,'客户','demo',NULL,'MENU','demo-ui/demo/test/customer_index.html','menu-icon fa fa-c...
<reponame>mwernli/digilog-crawling<filename>flyway/flywaymigrations/V0.0008__user_table.sql DROP TABLE IF EXISTS digilog.user; CREATE TABLE IF NOT EXISTS digilog.user ( id serial NOT NULL PRIMARY KEY, username varchar NOT NULL, email varchar NOT NULL, pw_hash varchar NOT NULL, UNIQUE (use...
INSERT INTO books (title, author_id, isbn, year_pub) VALUES('The Trial', '1', '0805210407', '1995'), ('The Metamorphosis', '1', '0553213695', '1995'), ('America', '1', '0805210644', '1995');
<gh_stars>0 -- main insert -- 16385 rows INSERT INTO gnaf.localities(locality_pid, locality_name, postcode, state, latitude, longitude, locality_class, reliability, geom) SELECT loc.locality_pid, loc.locality_name, loc.primary_postcode AS postcode, st.state_abbreviation AS state, avg...
-- Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute -- -- 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/...
/* Navicat Premium Data Transfer Source Server : 本机mysql Source Server Type : MySQL Source Server Version : 50724 Source Host : localhost:3306 Source Schema : pigxx_zipkin Target Server Type : MySQL Target Server Version : 50724 File Encoding : 65001 Date: 22/02/2019...
DELETE FROM transference; DELETE FROM debit; DELETE FROM credit; DELETE FROM account; DELETE FROM customer;
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [incodeCommChannel].[CommunicationChannel]( [id] [bigint] IDENTITY(1,1) NOT NULL, [notes] [text] NULL, [purpose] [varchar](30) NOT NULL, [type] [varchar](30) NOT NULL, [version] [bigint] NOT NULL, [discriminator] [varchar](255)...
CREATE INDEX "IX_CFK_LOCALITY" ON "TAB_MEDIA_REL_FKEY" ("CFK_LOCALITY")
<filename>database/migration_spellitemsubclass.sql SET @CPT=0; INSERT INTO jangosworld.spellitemsubclass (fk_spell, fk_itemclass, fk_itemsubclass) SELECT id as fk_spell, equippedItemClass as fk_itemclass, NULL as fk_itemsubclass FROM dbc.dbc0_spell WHERE equippedItemClass <> 0 AND equippedItemSubClass = 0; SET @CP...
<reponame>tonic889/mifosx<gh_stars>100-1000 INSERT INTO `c_configuration` (`id`, `name`,`value`, `enabled`, `description`) VALUES (NULL, 'min-clients-in-group', '5', '0',"Minimum number of Clients that a Group should have"); INSERT INTO `c_configuration` (`id`, `name`, `value`, `enabled`, `description`) VALUES (NULL,...
<gh_stars>10-100 --Get the number of events without a session and the ones with a session by eventDate. --At least some events should come from the client and have a sessionID set. SELECT eventDate, count(*)-count(sessionId) AS 'sessionless events', count(sessionID) AS 'session events', round((coun...
<reponame>arshinalbab/mlp UPDATE applications SET config = '{ "sections": [ { "name": "Routers", "href": "/routers" }, { "name": "Ensemblers", "href": "/ensemblers" }, { "name": "Ensembling Jobs", "href":...
ALTER TABLE "selfservice_verification_flows" ADD COLUMN "via" TEXT NOT NULL DEFAULT 'email'
<filename>Aggregate_Stored_Procedures/KilkariThematicContentCurrentFinancialYear.sql CREATE DEFINER=`etluser`@`%` PROCEDURE `KilkariThematicContentCurrentFinancialYear`() BEGIN DECLARE dt DATETIME; DECLARE i INT; DECLARE currdate DATETIME; SET dt = (select cast(last_etl_time as datetime) from ETL_info_table where tabl...
USE [$(database)] GO ------------------------------------------------------------------------------- PRINT 'Debut VUES' GO ------------------------------------------------------------------------------- /****** Object: Index [CIDX_DimDate_PartnerCK] Script Date: 01/06/2020 20:28:19 ******/ DROP INDEX IF EXISTS [...
<gh_stars>0 -- XII) -- Contrainte : requêtes équivalentes sans null, mais différentes avec -- Séléctionne les comptes ayant fait une commande mais n'ayant pas de panier, -- mais ne marche pas à cause des null -- Remarque : SELECT DISTINCT c.id_compte FROM commandes c WHERE c.id_compte NOT IN ( SELECT p.id_compte FROM...
create table Image( Id int identity(1,1) Primary key, ImageUrl nvarchar(400), ProductId int FOREIGN KEY REFERENCES Product(ProductId) ) GO insert into Image(ImageUrl, ProductId) values ('/images/iphone8.jpg','2'), ('/images/iphonex.jpg','1'), ('/images/samsung-phone.jpg','3'), ('/images/htc.jpg','4'), ('/images/ipad...
DROP PROCEDURE IF EXISTS simple_loop $$ CREATE PROCEDURE simple_loop() DETERMINISTIC BEGIN DECLARE counter INT DEFAULT 0; simple_loop: LOOP SET counter=counter+1; IF counter=10 THEN LEAVE simple_loop; END IF; END LOOP simple_loop; SELECT 'I can count to 10'; END; $$
<reponame>sogis-oereb/oereb-gretljobs DELETE FROM arp_nutzungsplanung_kanton_oerebv2.transferstruktur_geometrie ; DELETE FROM arp_nutzungsplanung_kanton_oerebv2.transferstruktur_hinweisvorschrift ; DELETE FROM arp_nutzungsplanung_kanton_oerebv2.localiseduri ; DELETE FROM arp_nutzungsplanung_kanton_oe...
<filename>data/Dump20201223.sql UPDATE tbl_baiviet SET Soluotxem = 102 WHERE (Idbaiviet = 11); drop procedure if exists Sp_capnhatluotxem; delimiter // create procedure Sp_capnhatluotxem(in id int) begin update tbl_baiviet set Soluotxem = (Soluotxem + 1) where Idbaiviet = id; end // delimiter ; call Sp_capnhatluotx...
<reponame>RollingSoftware/L2J_HighFive_Hardcore alter table `fort` add `blood` int(3) NOT NULL DEFAULT 0 after `castleId`;
use Northwind GO DROP database ToDo GO CREATE database ToDo GO use ToDo GO CREATE TABLE Categories ( [CategoryID] INT NOT NULL IDENTITY PRIMARY KEY, [CategoryName] NVARCHAR(50) NULL, ); GO CREATE TABLE Users ( [UserID] INT NOT NULL IDENTITY PRIMARY KEY, [UserName] NVARCHAR(50) NULL, ); GO CREATE TABLE Tasks...
<filename>db/schema.sql<gh_stars>1-10 -- Drops the db if it exists currently -- DROP DATABASE IF EXISTS pets_db; -- Creates the database -- CREATE DATABASE pets_db;
<reponame>empiricaldataman/TestRepo /*----------------------------------------------------------------------------------------------- NAME: FindWhatIsBlocking.sql MODIFIED BY: <NAME> EMAIL: <EMAIL> DESCRIPTION: -------------------------------------------------------------------------------------------...
BEGIN; CREATE TYPE sponsorship_level AS ENUM ('platinum', 'gold', 'silver', 'bronze'); CREATE TABLE sponsor( id SERIAL PRIMARY KEY, name TEXT NOT NULL, address TEXT NOT NULL, website TEXT NOT NULL, conference_id SERIAL NOT NULL REFERENCES conference(id), sponsorship_level sponsorship_level NOT NULL ); CR...
<reponame>CSCfi/antero USE [VipunenTK_DW] GO /****** Object: StoredProcedure [dbo].[p_lataa_f_2_4efg] Script Date: 26.10.2017 16:28:25 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[p_lataa_f_2_4efg] AS --execute VipunenTK_DW.dbo.p_lataa_OTV_f_2_4 TRUNCATE TABLE VipunenTK.db...
<reponame>seut/cr8<filename>specs/sql/create_countries.sql create table countries ( "areaInSqKm" real, capital text, continent text, "continentName" text, "countryCode" text, "countryName" text, "currencyCode" text, east real, "fipsCode" text, "isoAlpha3" text, "isoNumeric" t...
<gh_stars>10-100 create or replace package pit_table_pkg as /** Implementation package for type PIT_TABLE */ /** Method to write log information to table PIT_TABLE_LOG * %param p_message Instance of MESSAGE_TYPE to persist * %usage Method implements the LOG member procedure of type PIT_TABLE and *...
<filename>src/test/resources/randexpr1.test_733.sql -- randexpr1.test -- -- db eval {SELECT case when (19*b)+11*~f-coalesce((select max(11) from t1 where f<>case when case 17 when 11 then 17 else c end-11 in (t1.c,c,t1.e) and 19=t1.a or 17<=e or e<=19 then 19 & c when t1.b=t1.f then d else 19 end or t1.e not in (13,19...
<reponame>jdkoren/sqlite-parser<gh_stars>100-1000 -- vtab2.test -- -- execsql { -- CREATE VIRTUAL TABLE vars USING tclvar; -- SELECT * FROM vars WHERE name='abc'; -- } CREATE VIRTUAL TABLE vars USING tclvar; SELECT * FROM vars WHERE name='abc';
/* Enter your query here. */ select distinct city from station where id % 2 = 0;
CREATE DATABASE IF NOT EXISTS `bank` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `bank`; -- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64) -- -- Host: localhost Database: bank -- ------------------------------------------------------ -- Server version 8.0.15 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER...
-- Substitute your parameter values in the connector configurations below. -- If you do not want to connect to a real data source, remove the CREATE SOURCE CONNECTOR commands, -- and add the INSERT INTO commands to insert mock data into the streams
--Contact View SELECT c1.Id, FirstName, LastName, Address1, Address2, Notes, ZipCode, HomePhone, WorkPhone, CellPhone, EMail, CityId, c2.Name as CityName, StateId, s.Name as StateName, c1.Active, c1.ModifiedDt, c1.CreateDt FROM Contact c1 JOIN City c2 ON (c2.Id = c1.CityId) JOIN State s ON (s.Id = c2.StateId) WHER...
<reponame>jcgarciaa/carbon-identity-framework CREATE OR REPLACE PROCEDURE WSO2_CONFIRMATION_CODE_CLEANUP_SP IS i INT := 0; chunk_size INT := 5000; number_of_rows INT := 0; BEGIN SELECT COUNT(*) INTO number_of_rows from ALL_TABLES where table_name = upper('TEMP_REG_RESOURCE_INVALID_ID'); IF (...
create table sla_incident (id bigint not null auto_increment, created_date datetime, last_modified_date datetime, closed_date datetime, primary key (id)); create table sla_incident_repositories (sla_incident_id bigint not null, repository_id bigint not null, primary key (sla_incident_id, repository_id)); alter table sl...
select sql_text,is_shareable,is_bind_aware,child_number,sql_plan_baseline from v$sql where sql_text like '%SPM%';
<gh_stars>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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_E...
CREATE TABLE `blog_post` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` VARCHAR(255) NOT NULL, `alias` VARCHAR(255) NOT NULL, `anons` TEXT NOT NULL, `content` MEDIUMTEXT NOT NULL, `author_id` int(11) DEFAULT NULL, `status` SMALLINT NOT NULL DEFAULT '0', `created_at` int(11) NOT NULL, `updated_at` int...
<reponame>dunarel/dunphd-thesis checkpoint defrag backup database to '/root/devel/backup/db_srv/' blocking select hpf.fen_no, hpf.fen_idx_min, hpf.fen_idx_max from hgt_par_fens hpf where hpf.win_status = 'designed' and hpf.gene_id = 110 and hpf.win_size = 10 order by hpf.fen_no ...
<filename>software/upt/uptEAR/scripts/DataPrimingOracle.sql /*L Copyright Ekagra Software Technologies Ltd. Copyright SAIC, SAIC-Frederick Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/common-security-module/LICENSE.txt for details. L*/ -- -- The following e...