sql
stringlengths
6
1.05M
<gh_stars>0 -- +micrate Up CREATE TABLE articles ( id BIGSERIAL PRIMARY KEY, title VARCHAR NOT NULL, markdown TEXT NOT NULL, html TEXT NOT NULL, plain_text TEXT NOT NULL, is_public BOOL NOT NULL DEFAULT false, published_at TIMESTAMP, url VARCHAR NOT NULL, category_id BIGINT, created_at TIMESTAMP NOT...
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Mar 10, 2021 at 09:16 AM -- Server version: 5.7.33-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 ...
<reponame>EduardoRambo/Aulas-Spring-Boot insert into cliente(id_cliente, nome, renda) values(1, '<NAME>', 2000.76); --insert into cliente(id_cliente, nome, renda) --values(2, '<NAME>', 4658.76); -- --insert into cliente(id_cliente, nome, renda)select * from cliente; -- --values(3, '<NAME>', 45621.76);
<reponame>JAgOneill/Transport-PASS create database pmt_pass; \c pmt_pass; create table passenger_register( passenger_id varchar(10) primary key, passenger_name varchar(60), email_id varchar(30), phone_no varchar(10), password varchar(20) ); create table passenger_form( application_form_id varchar(20) prim...
# # TABLE STRUCTURE FOR: categoriespost # DROP TABLE IF EXISTS `categoriespost`; CREATE TABLE `categoriespost` ( `categories_id` int(11) NOT NULL AUTO_INCREMENT, `kategories_title` varchar(100) NOT NULL, `kategories_description` text, PRIMARY KEY (`categories_id`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHAR...
<reponame>navikt/rekrutteringsbistand-api CREATE TABLE inkluderingsmuligheter ( id BIGSERIAL PRIMARY KEY, stillingsid VARCHAR(36) NOT NULL, tilretteleggingmuligheter TEXT, virkemidler TEXT, prioriterte_maalgrupper TEXT, statlig_inkluderingsdugnad BOOLEAN, rad_opprettet TIMESTAMP(6) DEFAULT c...
<reponame>kuttumiah/HackerRankPractice -- # Problem: https://www.hackerrank.com/challenges/weather-observation-station-3/problem -- # Score: 10 -- MySQL START SELECT DISTINCT CITY FROM STATION WHERE MOD(ID, 2) = 0; -- MySQL END
<reponame>nathan-oliveira/Projeto_Galeria_Video use db_galeria_video; INSERT INTO db_galeria_video.galeria_video VALUES (default, 'teste 1', 'teste 1'); INSERT INTO db_galeria_video.galeria_video VALUES (default, 'teste 2', 'teste 2');
CREATE TABLE "Categorias" ( "Nombre" TEXT NOT NULL COLLATE NOCASE, "Id" INTEGER NOT NULL UNIQUE, PRIMARY KEY("Id" AUTOINCREMENT) )
-- create database CREATE DATABASE OSGS ON( NAME='OSGS', FILENAME='C:\EX\OSGS.mdf', SIZE=17MB, FILEGROWTH=5MB ) LOG ON ( NAME='OSGSLog', FILENAME='C:\EX\OSGSLog.ldf', SIZE=5MB, FILEGROWTH=5MB ) -- create table USE OSGS CREATE TABLE Teacher( tid varchar(25) NOT NULL PRIMARY KEY, tName varchar(15) NOT NULL, ...
CREATE TABLE `cartera_clientes` ( `id` int(11) NOT NULL, `id_vendedor` int(11) NOT NULL, `id_proyecto` int(11) NOT NULL, `id_cliente` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci; ALTER TABLE `cartera_clientes` ADD PRIMARY KEY (`id`), ADD KEY `cartera_cliente_id_vendedor...
insert into t2x_1e5 with dummy(id) as (select 1 from sysibm.sysdummy1 union all select id + 1 from dummy where id < 100000) select id, newguid() as str1 from dummy;
<filename>src/main/webapp/resources/sql/create_db_customer.sql CREATE DATABASE IF NOT EXISTS `web_society_tracker`; USE `web_society_tracker`; -- MySQL dump 10.13 Distrib 5.6.13, for osx10.6 (i386) -- -- Host: 127.0.0.1 Database: web_society_tracker -- ------------------------------------------------------ ...
-- Insert multiple items who's data is distributed to multiple related tables -- https://stackoverflow.com/questions/20561254/insert-data-in-3-tables-at-a-time-using-postgres -- https://stackoverflow.com/questions/68791267/how-to-convert-plain-values-with-arrays-into-a-data-structure-in-postgresql WITH -- Provide the...
<gh_stars>1-10 DROP TABLE settings; CREATE TABLE IF NOT EXISTS settings ( type VARCHAR PRIMARY KEY, value BLOB ) WITHOUT ROWID;
<reponame>hanem100k/sbc-outbound<gh_stars>1-10 -- create our products insert into products (product_sid, name, category) values ('c4403cdb-8e75-4b27-9726-7d8315e3216d', 'concurrent call session', 'voice_call_session'), ('2c815913-5c26-4004-b748-183b459329df', 'registered device', 'device'), ('35a9fb10-233d-4eb9-aada-78...
<reponame>robhubi/GIPrva CREATE VIEW dbo.v_LinkUse_HikeBike AS SELECT dbo.Link.LINK_ID, dbo.BikeHike.USE_ID, dbo.LUT_BASETYPE.NAME_LONG AS BaseTypeName, dbo.LUT_BIKEMERKMAL.NAME_LONG AS BikeFeatureNameTOW, LUT_BIKEMERKMAL_1.NAME_LONG AS BikeFeatureNameBKW, (dbo.BikeHike.USE_ACCESS_TOW ...
<filename>airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab1.sql<gh_stars>1000+ create view "postgres"._airbyte_test_normalization."unnest_alias_ab1__dbt_tmp" as ( -- SQL model to pars...
<reponame>lupengyu0226/www.zhikunet.org<gh_stars>0 DROP TABLE IF EXISTS `shuyang_weixin_focusreply`;
<filename>src/main/resources/data.sql INSERT INTO USUARIO(login, senha, instante) VALUES ('<EMAIL>', '$2a$10$PuMPKe2MBpRpdbnxpaL9peClEfHOFSuYCatRCVNpMVODQc8BlNXL2', '2021-04-05T13:50:41'); INSERT INTO USUARIO(login, senha, instante) VALUES ('<EMAIL>', '$2a$10$PuMPKe2MBpRpdbnxpaL9peClEfHOFSuYCatRCVNpMVODQc8BlNXL2', '202...
<gh_stars>1-10 /****** Object: StoredProcedure [dbo].[LookupOtherFromExperimentSamplePrep] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE dbo.LookupOtherFromExperimentSamplePrep /**************************************************** ** ** Desc: ** Get values for misc fields from th...
<filename>vpc/service/db/migrations/13_assignments.up.sql create unique index branch_eni_attachments_association_id_uindex on branch_eni_attachments (association_id); alter table subnets add cidr cidr; create table assignments ( id bigserial constraint assignments_pk primary key, b...
<gh_stars>10-100 select transit_gateway_route_table_id, akas, tags, title from aws.aws_ec2_transit_gateway_route_table where transit_gateway_route_table_id = '{{ output.resource_id.value }}'
-- start_ignore SET gp_create_table_random_default_distribution=off; -- end_ignore -- -- SYNC1 AO TABLE -- -- --RENAME Column -- ALTER TABLE sync1_ao_all_alter_column_table7 RENAME COLUMN phase TO after_rename_col; INSERT INTO sync1_ao_all_alter_column_table7 VALUES ('sync1_ao1',generate_series(1,10),'a',11...
<filename>db/schema/v1/create1.sql<gh_stars>1-10 CREATE SCHEMA jobcenter AUTHORIZATION $JCADMIN; ALTER SCHEMA jobcenter OWNER TO $JCADMIN; SET search_path = jobcenter, pg_catalog, pg_temp; REVOKE ALL ON SCHEMA jobcenter FROM PUBLIC; GRANT ALL ON SCHEMA jobcenter TO $JCADMIN; GRANT USAGE ON SCHEMA jobcenter TO $JCCLI...
<gh_stars>1-10 -- MySQL dump 10.11 -- -- Host: localhost Database: ansuz_development -- ------------------------------------------------------ -- Server version 5.0.67-0ubuntu6 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40...
<reponame>opengauss-mirror/Yat<filename>openGaussBase/testcase/KEYWORDS/Inout/Opengauss_Function_Keyword_Inout_Case0026.sql<gh_stars>0 -- @testpoint:opengauss关键字Inout(非保留),作为模式名 --关键字不带引号-成功 drop schema if exists Inout; create schema Inout; drop schema Inout; --关键字带双引号-成功 drop schema if exists "Inout"; create schem...
<reponame>CAG9/SQL-Interview-Questions<filename>Hackerrank/African-Cities.sql SELECT CITY.Name FROM CITY INNER JOIN COUNTRY ON CITY.CountryCode = COUNTRY.Code WHERE COUNTRY.Continent = 'Africa'
<reponame>imedboumalek/prisma-express-restful-api<filename>prisma/migrations/20220118174841_topic_relationship/migration.sql /* Warnings: - Added the required column `topicId` to the `conference` table without a default value. This is not possible if the table is not empty. - Added the required column `topicId` ...
<filename>database/hung.sql /* SQLyog Ultimate v12.4.3 (64 bit) MySQL - 10.1.29-MariaDB : Database - hung ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET ...
<filename>Invetario Magazzino.sql CREATE TABLE IF NOT EXISTS `articoli` ( `art_cod` int(11) NOT NULL AUTO_INCREMENT, `cat_cod` int(11) NOT NULL, `art_descrizione` varchar(15) NOT NULL, `art_prezzo` int(11) NOT NULL, `art_ive` int(11) NOT NULL, `art_spese_trasp` int(11) NOT NULL, PRIMARY KEY (`art_cod`) ) ...
<filename>day11/SQLQuery1.sql -- Functions CREATE TYPE MapTable AS TABLE ( Generation INT, RowNumber INT, MapRow NVARCHAR(MAX) ) GO CREATE FUNCTION udfGetRange( @RangeStart INT, @RangeStop INT ) RETURNS TABLE AS RETURN ( WITH Generator(Number) AS ( SELECT @RangeStart UNION ALL SELECT Number + 1 FROM Gene...
DELETE ${DAS_PeriodEnd.FQ}.Payments.Periods FROM ${DAS_PeriodEnd.FQ}.Payments.Periods p INNER JOIN Reference.CollectionPeriods cp ON p.PeriodName = '${YearOfCollection}-' + cp.Name WHERE cp.[Open]=1 GO DECLARE @completionDateTime DATETIME = GETDATE() INSERT INTO ${DAS_PeriodEnd.FQ}.Payments.Periods SELECT '${Y...
<reponame>SpokeyWheeler/sqlfluff DELETE FROM t1;
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 15, 2017 at 06:40 PM -- Server version: 10.1.19-MariaDB -- PHP Version: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 16, 2016 at 01:55 PM -- Server version: 5.6.26 -- PHP Version: 5.6.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
<reponame>lessaworld/sqlpie<filename>sqlpie/db/sql/seed.sql INSERT INTO `schema` (version) VALUES ("1.1.0");
<filename>data/train/sql/64b4f51df49fe39f135b4e3b12ae78b55b9bd681ViewSupplierWorkLoadFull.sql CREATE VIEW [dbo].[ViewSupplierWorkLoadFull] AS SELECT dbo.ViewSupplierWorkLoad.SupplierID, dbo.ViewSupplierWorkLoad.InquiryType, dbo.ViewSupplierWorkLoad.InquiryNumbers, dbo.ViewSupplierWorkLoad.Po...
-- file:privileges.sql ln:517 expect:true CREATE FUNCTION testfunc6a(b int) RETURNS testdomain1 LANGUAGE SQL AS $$ SELECT $1::testdomain1 $$
<reponame>mobilebillercm/payments CREATE TABLE list (id VARCHAR(2) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "list" ("id", "value") VALUES (E'az', E'acerbaixano'); INSERT INTO "list" ("id", "value") VALUES (E'az_AZ', E'acerbaixano (Acerbaixán)'); INSERT INTO "list" ("id", "value") VALUES (E'a...
---------------------------------------------------------- --Remove all T2+/T4+ from npc loot SELECT * FROM [perpetuumsa].[dbo].[entitydefaults] JOIN npcloot ON lootdefinition=entitydefaults.definition WHERE tiertype = 3 AND (tierlevel=2 or tierlevel=4); --Deletes DELETE loot FROM [perpetuumsa].[dbo].npcloot as loot ...
create table LEC_cpi ( lec_year int not null, lec_cpi float); alter table LEC_cpi add constraint LEC_cpiPK PRIMARY KEY (lec_year); create table LEC_exchange ( lec_year int not null, lec_rate float); alter table LEC_exchange add constraint LEC_exchangePK PRIMARY KEY (lec_year); CREATE TABLE event_g...
<filename>phenotypes/codelists/COVID-19_ICU_admission_HES_CC.sql SELECT apc.person_id_deid, cc.CCSTARTDATE as date, '03_ICU_admission' as covid_phenotype, 'HES CC' as source FROM HES_APC as apc INNER JOIN HES_CC as cc ON cc.SUSRECID = apc.SUSRECID WHERE cc.BESTMATCH = 1 AND (a...
SELECT config , status FROM userlogins5.multiblast_fmt_jobs WHERE job_digest = ? AND report_digest = ? AND user_id = ?
<filename>gpff-sql/procedures/perfil/procUpdatePerfil.sql<gh_stars>1-10 -- DROP PROCEDURE GPSQLWEB.procUpdatePerfil CREATE PROCEDURE GPSQLWEB.procUpdatePerfil ( IN P_PRFPRF VARCHAR(10), IN P_PRFNOM VARCHAR(45), IN P_PRFCED VARCHAR(12), IN P_USERNAME VARCHAR(50), IN P_IPADDRESS VARCHAR(255), ...
<filename>hasor-db/src/test/resources/net_hasor_db/tb_user_for_h2.sql create table tb_user ( userUUID varchar(50) not null PRIMARY KEY, name varchar(100) null, loginName varchar(100) null, loginPassword varchar(100) null, email varchar(200) null, index int null,...
alter table bpmn_sequence_flow RENAME COLUMN date TO taken_date;
<filename>tests/sql/oneliners/short-affected.sql -- :name username_for_id :n delete from users where user_id = :user_id
\i test/sql/setup.inc -- test ANALYZE CREATE FOREIGN TABLE kafka_analyze_json ( part int OPTIONS (partition 'true'), offs bigint OPTIONS (offset 'true'), some_int int OPTIONS (json 'int_val'), some_text text OPTIONS (json 'text_val'), some_date date OPTIONS (json 'date_val'), some_time timestam...
<reponame>taskboy3000/Xqursion<filename>share/migrations/SQLite/deploy/7/001-auto.sql -- -- Created by SQL::Translator::Producer::SQLite -- Created on Mon Nov 23 21:00:00 2015 -- ; BEGIN TRANSACTION; COMMIT;
<gh_stars>0 DROP FUNCTION IF EXISTS geotrek.ft_merge_path(integer,integer) CASCADE; CREATE FUNCTION geotrek.ft_merge_path(updated integer, merged integer) RETURNS integer AS $$ DECLARE element RECORD; rebuild_line geometry; updated_geom geometry; merged_geom geometry; reverse_update boolean; ...
INSERT INTO contacts_categories (id_contact_category, name) VALUES (1, 'Personal phone'), (2, 'Company phone'), (3, 'Personal email'), (4, 'Company email'), (5, 'Fax'), (6, 'Skype'), (7, 'ICQ'), (8, 'Facebook');
DROP TABLE STANDARDTEKST;
-- This file should undo anything in `up.sql` ALTER TABLE users ALTER password_hash TYPE VARCHAR(50);
-- +migrate Up SELECT `id` INTO @root_id FROM `groups` WHERE `type`='Base' AND `text_id`='Root'; SELECT `id` INTO @root_self_id FROM `groups` WHERE `type`='Base' AND `text_id`='RootSelf'; INSERT INTO `permissions_granted` (`group_id`, `item_id`, `source_group_id`, `origin`, `can_view`, `latest_update_at`) SELECT @ro...
INSERT INTO coberturas(nombre, imagen) VALUES ("Valmed", "valmed.png"), ("<NAME>", "suterh-osperyh.png"), ("Osrja", "osrja.png"), ("Ospiv", "ospiv.png"), ("Ioma", "ioma.png"), ("Cover Salud", "cover-salud.png"), ("Bristol Medicine", "bristol-medicine.png"), ("Asmepriv", "asmepriv.png"), ("Scientis Medical", "s...
SELECT count(*) FROM SYS.T1 where fid is not null and REGEXP_REPLACE(fid, '[0-9]+', '') is null;
<gh_stars>0 update xcolab_ProposalAttribute set name = CONCAT(CONCAT(name, '_'), numericValue), numericValue = null where name in ('IMPACT_REDUCTION', 'IMPACT_ADOPTION_RATE');
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 07-09-2017 a las 00:27:41 -- Versión del servidor: 10.1.21-MariaDB -- Versión de PHP: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CL...
INSERT INTO criteria_provider(provider_name) VALUES ('AWS Elastic Load Balancer');
-- possible sql for \d, likely could improve -- r = ordinary table, i = index, S = sequence, v = view, m = materialized view, c = composite type, t = TOAST table, f = foreign table SELECT n.nspname AS "Schema", c.relname AS "Table", CASE WHEN c.relkind = 'r' THEN 'table' WHEN c.relkind = 'i' THEN 'index' ...
/* interactive-complex-7 */ select p2.p_personid, p2.p_firstname, p2.p_lastname, l_creationdate, m_messageid from likes, message, person p1, person p2 where m_creatorid = p1.p_personid and m_messageid = l_messageid and p2.p_personid = l_personid and p1.id=5132 ;
-- select1.test -- -- execsql {SELECT f1 FROM test1 ORDER BY f1} SELECT f1 FROM test1 ORDER BY f1
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/RELEASE-SCRIPTS/KC-RELEASE-3_1_1-SCRIPT/KC-RELEASE-3_1_1-Demo-ORACLE.sql set define off set sqlblanklines on spool KC-RELEASE-3_1_1-Demo-ORACLE-Install.log @../../current/4.0/dml/KC_DML_31101_RATE_CLASS_00SD.sql @../../current/4.0/dml/KC_DML_3...
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Creato il: Feb 22, 2020 alle 18:49 -- Versione del server: 10.4.6-MariaDB -- Versione PHP: 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<gh_stars>1-10 insert into t_user(user_name,login_pwd,real_name,phone_no,email,role_name,account_status) values ('admin',md5('admin1234'),'管理员',13878129834,'<EMAIL>','ADMIN',1);
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for hxh_article -- ---------------------------- DROP TABLE IF EXISTS `hxh_article`; CREATE TABLE `hxh_article` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '文章ID', `category` int(6) NOT NULL COMMENT '文章分类', `user_id` int(11) NOT NUL...
<gh_stars>1-10 with dups_pat_key as ( SELECT distinct pat_key FROM {sc}.pat WHERE medrec_key is not NULL group by pat_key having count(*) > 1 ) , dups_medrec_key as ( SELECT distinct pat.medrec_key FROM {sc}.pat join dups_pat_key on dups_pat_key.pat_key = {sc}.pat.pat_key ), p as ( SELECT DISTINCT {0} medrec_key FROM...
CREATE TABLE sts.key_store ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, type VARCHAR(255) NOT NULL, keystore LONGBLOB, PRIMARY KEY (id), CONSTRAINT key_store__name__unique UNIQUE (name) );
<filename>saldo_awal_2018/dinkes/gabung.sql INSERT INTO persediaan (id_transaksi, id_barang, jumlah, harga) VALUES (40339,917,925,14217); INSERT INTO persediaan (id_transaksi, id_barang, jumlah, harga) VALUES (40339,917,1200,1650); INSERT INTO persediaan (id_transaksi, id_barang, jumlah, harga) VALUES (40339,921,2460,1...
<filename>admin/sql/updates/20160515-recluster.sql \set ON_ERROR_STOP 1 BEGIN; CLUSTER edit USING edit_pkey; ANALYZE edit; COMMIT;
<filename>db.sql -- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.4.11-MariaDB - mariadb.org binary distribution -- Server OS: Win64 -- HeidiSQL Version: 11.0.0.5919 -- ------------------------------...
-- 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...
<gh_stars>0 DROP DATABASE IF EXISTS employees CREATE DATABASE employee USE employees --department table-- CREATE TABLE department ( id INTEGER(10) AUTO_INCREMENT NOT NULL, name VARCHAR(30) NOT NULL, PRIMARY KEY (id) ); --role table-- CREATE TABLE roles ( id INTEGER(10) AUTO_INCREMENT NOT NULL, t...
<gh_stars>0 -- -- PostgreSQL database dump -- -- Dumped from database version 10.5 (Ubuntu 10.5-0ubuntu0.18.04) -- Dumped by pg_dump version 10.5 (Ubuntu 10.5-0ubuntu0.18.04) SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_confor...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 1172.16.17.32 -- Generation Time: Jul 14, 2021 at 03:43 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /...
-- MySQL Script generated by MySQL Workbench -- Fri May 1 03:34:42 2020 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON...
alter table "public"."eval_evaluation" alter column "eval_period_id" set not null;
IF NOT EXISTS (SELECT TOP 1 1 FROM sys.foreign_key_columns fk WITH(NOLOCK) JOIN sys.tables t WITH(NOLOCK) ON fk.parent_object_id = t.object_id JOIN sys.columns c WITH(NOLOCK) ON fk.parent_object_id = c.object_id AND fk.parent_column_id = c.column_id JOIN sys.tables t2 WITH(NOLOCK) ON fk.referenced_object_id = t2.ob...
<reponame>okoyejj/portal_demo Create Schema Portal;
create or replace function build.new( _project_id int, _branch_id int, _commit_id int, out build_id int ) returns int as $$ begin INSERT INTO postgres_ci.builds ( project_id, branch_id, commit_id, config, status ) VALU...
<reponame>navikt/bidrag-vedtak -- Table: vedtak -- DROP TABLE vedtak; CREATE TABLE IF NOT EXISTS vedtak ( vedtak_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), enhet_id character(4) NOT NULL, opprettet_av character(7) NOT NULL, oppr...
<reponame>nipinium/chivi -- +micrate Up CREATE TABLE cvusers ( id bigserial primary key, uname citext unique not null, email citext unique not null, cpass text NOT NULL, karma int default 0 NOT NULL, privi int default 0 NOT NULL, privi_until timestamptz, prefs jsonb default '{}'::jsonb NOT NULL, ...
<gh_stars>1-10 -- Migrate data CALL partman.partition_data_proc( 'public.measurements', p_batch := 100, p_source_table := 'public.old_measurements' );
CREATE DATABASE "jobplacement-ratings" WITH OWNER = postgres ENCODING = 'UTF8' CONNECTION LIMIT = -1; \c jobplacement-ratings; CREATE TABLE company_evaluations ( id bigserial NOT NULL, company_id bigint NOT NULL, job_title VARCHAR(70) NOT NULL, content_type VARCHAR(280) NOT NULL, ...
<gh_stars>10-100 DROP TABLE IF EXISTS dec01; CREATE TABLE dec01 ( line_number bigint NOT NULL GENERATED ALWAYS AS IDENTITY, value bigint NOT NULL ); \COPY dec01 (value) FROM PROGRAM 'curl -b session.cookie https://adventofcode.com/2020/day/1/input'; VACUUM ANALYZE dec01; CREATE INDEX ON dec01 (value, line_num...
<filename>samples/databases/wide-world-importers/wwi-ssdt/wwi-ssdt/DataLoadSimulation/Stored Procedures/MakeTemporalChanges.sql -- Note this procedure is not included in the regular build, it -- is called during the post deployment process. -- This is due to the fact it updates temporal tables, and SSDT -- will thro...
<filename>src/5_0_fk.sql create table T(A text, B text); insert into T values('AAA','BBB'); create table U(C integer primary key); pragma foreign_keys = ON; alter table T add column C integer references U(C); select sql from sqlite_master; select * from T where C is null;
<reponame>jrharalson/almanac.httparchive.org<filename>sql/2021/ecommerce/webpush_adoption_by_ecommsites.sql #standardSQL # 13_16a: Web Push adoption stats by eCommerce origins by device SELECT client, COUNT(DISTINCT origin) AS totalECommOrigins, COUNTIF(notification_permission_accept IS NOT NULL) AS eCommOrigins...
<reponame>greenvilleassociates/fusionshellplus -- Add interwiki and fragment columns to redirect table ALTER TABLE /*$wgDBprefix*/redirect ADD COLUMN rd_interwiki TEXT default NULL; ALTER TABLE /*$wgDBprefix*/redirect ADD COLUMN rd_fragment TEXT default NULL;
DROP TABLE IF EXISTS `t_demo`; CREATE TABLE `t_demo` ( `id` BIGINT (20) NOT NULL DEFAULT '0' COMMENT '主键', `demo_key` VARCHAR(255) NOT NULL DEFAULT '0' COMMENT '', `demo_value` VARCHAR (255) NOT NULL DEFAULT '0' COMMENT '', PRIMARY KEY (`id`) );
<filename>tests/queries/0_stateless/01000_subquery_requires_alias.sql<gh_stars>1000+ SET joined_subquery_requires_alias = 1; SELECT * FROM (SELECT 1 as A, 2 as B) X ALL LEFT JOIN (SELECT 3 as A, 2 as B) Y USING (B); SELECT * FROM (SELECT 1 as A, 2 as B) X ALL LEFT JOIN (SELECT 3 as A, 2 as B) USING (B); -- { serverEr...
-- datetime , other select least(datetime'01/01/2000', datetime'01/02/2000'); select least(datetime'01/01/2000', timestamp'01/02/2000'); select least(datetime'01/01/2000', date'01/02/2000'); select least(datetime'01/01/2000', time'00:00:00'); select least(datetime'01/01/2000', '01/02/2000 00:00:00.000'); select ...
<reponame>opengauss-mirror/Yat -- @testpoint: extract(field from timestamp)从给定的时间戳里获取一周的第几天的值 --(field的取值范围:isodow 一周的第几天(1-7)(星期一为1,星期天为7)) select extract(isodow from timestamp '2020-06-16 20:38:40') from sys_dummy;
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 08, 2020 at 10:14 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
DELIMITER $$ USE `bitel_ecommerce`$$ DROP PROCEDURE IF EXISTS `PA_procesarInfoComercial`$$ CREATE PROCEDURE `PA_procesarInfoComercial`() BEGIN DECLARE done INT DEFAULT 0; DECLARE _plan_id INT(11); DECLARE _plan_data_cap VARCHAR(255); DECLARE _plan_unlimited_calls INT(11); DECLARE _plan_unlimited_rpb TINYINT(1);...
<gh_stars>0 insert into userProfile (userProfileID, authId, userProfileURI, realName, givenNames, surName, title, email, displayName, suffix, password) values (1, '34MJNXIPNEX99YZZ4QOP1MTFBN3Y27KA', 'http://gooduri.com/1', 'realname', 'givenname1', 'surname1', 'title1', '<EMAIL>', 'displayname1', 'suffix1', '6584a...
insert into orders (id, userId, lineProductId) values (1, 2, 3), (2, 3, 2), (3, 1, 4);
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 20, 2020 at 06:21 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<filename>sql/yjbb/603393.sql EXEC [EST].[Proc_yjbb_Ins] @Code = N'603393',@CutoffDate = N'2017-09-30',@EPS = N'0.96',@EPSDeduct = N'0',@Revenue = N'6.30亿',@RevenueYoy = N'9.96',@RevenueQoq = N'-5.49',@Profit = N'1.53亿',@ProfitYoy = N'28.14',@ProfiltQoq = N'-22.31',@NAVPerUnit = N'11.4508',@ROE = N'8.50',@CashPerUnit =...