sql
stringlengths
6
1.05M
ALTER TABLE `pc_core_site` ADD UNIQUE(`Name`);
SELECT * FROM DRAFT_ITEM_VALUES WHERE ITEM_NO = ? ;
<filename>core/src/main/resources/schema/app/20190411012200_CB-783_add_crn_to_users.sql<gh_stars>100-1000 -- // CB-783 Add CRN to users. ALTER TABLE users ADD COLUMN usercrn VARCHAR(512); -- //@UNDO ALTER TABLE users DROP COLUMN usercrn;
-- MySQL dump 10.15 Distrib 10.0.29-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: localhost -- ------------------------------------------------------ -- Server version 10.0.29-MariaDB-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARA...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jun 08, 2020 at 01:35 AM -- Server version: 5.7.24 -- PHP Version: 7.2.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : Dim 10 oct. 2021 à 21:40 -- Version du serveur : 10.1.30-MariaDB -- Version de PHP : 7.2.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00";...
<gh_stars>0 /*==============================================================*/ /* DBMS name: MySQL 5.0 */ /* Created on: 10-01-2017 20:12:27 */ /*==============================================================*/ /*====================================...
<filename>sql/data/insert_dag_mgr.sql<gh_stars>0 INSERT INTO dag_mgr SELECT 0, 'DAG_3', 'DAG_1', 'DAG_1_Done', 'Y', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP UNION ALL SELECT 0, 'DAG_3', 'DAG_2', 'DAG_2_Done', 'Y', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP UNION ALL SELECT 0, 'DAG_3', NULL, '103', 'Y', CURRENT_TIMESTAMP, CURRENT...
<reponame>SahrulRasyid98/toko<filename>application/db_toko_online_phpku.sql -- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 16, 2019 at 02:36 PM -- Server version: 5.6.21 -- PHP Version: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+...
Select * from productos Select nombre, caracteristicas from productos select nombre from productos where inflamable = 'S' And cantidad < 50.00 update productos set estado = 'I' where codigo = 1 select * from productos where estado = 'A' delete from productos where codigo = 1 insert INTO productos (nombre, unidad,...
<gh_stars>0 -- (column_name [ASC | DESC] [NULLS {FIRST | LAST }], ); -- todo: add CONCURRENTLY? -- Chebi CREATE INDEX ON chebi_data USING btree (kegg_id); CREATE INDEX ON chebi_data USING btree (hmdb_id); CREATE INDEX ON chebi_data USING btree (lipidmaps_id); CREATE INDEX ON chebi_data USING btree (pubchem_id); -- HM...
<gh_stars>0 -- only run this after you have initialised the database. INSERT INTO Department(name) VALUES ('Mathematics'), ('Computer Science and Engineering'), ('Biology'), ('Physics'), ('Chemistry'), ('Humanities'), ('Business'), ('Social Sciences'), ('History'...
INSERT INTO Artists (ArtistName, ActiveFrom) VALUES ('<NAME>','1975-12-25'), ('AC/DC','1973-01-11'), ('<NAME>','1969-01-01'), ('<NAME>','1919-01-01'), ('<NAME>','1993-01-01'), ('<NAME>','1948-01-01'), ('<NAME>','1963-01-01'), ('Maroon 5','1994-01-01'), ('The Script','2001-01-01'), ('Lit','1988-06-...
CREATE TABLE "scp_status_report" ( "id" SERIAL PRIMARY KEY, "report_date" DATE NULL DEFAULT NULL, "trello_board_id" TEXT NULL DEFAULT NULL, "trello_card_id" TEXT NULL DEFAULT NULL, "trello_card_name" TEXT NULL DEFAULT NULL, "tmetric_hours" REAL NULL DEFAULT NULL, "budget" REAL NULL DEFAULT NULL ) ; COM...
<reponame>tairoroberto/docker-postgres-ptBR create role sa with login password '<PASSWORD>'; create role zanthus with login password '<PASSWORD>';
insert into hardware(id, name, inventory_number, hardware_dictionary_id, valid_to) VALUES (1,'GTX 1040','H1/2019',1, null), (2,'TP-Link','H2/2019',2,null), (3,'i5-7070','H3/2019',3,null), (4,'i3-5400','H4/2019',3,null), (5,'HD 7770','H5/2019',1,'2019-11-04 14:27');
WITH stat_object AS ( SELECT fixtures.id AS fixture_id, JSONB_BUILD_OBJECT( 'identifier', stats.identifier, 'display_order', ( CASE WHEN identifier = 'goals_scored' THEN 1 WHEN identifier = 'assists' THEN 2 WHEN identifier = 'saves' THEN 3 WHEN...
<reponame>ivranjes/phpdev2018 CREATE DATABASE Tenis; USE Tenis; CREATE TABLE Tenisaci( id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, ime VARCHAR (100) NOT NULL, prezime VARCHAR (100) NOT NULL, trener_id INT(11) UNSIGNED NULL, index trener_idx (trener_id), CONSTRAINT trener_fk FOREIGN KEY (tren...
CREATE TABLE [dbo].[Accruals] ( [Id] NVARCHAR(128) NOT NULL, [ContractId] NVARCHAR(128) NOT NULL, [InvoiceNumber] INT NOT NULL, [AccrualDate] DATE NOT NULL, [Summ] DECIMAL(19, 4) NOT NULL, CONSTRAINT [PK_Accruals] PRIMARY KEY CLUSTERED ([Id] ASC), CONSTRAINT [FK_Accruals_Contracts] FOREIG...
CREATE INDEX loc_uid_idx on public.countryregioncitylu USING btree (loc_uid) TABLESPACE pg_default; CREATE INDEX launch_loc_uid_idx ON bloomapp.launch USING btree (location_uid) TABLESPACE pg_default; CREATE INDEX created_loc_uid_idx ON bloomapp.created USING btree (location_uid) TABLESPACE pg_default; CREATE INDE...
<gh_stars>1-10 CREATE TABLE BATCH_JOB_INSTANCE ( JOB_INSTANCE_ID BIGINT NOT NULL PRIMARY KEY, VERSION BIGINT, JOB_NAME VARCHAR(100) NOT NULL, JOB_KEY VARCHAR(32) NOT NULL, CONSTRAINT JOB_INST_UN UNIQUE (JOB_NAME, JOB_KEY) ); CREATE TABLE BATCH_JOB_EXECUTION ( JOB_EXECUTION_ID ...
-- file:alter_table.sql ln:1274 expect:true alter table anothertab alter column atcol2 type text using case when atcol2 is true then 'IT WAS TRUE' when atcol2 is false then 'IT WAS FALSE' else 'IT WAS NULL!' end
<gh_stars>100-1000 CALL foreach('1:3', NULL);
<gh_stars>0 ALTER TABLE nilai_acc_sma ADD `absen_3` text NOT NULL, ADD `absen_4` text NOT NULL, ADD `absen_4` text NOT NULL, ADD `absen_5` text NOT NULL, ADD `absen_6` text NOT NULL, ADD `absen_7` text NOT NULL, ADD `absen_8` text NOT NULL, ADD `absen_9` text NOT NULL, ADD `absen_10` text NOT NULL, ADD `absen_11` text ...
<reponame>sammyjava/neptune -- -- Change UNIQUE constraints on photos so we can have same name in different sets -- \connect - jcms INSERT INTO updatelog (name,value) VALUES ('db_version','20120320'); ALTER TABLE photos DROP CONSTRAINT photos_imagefile_key; ALTER TABLE photos ADD CONSTRAINT photos_imagefile_key UNI...
SELECT Department, Category, Percentage FROM (SELECT D.Name AS Department, C.Name AS Category, CAST( ROUND( COUNT(1) OVER(PARTITION BY C.Id) * 100.00 / COUNT(1) OVER(PARTITION BY D.Id), 0 ) as int ) AS Percentage FROM Categories AS C JOIN Reports AS ...
/* Navicat MySQL Data Transfer Source Server : jesse_root Source Server Version : 50713 Source Host : localhost:3306 Source Database : mall Target Server Type : MYSQL Target Server Version : 50713 File Encoding : 65001 Date: 2017-11-26 16:23:18 */ SET FOREIGN_KEY_CHECKS=0; -- ---...
DROP TABLE IF exists bake_toppings; DROP TABLE IF EXISTS bake; DROP TABLE IF EXISTS toppings; DROP TYPE IF EXISTS status_enum;
<reponame>Alvin4Jay/canal-dump<filename>parse/src/test/resources/ddl/alter/mysql_13.sql CREATE TABLE `tb_yfhnotrnrt` ( `col_vexgpiotuy` binary(1) DEFAULT NULL, `col_qslraszfyz` longtext CHARACTER SET utf8mb4, `col_dyphdacvvd` tinytext CHARACTER SET utf8mb4, `col_xgueitftmx` float(247, 18 ) , `col_ormw...
<reponame>CodeRockets/cr-voter DO $do$ declare acount integer; bcount integer; r RECORD; BEGIN --FOR i IN 1..(select count(*) from question) LOOP FOR r IN SELECT * FROM question WHERE app=1 LOOP acount:=(select round(random() * 49)::integer); bcount:=50-acount; UPDATE question set option_a_count=acount,option...
<reponame>LIU2016/Demo CREATE SEQUENCE "public"."seq_t_e_address" INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 200000000000 CACHE 1; SELECT setval('"public"."seq_t_e_address"', 200000000000, false); ALTER SEQUENCE "public"."seq_t_e_address" OWNER TO "aischool"; CREATE TABLE t_e_address ( id varchar(32...
-- ---------------------------- -- 用户表 -- ---------------------------- CREATE TABLE IF NOT EXISTS `user` ( `id` unsigned int(11) NOT NULL AUTO_INCREMENT COMMENT '用户id', `name` varchar(30) NOT NULL COMMENT '用户名', `password` varchar(50) NOT NULL COMMENT '用户密码,<PASSWORD>', `email` varchar(30) DEFAULT NULL, `pho...
<reponame>adriens/liquibase -- Database: mssql -- Change Parameter: newColumnName=full_name -- Change Parameter: oldColumnName=name -- Change Parameter: tableName=person exec sp_rename '[person].[name]', 'full_name';
WITH daysCte ( d ) AS ( SELECT CONVERT(DATETIME, '1 January 2011') AS d -- starting date UNION ALL SELECT DATEADD(D, 1, d) FROM daysCte WHERE DATEPART(yyyy, d) <= 2012 -- stop year ) SELECT d, DATEPART(wk, d) AS week_number, DATENAME(dw, d) AS day_name, DATENAME(m, d) AS month_name, DATENAME(q, ...
<reponame>PervasiveWellbeingTech/inquire-web-backend select t.relname as table_name, i.relname as index_name, array_to_string(array_agg(a.attname), ', ') as column_names from pg_class t, pg_class i, pg_index ix, pg_attribute a where t.oid = ix.indrelid and i.oid = ix.indexrelid a...
3331,2,19500 6069,1,16000 6070,1,13500 60,2,13500 21690,1,174000 11743,1,19500 5313,2,5000 21458,3,40000 21759,1,82500 1561,2,50000 17986,3,45000
<gh_stars>0 LD_LIBRARY_PATH=/usr/local/pgsql/lib export LD_LIBRARY_PATH
-- [er]tests complex select with unmatched types. create class DML_0001( int_col int not null, var_col varchar(20), set_col set (int,varchar(20))); create class DML_0002 ( int_col int not null, var_col varchar(20), set_col set (int, varchar(20)), ref_col DML_0001, set_ref_col set of DML_0001); create class DML_...
<reponame>NCIP/cabio<filename>software/cabio-database/scripts/sql_loader/arrays/arrayLoad_preprocess.sql /*L Copyright SAIC Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/cabio/LICENSE.txt for details. L*/ @$LOAD/arrays/truncate_staging_tables.sql @$LOAD/arrays/array_cons...
-- @testpoint:opengauss关键字diagnostics(非保留),作为表空间名 --关键字不带引号,创建成功 drop tablespace if exists diagnostics; CREATE TABLESPACE diagnostics RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1'; drop tablespace diagnostics; --关键字带双引号,创建成功 drop tablespace if exists "diagnostics"; CREATE TABLESPACE "diagnostics" RELATIVE ...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost -- Tiempo de generación: 28-09-2020 a las 18:28:00 -- Versión del servidor: 10.4.14-MariaDB -- Versión de PHP: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<reponame>nhs-digital-gp-it-futures/GPITBuyingCatalogue<filename>database/NHSD.GPITBuyingCatalogue.Database/PostDeployment/CreateExecutiveAgency.sql DECLARE @executiveAgencyRoleId AS nchar(5) = 'RO116'; SET IDENTITY_INSERT organisations.Organisations ON; IF UPPER('$(SEED_ORGANISATIONS)') = 'TRUE' AND NOT EXISTS (SEL...
DROP TABLE IF EXISTS city_explorer_locations; drop table if exists events; CREATE TABLE city_explorer_locations( id SERIAL PRIMARY KEY, search_query VARCHAR(30), formatted_query VARCHAR(50), latitude VARCHAR(12), longitude VARCHAR(12) ); CREATE TABLE events( id SERIAL PRIMARY KEY, search_query VARCHAR(3...
DROP TABLE IF EXISTS m_variants; DROP SEQUENCE IF EXISTS m_variants_seq; DROP INDEX IF EXISTS m_variants_deleted_at; DROP TYPE IF EXISTS size;
<reponame>Memo2704/rest-webservices insert into user values(1, sysdate(), 'AB'); insert into user values(2, sysdate(), 'Jack'); insert into user values(3, sysdate(), 'Joe');
<gh_stars>10-100 /* This script will create stored procedure to do preprocessing including: 1. fill missing values with 0 2. remove transactions with negative transaction amount 3. remove transactions with invalide transactionData and time 4. remove prefraud: label == 2 input parameters: @table = table need to be prep...
<gh_stars>1-10 CREATE TABLE users ( user_id serial PRIMARY KEY, email text UNIQUE ); CREATE TABLE items ( item_id serial PRIMARY KEY, user_id integer REFERENCES users, name varchar (50) NOT NULL, dosage varchar (25), taken_today boolean DEFAULT false, serving_size smallint DEFAULT 1, ...
<filename>_pur/DemamdItems.sql USE [Backend] GO /****** Object: Table [pur].[DemamdItems] Script Date: 12/4/2021 12:09:02 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [pur].[DemamdItems]( [Serial] [int] IDENTITY(1,1) NOT NULL, [DemandSerial] [int] NOT NULL, [DocTypeId] [nchar](10) ...
DROP TABLE cinema; DROP TABLE cinema_ent; DROP TABLE sala; DROP TABLE funcionariofuncao; DROP TABLE funcionario; DROP TABLE filme; CREATE TABLE cinema( CNPJ VARCHAR(14), enderecocep VARCHAR(8), endereconum INT, contatoemail VARCHAR(40), contatotel VARCHAR(9), nome VARCHAR(30), PRIMARY KEY(CNPJ...
<filename>src/test/resources/sql/explain/efc9ad90.sql -- file:union.sql ln:137 expect:true explain (costs off) select count(*) from ( select unique1 from tenk1 intersect select fivethous from tenk1 ) ss
<gh_stars>10-100 CREATE DATABASE IF NOT EXISTS `weichu_youdianpu_db` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `weichu_youdianpu_db`; -- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64) -- -- Host: 127.0.0.1 Database: weichu_youdianpu_db -- ------------------------------------------------------ -- Server...
<filename>CSETWebApi/CSETWeb_Api/CSETWebCore.UpgradeLibrary/VersionUpgrader/SQL/903_to_904.sql<gh_stars>100-1000 SET NUMERIC_ROUNDABORT OFF GO SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON GO SET XACT_ABORT ON GO SET TRANSACTION ISOLATION LEVEL Serializable GO B...
<reponame>forgottenlands/ForgottenCore406 DELETE FROM `spell_script_names` WHERE `spell_id` = 77478; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (77478, 'spell_sha_earthquake');
<reponame>BuildingBridge/biznet<gh_stars>1-10 ALTER TABLE B_VOTE_QUESTION DROP CONSTRAINT FK_B_VOTE_QUESTION_B_VOTE GO ALTER TABLE B_VOTE_ANSWER DROP CONSTRAINT FK_B_VOTE_ANSWER_B_VOTE_QUESTION GO ALTER TABLE B_VOTE_EVENT_QUESTION DROP CONSTRAINT FK_B_VOTE_EVENT_QUESTION_B_VOTE_EVENT GO ALTER TABLE B_VOTE_EVENT_ANSWER ...
prompt --application/set_environment set define off verify off feedback off whenever sqlerror exit sql.sqlcode rollback -------------------------------------------------------------------------------- -- -- ORACLE Application Express (APEX) export file -- -- You should run the script connected to SQL*Plus as the Oracle...
#sql("findByUserNameAndStatusUsed") SELECT DISTINCT a.* FROM sys_res a, sys_role b, sys_role_res c, sys_user d, sys_user_role e WHERE a.id = c.res_id AND b.id = c.role_id AND d.id = e.user_id and e.role_id = b.id AND a.`status` = ? AND b.`status` = ? and d.`name...
<reponame>paolomococci/movie-store<filename>DevOps/mariadb/sql/tables/content.sql DROP TABLE IF EXISTS moviestoredb.content; CREATE TABLE moviestoredb.content ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `subject` varchar(255) DEFAULT NULL, `updated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE...
ALTER TABLE memberships ADD COLUMN urn_team VARCHAR(255) NOT NULL AFTER team_id;
CREATE TABLE [dbo].[Car] ( [Id] int identity not null, [Name] nvarchar(255) not null, [Price] decimal(8, 2) ) GO
<filename>db/migrations/mysql/000043_thread_memberships.up.sql CREATE TABLE IF NOT EXISTS ThreadMemberships ( PostId varchar(26) NOT NULL, UserId varchar(26) NOT NULL, Following tinyint(1), LastViewed bigint(20) DEFAULT NULL, LastUpdated bigint(20) DEFAULT NULL, PRIMARY KEY (PostId, UserId) ) EN...
INSERT INTO account_levelisations ( account_id, installation_id, levelisation_id, state ) SELECT accounts.id AS account_id, installations.id AS installation_id, $levelisationId AS levelisation_id, 'Pending' FROM accounts JOIN contracts ON contracts.account_id = accounts.id LEFT JOIN installati...
-- -- Copyright 2020 DataStax, 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 a...
{%- macro last_week(tz=None) -%} {{ dbt_date.n_weeks_ago(1, tz) }} {%- endmacro -%}
<reponame>ngmautri/nhungttk select * from mla_purchase_request_items left join ( select mla_purchase_requests.*, year(mla_purchase_requests.requested_on) as pr_year, concat (mla_users.firstname,' ',mla_users.lastname ) as requester_name, mla_users.department_id as pr_of_department_id, mla_users.department_na...
-- This SQL code was generated by sklearn2sql (development version). -- Copyright 2018 -- Model : CaretRegressor_svmRadial -- Dataset : freidman3 -- Database : mysql -- This SQL code can contain one or more statements, to be executed in the order they appear in this file. -- Model deployment code WITH kernel_inp...
<filename>sql/_02_user_authorization/_02_authorization/_002_revoke/cases/1039.sql --+ holdcas on; --[er]Revoke user who don't exist privilege of update on specifically class that don't exist CALL login('dba','') ON CLASS db_user; REVOKE UPDATE ON DCL_NOT FROM DCL_USER_N; --+ holdcas off;
<reponame>opengauss-mirror/openGauss-graph create node group group_test_t12 with (datanode1, datanode2); create node group group_test_t23 with (datanode2, datanode3); create node group group_test_t123456 with (datanode1, datanode2, datanode3,datanode4, datanode5,datanode6); create node group group_test_t234567 with (d...
<filename>Codigo_Aulas/Consultas encadeadas e funcoes de agregacao.sql /* Bases de Dados - SQL Parte II Consultas encadeadas e funções de agregação */ use emp_táxis; select * from viagem; select Nome , Id_marca from taxi where Id_Marca in ( select Id , Nome from Marca where Nome like 'Audi' ); select * from taxi...
use TempDB go SELECT a.file_id, LOGICAL_NAME = a.name, PHYSICAL_FILENAME = a.physical_name, FILEGROUP_NAME = b.name, FILE_SIZE_MB = CONVERT(DECIMAL(12,2),ROUND(a.size/128.000,2)), SPACE_USED_MB = CONVERT(DECIMAL(12,2),ROUND(FILEPROPERTY(a.name,'SpaceUsed')/128.000,2)), FREE_SPACE_MB = CONVERT(DECIMAL(12,2),R...
<filename>queries/stackoverflow/q11/8717a994ab23ffabd6429e0135907cce33d03d0e.sql SELECT COUNT(*) FROM tag as t, site as s, question as q, tag_question as tq WHERE t.site_id = s.site_id AND q.site_id = s.site_id AND tq.site_id = s.site_id AND tq.question_id = q.id AND tq.tag_id = t.id AND (s.site_name in ('stackoverflow...
<reponame>plzm/sql<filename>GetPerfDataFromDMV.sql -- -------------------------------------------------- -- Purpose: Get perfmon-like metrics from OS DMV so that Performance Monitor does not need to be used -- Author: <NAME>, adapted from <NAME> (https://justinhenriksen.wordpress.com/) -- Date: 2016-06-15 -- Notes ...
<gh_stars>0 DROP DATABASE IF EXISTS status; CREATE DATABASE status;
<reponame>rklarpit/LeetHub # Write your MySQL query statement below SELECT ID, SUM(CASE WHEN MONTH='Jan' THEN REVENUE END) AS Jan_Revenue, SUM(CASE WHEN MONTH='Feb' THEN REVENUE END) AS Feb_Revenue, SUM(CASE WHEN MONTH='Mar' THEN REVENUE END) AS Mar_Revenue, SUM(CASE WHEN MONTH='Apr' THEN REVENUE END) AS Apr_Revenue, S...
<gh_stars>1-10 -- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: conquer_floor -- ------------------------------------------------------ -- Server version 5.5.29 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER...
<gh_stars>100-1000 create table backup_codes ( user_id uuid not null, code varchar(12) not null, primary key (user_id, code), foreign key (user_id) references users(id) )
<reponame>danieldamianov/Databases-Basics---MS-Sql-Server CREATE DATABASE ColonialJourney USE ColonialJourney CREATE TABLE Planets ( Id INT PRIMARY KEY IDENTITY, [Name] VARCHAR(30) NOT NULL ) CREATE TABLE Spaceports ( Id INT PRIMARY KEY IDENTITY, [Name] VARCHAR(50) NOT NULL, PlanetId INT NOT NULL FOREIGN KEY REF...
<reponame>microsoft/FHIR-Analytics-Pipelines<filename>FhirToDataLake/scripts/sql/Resources/Linkage.sql CREATE EXTERNAL TABLE [fhir].[Linkage] ( [resourceType] NVARCHAR(4000), [id] VARCHAR(64), [meta.id] NVARCHAR(4000), [meta.extension] NVARCHAR(MAX), [meta.versionId] VARCHAR(64), [meta.lastUpdat...
INSERT INTO products(id, name, price, payload) VALUES ('5c3ae6cf-1ecc-4ae4-ba86-60e66ef2625b', 'TOP_UP_100', 100, null); INSERT INTO products(id, name, price, payload) VALUES ('261dd820-cfc4-4c3e-a2c8-59d41eb44dfc', 'BLOG_PAYWALL', 1, 'The rest of the article'); INSERT INTO products(id, name, price, payload) VALUES (...
prompt --application/shared_components/user_interface/lovs/p13_var_exp_set_on begin -- Manifest -- P13_VAR_EXP_SET_ON -- Manifest End wwv_flow_api.component_begin ( p_version_yyyy_mm_dd=>'2020.03.31' ,p_release=>'20.1.0.00.13' ,p_default_workspace_id=>2400405578329584 ,p_default_application_id=>100 ,p_default_...
<filename>database/schemas/cfdi_patentes_aduanales.sql<gh_stars>10-100 CREATE TABLE IF NOT EXISTS "cfdi_patentes_aduanales"( "id" text not null, "vigencia_desde" text not null, "vigencia_hasta" text not null, PRIMARY KEY("id") );
<reponame>DDC-NDRS/fledge-iot_fledge -- Remove packages table DROP TABLE IF EXISTS fledge.packages;
CREATE MATERIALIZED VIEW public.mview_vis_data_tabular ( source_id, measurement_date_time, position_date_time, lat, lon, depth, internal_temperature_d, light_d, temperature_d) AS SELECT source.source_id, source.measurement_date_time, source.position_date_time, source.lat, source.lon, source.depth, source."i...
<gh_stars>1-10 --pass unmatched types of values to the 3rd parameter create class coo( col1 char(20), col2 nchar(20), col3 nchar varying(20), col4 bit(8), col5 bit varying(8), col6 date, col7 time, col8 timestamp, col9 set, col10 multiset...
<gh_stars>1-10 --+ holdcas on; set names utf8; create table t(a varchar(10) collate utf8_ko_cs_uca); insert into t values('가'),('각'); select strcmp(cast('伽' as string collate utf8_gen),cast('가' as string collate utf8_ko_cs_uca)); select * from t where a<cast('伽' as string collate utf8_gen); drop table t; set names iso8...
 CREATE procedure [dbo].[GetPeopleInterested]( @branch int = null, @name varchar(150) = null, @people_per_page int = 50, @page int = 1 ) as begin if(@people_per_page is null) set @people_per_page = 150 if(@page is null) set @page = 1 if(not exists(select 1 from vwPerson p left j...
<gh_stars>0 -- MySQL -- -- User -- CREATE TABLE IF NOT EXISTS `user` (`id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'pkey', `name` VARCHAR(1024) NOT NULL COMMENT '名前', `mail` VARCHAR(1024) NOT NULL COMMENT 'メールアドレス', `pass` VARCHAR(64) NOT NULL COMMENT 'パスワード(SHA256)', PRIMARY KEY(`id`)); -- Session -- CREATE TABLE ...
drop sequence customer_seq; drop sequence orders_seq; begin declare cust_count number :=0; order_count number :=0; begin select nvl(count(*),0) into cust_count from customers; select nvl(count(*),0) into order_count from orders; cust_count := cust_count + 1; order_count := order_count + 1; execute im...
<gh_stars>0 ALTER TABLE `user` ADD COLUMN `salt` varchar(36) NULL COMMENT '密码加密盐' AFTER `password`;
<gh_stars>0 CREATE TABLE [Identity].[AspNetUsers] ( [Id] UNIQUEIDENTIFIER NOT NULL, [UserName] NVARCHAR(256) NOT NULL, [NormalizedUserName] NVARCHAR(256) NOT NULL, [Email] NVARCHAR(256) NOT NULL, [NormalizedEmail] NVARCHAR(256) NOT NULL, [EmailConfirmed] BIT NOT NULL, [PasswordHash] NVARCHAR(2...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : mar. 17 sep. 2019 à 11:31 -- Version du serveur : 5.7.26 -- Version de PHP : 7.2.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
<reponame>daehyeonhong/Oracle<filename>hpm/src/sql/htm.sql create table register( id varchar2(20), password1 varchar2(20), password2 varchar2(20), name varchar2(10), tel number(11), email varchar2(20), dob date, url varchar2(20), gender varchar2(6) ); select*from register;
CREATE TABLE messages ( id VARCHAR(64) NOT NULL, address VARCHAR(64) NOT NULL, version VARCHAR(6) NOT NULL, timestamp BIGINT NOT NULL, space VARCHAR(64), token VARCHAR(64), type VARCHAR(12) NOT NULL, payload JSON, sig VARCHAR(256) NOT NULL, metadata JSON, PRIMARY KEY (`id`), KEY address (address...
<reponame>bitmark-inc/dmarc-reader<gh_stars>0 -- schema.sql -*- mode: sql; sql-product: postgres; -*- -- -- data storage for DMARC reports data -- the installation script will ignore this line \echo "--- use the: 'install-schema' script rather than loading this file directly ---" \q -- initial setup \connect postgres...
-- SPDX-License-Identifier: Apache-2.0 -- Licensed to the Ed-Fi Alliance under one or more agreements. -- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. -- See the LICENSE and NOTICES files in the project root for more information. PRINT N'Creating primary key [StaffAbsenceEvent_PK...
CREATE TABLE `accaudio` ( `Accession` varchar(30) CHARACTER SET latin1 DEFAULT NULL, `Title` varchar(255) CHARACTER SET latin1 DEFAULT NULL, `Author` varchar(80) CHARACTER SET latin1 DEFAULT NULL, `Publisher` varchar(150) CHARACTER SET latin1 DEFAULT NULL, `Call_Number` varchar(40) CHARACTER SET latin1 DEFA...
<gh_stars>1-10 /****** Object: Table [dbo].[T_Charge_Code] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[T_Charge_Code]( [Charge_Code] [varchar](6) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [Resp_PRN] [varchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [Resp_HID] [var...
MERGE INTO [dbo].[ClaimsetType] AS Target USING (VALUES (1, 'Public SIS') ,(2, 'Choice SIS') ,(3, 'SPED') ,(4, 'DISC') ,(5, 'Finance') ,(6, 'ReadOnly') ,(7, 'Assessment') ) AS Source (Id, Name) ON Target.Id = Source.Id WHEN MATCHED THEN UPDATE SET Name = Source.Name WHEN NOT MATCHED BY TARGET THE...
<filename>ETL/SQL/create_source_to_standard_vocab_map.sql<gh_stars>1-10 -- Create mapping table as per logic in 3.1.2 Source to Standard Terminology -- found in Truven_CCAE_and_MDCR_ETL_CDM_V5.2.0.doc -- drop table if exists source_to_standard_vocab_map; create table source_to_standard_vocab_map as WITH CTE_VOCAB_MAP...
<gh_stars>1-10 SELECT * FROM residence.commune WHERE province_id = ?;
<gh_stars>1-10 BEGIN; ALTER TABLE insight_dirty_queries DROP CONSTRAINT insight_dirty_queries_insight_series_id_fkey, ADD CONSTRAINT insight_dirty_queries_insight_series_id_fkey FOREIGN KEY (insight_series_id) REFERENCES insight_series (id) ON DELETE CASCADE; COMMIT;