sql
stringlengths
6
1.05M
<filename>db/schema.sql DROP DATABASE IF EXISTS employee_tracker_db; CREATE DATABASE employee_tracker_db; USE employee_tracker_db; CREATE TABLE department ( id INT NOT NULL AUTO_INCREMENT, dept_name VARCHAR(30) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE roles ( id INT NOT NULL AUTO_INCREMENT, tit...
<reponame>cincuranet/FirebirdDbComparer create table t (i int); create function new_ee_function(in1 integer) returns integer external name 'FooBar!new_ee_function' engine FbNetExternalEngine; set term ~; create trigger trig for t before insert as begin new.i = new_ee_function(new.i); end~ set term ;~
with covid_cases as ( SELECT date, country_name, subregion1_name, sum(coalesce(new_confirmed, 0)) as new_confirmed, sum(coalesce(new_deceased,0)) as new_deceased, sum(coalesce(new_recovered,0)) as new_recovered, sum(coalesce(new_tested,0)) as new_tested FROM `dop_sandbox_us.stg_covid19` {% if is_incrementa...
-- rowid.test -- -- execsql { -- SELECT * FROM t3 WHERE a>100.5 AND a<200.5 -- } SELECT * FROM t3 WHERE a>100.5 AND a<200.5
<reponame>Zarun1/Evolve CREATE TABLE A1 ( val INT ) engine=InnoDB;
-- creates table -- creates force_name table CREATE TABLE IF NOT EXISTS force_name ( id INT, name VARCHAR(256) NOT NULL );
<filename>core/src/test/resources/sql/test/list.sql -- full SELECT A.* FROM USER A WHERE 1 = 1 AND A.first_name LIKE '%' -- $ lib.replace(@Line,'%',@{firstName}) AND A.birthday BETWEEN '1990-1-1' AND '2020-12-30' -- $ lib.replace(@Line,'1990-1-1',@{beginDate},'2020-12-30',@{endDate}) AND A.s...
<reponame>mudbri/Faure ------------------------------------------------------------ -- TOPOLOGY MODIFICATION FUNCTIONS ------------------------------------------------------------ /* Add a new link in the network provider * NEW.sid: switch end of the link * NEW.nid: other end of the link (host or switch) * NEW.isHo...
<gh_stars>0 -- INSERT INTO -- driver (first_name, last_name, email, phone_number, msr_id, scca_id, work_req, work_skill) -- VALUES -- ('Nick', 'Maludy', '<EMAIL>', '1234', 1, 2, NULL, NULL), -- ('Brad', 'Bishop', '<EMAIL>', '4321', 2, 3, NULL, NULL); INSERT INTO organization (name) VALUES ('Cin...
/****** Object: StoredProcedure [dbo].[FindActiveRequestedRunForDataset] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[FindActiveRequestedRunForDataset] /**************************************************** ** ** Desc: ** Looks for an active requested run for the specifi...
<filename>sqleditor-other/testscripts/syntax-highlighting-SELECT.sql -- ******************************* -- * Example SQL snippet to test * -- * SELECT highlighting * -- ******************************* SELECT DISTINCT employees AS e FROM EMP_TABLE AS t WHERE e.employed=1 GROUP BY e.lastname HAVING Having-Cause ...
<filename>engine/src/test/resources/org/opencds/cqf/cql/engine/execution/IncludedCodeRefTestCommon.cql<gh_stars>10-100 library IncludedCodeRefTestCommon codesystem "MedicationRequestCategory": 'http://terminology.hl7.org/CodeSystem/medicationrequest-category' code "Community": 'community' from "MedicationRequestCateg...
<reponame>Twyer/discogs-parser CREATE INDEX artists_artist_id ON artists(artist_id); CREATE INDEX artists_name ON artists(name); CREATE INDEX artists_real_name ON artists(real_name); CREATE INDEX artists_data_quality ON artists(data_quality); CREATE INDEX artist_aliases_artist_id ON artist_aliases(artist_id); CREATE ...
<gh_stars>10-100 /* 0.7.0.4 (r1359) Forums icon fix */ UPDATE `cot_forum_sections` SET `fs_icon` = 'images/icons/default/forums.png' WHERE `fs_icon` = 'system/admin/tpl/img/forums.png';
<gh_stars>0 DROP DATABASE IF EXISTS bamazonDB CREATE DATABASE bamazonDB USE bamazonDB CREATE TABLE products ( id INT NOT NULL AUTO_INCREMENT, product_name VARCHAR(50) NOT NULL, department_name VARCHAR(30) NOT NULL, price DECIMAL(10,2) NOT NULL, stock_quantity INT NOT NULL, PRIMARY KEY (id) ) INSERT INTO produ...
<reponame>GuiraldelliS/toduh-api CREATE TABLE IF NOT EXISTS public.board ( id serial NOT NULL, name character varying(30) NOT NULL, color character varying(30) NOT NULL, reset_date date, creation_date date NOT NULL, PRIMARY KEY (id) ); CREATE TABLE IF NOT EXISTS public.item ( id serial NOT...
<gh_stars>0 CREATE DATABASE AGENDA; USE AGENDA; #CRIANDO A TABELA UNIDADE CREATE TABLE UNIDADE ( idEscola int auto_increment primary key NOT NULL, nomeUnidade varchar(45), enderecoUnidade varchar(50), emailUnidade varchar(45), telefoneUnidade varchar(45) ); #CRIANDO A TABELA CURSO CREATE TABLE CURSO ( idCurs...
<gh_stars>0 DROP DATABASE IF EXISTS employee_trackerDB; CREATE database employee_trackerDB; USE employee_trackerDB; CREATE TABLE department ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, name VARCHAR(30) UNIQUE NOT NULL ); CREATE TABLE title_role ( id INT NOT NULL AUTO_INCREMENT, title VARCHAR(30) UNIQUE NOT ...
<reponame>tumluliu/mmrp-osm-analyzer -- scripts for trackseginfo DROP TABLE IF EXISTS trackseginfo; CREATE TABLE trackseginfo( page_no integer, track_id integer, segment_id integer, length_2d double precision, length_3d double precision, moving_tim...
SELECT c1.relname as table, c2.relname as index, a.attname as column, t.typname as type, pg_size_pretty(pg_relation_size(c2.relname::text)) as i_size FROM pg_class c1, pg_class c2, pg_index i, pg_attribute a, pg_type t WHERE c1.oid = i.indrelid and c2.oid = i.indexrelid and a.att...
<filename>test/sql/official-suite/syscall-1.sql -- original: syscall.test -- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test CREATE TABLE t1(x, y); INSERT INTO t1 VALUES(1, 2); ATTACH 'test.db2' AS aux; CREATE TABLE aux.t2(x, y); INSERT INTO t2 VALUES(3, 4) ;ATTACH 'test.db2' AS aux ;PRAGMA main.jo...
CREATE TABLE `creditCategory` ( `id` int(11) NOT NULL AUTO_INCREMENT, `isLocked` tinyint(1) DEFAULT NULL, `status` smallint(6) DEFAULT NULL, `roadieId` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `createdDate` datetime DEFAULT NULL, `lastUpdated` datetime DEFAULT NULL, `name` varchar(100) COLLATE...
<gh_stars>10-100 -- file:gin.sql ln:16 expect:true insert into gin_test_tbl select array[3, 1, g] from generate_series(1, 1000) g
<reponame>WeilerWebServices/PostgreSQL {# FETCH lexize functions for TEXT SEARCH TEMPLATE #} {% if lexize %} SELECT proname, nspname FROM pg_proc JOIN pg_namespace n ON n.oid=pronamespace WHERE prorettype=2281 AND proargtypes='2281 2281 2281 2281' ORDER BY proname; {% endif %} {# FETCH init functions f...
UPDATE `null_point` SET date = ? WHERE ID_Inst = ?
<gh_stars>1-10 -- NOTES -- Cards that require extra coding are at the bottom of the file. -- The "duration" column specifies how many rounds a card is active. -- Zero means the card has no lasting effect; -1 means the card stays permanently. -- Unicode characters cheat sheet: -- - en dash: U+2013 -- - apostrophe (si...
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/log/Release_2_0_logs/KRACOEUS-2534b.sql CREATE TABLE EPS_PROP_SITES ( PROPOSAL_NUMBER varchar2(8) NOT NULL, SITE_NUMBER decimal(3) NOT NULL, LOCATION_NAME varchar2(60) NOT NULL, LOCATION_TYPE_CODE decimal(3) NOT NULL, ORGANIZATI...
<filename>db2te/queryfiles/predefined/Views2XML.sql select XMLELEMENT( NAME "views" , XMLAGG(XMLELEMENT(NAME "view" ,XMLATTRIBUTES(TABSCHEMA as schema,TABNAME as name) ) order by TABSCHEMA,TABNAME ) ) from (select * from syscat.tables t where type='V')
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Feb 19, 2016 at 12:51 AM -- Server version: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
<gh_stars>0 set pagewidth 1000; select T1.id, T1.nume, T1.prenume, T1.an, c.titlu_curs, n.valoare, T1."avg" from ( select * from (select s.id, s.nume, s.prenume, s.an, avg(n.valoare) as "avg" from studenti s join note n on n.id_student=s.id group by s.id, s.nume, s.prenume, s.an, s.nume, s.pren...
create table config( app text not null, key text not null, value text, descr text, primary key(app, key) ); -- insert into config(app, key, value) values ('csimc', 'TTY', '/dev/ttyS0'); insert into config(app, key, value) values ('csimc', 'TTY', '/dev/ttyUSB0'); insert into config(app, key, value) values ('csimc'...
# code Sample from the tutorial at https://learncodeshare.net/2015/06/02/basic-crud-operations-using-cx_oracle/ # The following drops the tables created for the tutorial drop table CX_PETS / drop table CX_PEOPLE /
<gh_stars>1-10 /* Navicat MySQL Data Transfer Source Server : seho Source Server Version : 50553 Source Host : localhost:3306 Source Database : wms Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2019-06-23 21:44:33 */ SET FOREIGN_KEY_CHECKS=0;...
/*L Copyright SAIC Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/cabio/LICENSE.txt for details. L*/ DROP PUBLIC SYNONYM HISTOLOGY_CLOSURE / -- -- HISTOLOGY_CLOSURE (Synonym) -- -- Dependencies: -- HISTOLOGY_CLOSURE (Table) -- CREATE PUBLIC SYNONYM HISTOLOGY_CLOSUR...
<filename>addons/legrand/init.sql -- Fő gyártási helyek beírása a cikktörzsbe WITH cikk as ( select cikk_id, max(id) as id from legrand_gyartasi_lap group by cikk_id ), gyhely as ( select cikk.cikk_id, gylap.gyartasi_hely_id from cikk join legrand_gyartasi_lap as gylap on gylap.id = cikk.id ) update legrand_cikk se...
-- MySQL dump 10.13 Distrib 5.7.26, for osx10.10 (x86_64) -- -- Host: 127.0.0.1 Database: laraclassified -- ------------------------------------------------------ -- Server version 5.7.26 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL...
<reponame>wasimsadiq77/healthrediction<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 22, 2021 at 07:29 PM -- Server version: 10.4.18-MariaDB -- PHP Version: 8.0.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone =...
<filename>DSEscuela/sql/schooldb.sql CREATE DATABASE dsschool; USE dsschool; CREATE TABLE students ( id_student INTEGER NOT NULL AUTO_INCREMENT, regtag VARCHAR(45) NOT NULL, groupa VARCHAR(45) NOT NULL, name VARCHAR(45) NOT NULL, last_name VARCHAR(45) NOT NULL, ml_name VARCHAR(45) NOT NULL, address VA...
SELECT conn.session_id, host_name, program_name, nt_domain, login_name, connect_time, last_request_end_time FROM sys.dm_exec_sessions AS sess JOIN sys.dm_exec_connections AS conn ON sess.session_id = conn.session_id;
<filename>line_items_per_invoice.sql<gh_stars>0 SELECT i.invoiceId, COUNT(i.InvoiceLineId) as NumberOfLines FROM InvoiceLine i GROUP BY i.InvoiceId
SELECT acc.location, 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...
<filename>lexers/t/testdata/transactsql_declare.sql<gh_stars>0 DECLARE @find VARCHAR(30);
<reponame>JohnLBevan/EdinburghFringe create procedure sp_GetSinglePerformanceEventSupplementaryInfoById (@Id as bigint) as begin set nocount on select top 1 Id, PerformanceEventId, SupplementaryInfoId from PerformanceEventSupplementaryInfo where Id = @Id option (fast 1) end
CREATE TABLE [dbo].[tbl_stg_Jira_Status_Category] ( [Status_Category_Id] [int] NOT NULL, [Name] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [Key] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [Color_Name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [Refresh_Id]...
<reponame>peace-shillong/Computer-Applications-Theory-and-Practical-Part-2<gh_stars>0 --calling the procedure gr_3nos set serveroutput on begin gr_3nos(11,11,11); end;
<reponame>darkdrei/Inventario create type descripcion as (articulo integer ,cantidad real);
<reponame>sayler3/Burger<gh_stars>0 INSERT INTO burgers (burger_name) VALUES ('Salmon burger'); INSERT INTO burgers (burger_name) VALUES ('BBQ bacon burger'); INSERT INTO burgers (burger_name) VALUES ('Beyond burger');
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Creato il: Lug 08, 2021 alle 19:21 -- Versione del server: 10.4.18-MariaDB -- Versione PHP: 8.0.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
<gh_stars>1-10 -- Use demo database use __json CREATE TYPE Neo4j EXTERNAL NAME PolyService.[PolyService.Service.Neo4j]; GO DECLARE @neo4j AS dbo.Neo4j = N'http://t4.cloudapp.net:7474/db/data/transaction/commit' SET @neo4j = @neo4j.SetNamePass('ty','ty') DECLARE @result nvarchar(max); SET @result = @ne...
<filename>src/Basics/Get_Current_SQL_Version.sql -- Author: <NAME>, <EMAIL> -- Output: Gives you a quick summary for current sql server and operating system with version and architecture informations. -- Sample: Microsoft SQL Server 2017 (RTM-GDR) (KB4505224) - 14.0.2027.2 (X64) etc... select @@VERSION as V
<reponame>quchunguang/test<gh_stars>1-10 ----------------------------- -- Querying a Table: -- A SELECT statement is used for retrieving data. The basic syntax is -- SELECT columns FROM tables WHERE predicates. ----------------------------- -- A simple one would be: SELECT * FROM weather; -- You may also specify ex...
<filename>ifs-data-layer/ifs-data-service/src/main/resources/db/migration/V238_1__Update_subsidy_control_ktp_terms_and_conditions_v2.sql -- IFS-10325 ktp subsidy control t&cs update SET @system_maintenance_user_id = ( SELECT id FROM user WHERE email = '<EMAIL>'); INSERT INTO terms_and_conditions (name, te...
-- 23.05.2017 18:41:47 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_SysConfig (AD_Client_ID,AD_Org_ID,AD_SysConfig_ID,ConfigurationLevel,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,541147,'S',TO_TIMESTAMP('2017-05-23 18:41:47','YYYY-MM-DD HH24:MI:S...
-- start_ignore SET gp_create_table_random_default_distribution=off; -- end_ignore drop table cr_hybrid_part;
SELECT content FROM test1 WHERE id = constant;
CREATE DATABASE IF NOT EXISTS `astro` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_czech_ci */; USE `astro`; -- MySQL dump 10.13 Distrib 5.7.12, for Win32 (AMD64) -- -- Host: localhost Database: astro -- ------------------------------------------------------ -- Server version 5.7.17-log /*!40101 SET @...
CREATE OR REPLACE FUNCTION category_path(INTEGER) RETURNS TEXT AS $$ DECLARE p INTEGER := (SELECT parent from categories WHERE id = $1)::INTEGER; n TEXT := (SELECT name from categories WHERE id = $1)::TEXT; BEGIN while p > 0 loop n := (SELECT CONCAT(name, ' -> ' , n) from categories WHERE id = p)::TEX...
<filename>employee_table.sql -- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 06, 2018 at 10:07 AM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = ...
<reponame>ranisharafeeque/readyship-app<gh_stars>0 DROP TABLE IF EXISTS "account_has_task"; DROP TABLE IF EXISTS "task"; DROP TABLE IF EXISTS "project"; DROP TABLE IF EXISTS "account"; DROP TABLE IF EXISTS "session";
INSERT INTO item_on_the_menu VALUES ('Spaghetti Bolognesse', 20, 'M') INSERT INTO item_on_the_menu VALUES ('Foie Gras', 30, 'M') INSERT INTO item_on_the_menu VALUES ('Wino "Vino"', 4.50 , 'D')
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 02-Out-2017 às 13:10 -- Versão do servidor: 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=@@CHARACTER_SET_CLIENT */...
CREATE TABLE [dbo].[Conversations] ( [Id] VARCHAR(50) NOT NULL, [ActivityId] VARCHAR(50) NOT NULL, [TurnId] BIGINT NOT NULL CONSTRAINT [PK_Conversations] PRIMARY KEY ([Id]), CONSTRAINT UC_Conversation UNIQUE (Id, TurnId) )
<gh_stars>1-10 CREATE TABLE `user_info` ( `id` char(32) NOT NULL, `user_name` varchar(45) DEFAULT NULL, `user_pwd` varchar(45) DEFAULT NULL, `update_time` datetime DEFAULT NULL, `insert_time` datetime DEFAULT NULL, `status` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO egp_portalservice( id, module, code, version, url, isactive, name, userservice, businessuserservice, helpdoclink, createdby, createddate) VALUES (nextval('seq_egp_portalservice'), (select id from eg_module where contextroot = 'pgr' and parentmodule is null), 'Register Grievance...
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: pm -- ------------------------------------------------------ -- Server version 5.7.20-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!4...
<filename>useful-scripts/sql/drop-all-content-db-objects.sql DROP TABLE __EFMigrationsHistory; ALTER TABLE Publications DROP CONSTRAINT FK_Publications_Contacts_ContactId; ALTER TABLE Publications DROP CONSTRAINT FK_Publications_Methodologies_MethodologyId; ALTER TABLE Publications DROP CONSTRAINT FK_Public...
DROP TABLE "public"."featured";
<gh_stars>1-10 -- 10/16/2018 Paul. Moved to BuildAllAuditViews.8.sql
-- memdb.test -- -- execsql { -- CREATE TABLE t6(x); -- INSERT INTO t6 VALUES(1); -- INSERT INTO t6 SELECT x+1 FROM t6; -- INSERT INTO t6 SELECT x+2 FROM t6; -- INSERT INTO t6 SELECT x+4 FROM t6; -- INSERT INTO t6 SELECT x+8 FROM t6; -- INSERT INTO t6 SELECT x+16 FROM t6; -- ...
<reponame>DavidWiseman/dba-dash<filename>DBADashDB/dbo/Stored Procedures/DBConfigurationHistory_Get.sql CREATE PROC dbo.DBConfigurationHistory_Get( @InstanceIDs VARCHAR(MAX)=NULL, @ConfiguredOnly BIT=0, @DatabaseID INT=NULL ) AS DECLARE @Instances TABLE( InstanceID INT PRIMARY KEY ) IF @InstanceIDs IS NULL BEGIN ...
<reponame>stroxler/demo-apps CREATE TABLE IF NOT EXISTS customers ( id BIGINT NOT NULL, first_name VARCHAR(50) NOT NULL, last_name VARCHAR(50) NOT NULL, n_sales INTEGER NOT NULL, PRIMARY KEY(id) ); CREATE TABLE IF NOT EXISTS items ( id BIGINT NOT NULL, description VARCHAR(100) NOT NULL, ...
--! Previous: sha1:ae6622011e1c35b0b2db1e6212b366bdc1dd2b03 --! Hash: sha1:cd33e5f1f63a039f46502f68fc92029896fb3104 --! split: 1-current.sql -- enter migration here grant insert (id) on table app_public.companies to tasted_visitor;
ALTER TABLE rothschild.`Transactions` ADD pendingVoidDate DATETIME DEFAULT NULL; ALTER TABLE rothschild.`Transactions` ADD INDEX ix_Transactions_pendingVoidDate (pendingVoidDate);
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Dec 19, 2019 at 02:46 AM -- Server version: 10.4.10-MariaDB -- PHP Version: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
<filename>src/test/resources/db/fill/issue-type/issue-type-fill.sql -- Creates custom issue type insert into issue_type(id, issue_group_id, locator, issue_name, abbreviation, hex_color) values (100, 3, 'pb_ajf7d5d', 'Custom', 'CS', '#a3847e');
<gh_stars>10-100 create table customers_addresses( address_id varchar(40) primary key, customer_id varchar(40), type varchar(20), address1 varchar(120), address2 varchar(120), city varchar(50), state varchar(2), postal_code varchar(9), country varchar(3), validated BOOLEAN, deleted_at date...
DROP TABLE IF EXISTS nullable_00571; CREATE TABLE nullable_00571 (x String) ENGINE = MergeTree ORDER BY x; INSERT INTO nullable_00571 VALUES ('hello'), ('world'); SELECT * FROM nullable_00571; ALTER TABLE nullable_00571 ADD COLUMN n Nullable(UInt64); SELECT * FROM nullable_00571; ALTER TABLE nullable_00571 DROP COLUMN ...
<reponame>MidnightBSD/security-advisory alter table advisory_product_map add constraint pk_advisory PRIMARY KEY (advisory_id, product_id); drop index adv_product;
<reponame>AthenaModel/athena ------------------------------------------------------------------------ -- TITLE: -- scenariodb_econ.sql -- -- AUTHOR: -- <NAME> -- -- DESCRIPTION: -- SQL Schema for scenariodb(n): Economics Area -- ------------------------------------------------------------------------ -- Neigh...
create function [dbo].[Roman] ( @arabic int ) returns varchar(30) as begin if @arabic > 10000 return '*' declare @roman varchar(30) set @roman = replicate('M',@arabic/1000) set @arabic = @arabic%1000 set @roman = @roman + replicate('C',@arabic/100) set @arabic = @arabic%100 set @roman = @roman + replic...
<reponame>dsrodrigues/vote-no-restaurante CREATE TABLE Restaurant ( id INTEGER PRIMARY KEY NOT NULL GENERATED BY DEFAULT AS IDENTITY(START WITH 1, INCREMENT BY 1), name VARCHAR(45) NOT NULL , image_path VARCHAR(150) NULL , vote INTEGER NOT NULL ); CREATE TABLE User ( id INTEGER PRIMARY KEY NOT NULL...
ALTER TABLE notifications ADD COLUMN container VARCHAR(50) NULL;
alter table t_lc_task add `info_up` int(3) DEFAULT '0' COMMENT '信息更新申请状态'; DROP TABLE IF EXISTS `t_lc_task_uplog`; CREATE TABLE `t_lc_task_uplog` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', `user_id` bigint(20) DEFAULT NULL COMMENT '用户id', `date_log` date DEFAULT NULL, `cishu` int(3) DEFAULT '0' COMMEN...
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Dec 26, 2016 at 12:50 PM -- Server version: 10.1.9-MariaDB-log -- PHP Version: 5.6.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC...
<gh_stars>0 /* Warnings: - A unique constraint covering the columns `[event_name]` on the table `ResearchEventAttendance` will be added. If there are existing duplicate values, this will fail. */ -- CreateIndex CREATE UNIQUE INDEX "ResearchEventAttendance_event_name_key" ON "ResearchEventAttendance"("event_name")...
<filename>prisma/migrations/20211106215428_file_table_added_file_type/migration.sql -- AlterTable ALTER TABLE "File" ADD COLUMN "fileType" TEXT NOT NULL DEFAULT E'';
<filename>sql/spr.sql WITH cls AS ( SELECT t1.*, 0 AS LEVEL FROM BO_CLASSES AS t1 WHERE t1.GUID = 'wAgjesx5tcaAJxHuubSGfd' UNION ALL SELECT t2.*, t3.LEVEL + 1 AS LEVEL FROM BO_CLASSES AS t2 inner join cls AS t3 ON t2.GUID=t3.GUIDPARENT ) SELECT * FROM cls
create index delta_simc_new on prg.delta_new using hash (teryt_simc); alter table prg.delta_new set logged;
<reponame>akhramov/knast<filename>storage/src/sqlite_engine/remove.sql DELETE FROM storage WHERE key = :key AND tree = :tree;
<filename>src/test/resources/sql/insert/4a3eb795.sql -- file:numeric.sql ln:441 expect:true INSERT INTO num_exp_ln VALUES (3,'1.46093790411565641971')
<gh_stars>100-1000 -- -- Generate random hash string -- DELIMITER $$ DROP FUNCTION IF EXISTS random_hash $$ CREATE FUNCTION random_hash() RETURNS CHAR(40) CHARSET ascii DETERMINISTIC NO SQL SQL SECURITY INVOKER COMMENT 'Generate random hash string' begin declare result CHAR(40) CHARSET ascii; select SHA1( ...
-- -- PostgreSQL database dump -- -- Dumped from database version 10.10 (Ubuntu 10.10-0ubuntu0.18.04.1) -- Dumped by pg_dump version 10.10 (Ubuntu 10.10-0ubuntu0.18.04.1) SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming...
<gh_stars>0 DELIMITER / ALTER TABLE COI_DISCL_PROJECTS ADD CONSTRAINT FK_COI_ISCLOSURE_PROJECTS FOREIGN KEY (COI_DISCLOSURE_ID) REFERENCES COI_DISCLOSURE (COI_DISCLOSURE_ID) / DELIMITER ;
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 07-04-2020 a las 18:58:21 -- Versión del servidor: 10.4.11-MariaDB -- Versión de PHP: 7.4.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!401...
<gh_stars>0 /* ------------------------------------------------------------ * Create table audit_log */------------------------------------------------------------ CREATE TABLE audit_log ( id int NOT NULL IDENTITY (1, 1), dtime datetime NULL, event nvarchar(255) NULL, username nv...
<gh_stars>0 CREATE PROCEDURE [tSQLt].[Private_ResetNewTestClassList] AS BEGIN SET NOCOUNT ON; DELETE FROM tSQLt.Private_NewTestClassList; END;
CREATE SCHEMA [calendar] AUTHORIZATION [dbo];
USE veritabani ALTER TABLE tbl_subeler ADD FOREIGN KEY (sube_iletisim_id) REFERENCES tbl_iletisim (iletisim_id) ALTER TABLE tbl_seans_ve_koltuklar ADD FOREIGN KEY (sk_koltuk_id) REFERENCES tbl_koltuk (koltuk_id) ALTER TABLE tbl_seans_ve_koltuklar ADD FOREIGN KEY (sk_seans_id) REFERENCES tbl_seanslar (...
/****** Object: Table [ParentPortal].[StudentGoal] Script Date: 03/11/2020 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [ParentPortal].[StudentGoal]( [StudentGoalId] [int] IDENTITY(1,1) NOT NULL, [StudentUSI] [int] NOT NULL, [GoalType] [nvarchar](10) NOT NULL, [Goal] [nvarchar](max) NO...
SELECT c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number ,amt ,profit FROM ( SELECT ss_ticket_number ,ss_customer_sk ,ca_city bought_city ,SUM(ss_coupon_amt) amt ,SUM(ss_net_profit) profit FROM store_sales JOIN date_dim JOIN store JOIN household_demographics JOIN cus...