sql
stringlengths
6
1.05M
-- Deploy app_jobs:structure/job to pg -- requires: structure/job_queue BEGIN; CREATE TABLE app_jobs.job ( id serial PRIMARY KEY, queue_name varchar DEFAULT (public.gen_random_uuid())::varchar NOT NULL, task_identifier varchar NOT NULL, payload json DEFAULT '{}'::json NOT NULL, priority int DEFA...
USE project; CREATE OR REPLACE VIEW label_count AS SELECT label_name AS "Label Name", label_city AS "Label City", label_country AS "Label Country", COUNT(label_id) AS "Amount of Labels in Database" FROM vinyllabel vl JOIN labels l USING(label_id) JOIN vinyl v ON vl.vinyl_id = v.vinyl_id GROUP BY label_i...
<gh_stars>1-10 CREATE TABLE LevyDeclarationTopup ( [Id] BIGINT identity (1,1) not null, [DateAdded] DATETIME not null, [SubmissionId] BIGINT not null, [SubmissionDate] DATETIME not null, [Amount] DECIMAL (18,4) not null default 0 ) GO CREATE INDEX [IX_LevyDeclarationtopup_submissionid] ON [LevyDeclarationTopup] ...
alter table customers_search_view add column groups jsonb not null default '[]'; create unique index group_and_customer_data_id_unique_idx on customer_group_members (group_id, customer_data_id);
<filename>db_archive/sql_archive/669__alter_table_d_paaasiallinen_toiminta_versio3.sql USE [VipunenTK_lisatiedot] GO /****** Object: Table [dbo].[paaasiallinen_toiminta_versio3] Script Date: 14.7.2017 14:58:09 ******/ DROP TABLE IF EXISTS [dbo].[paaasiallinen_toiminta_versio3] GO /****** Object: Table [dbo].[paaas...
-- Deploy seattleflu/id3c-customizations:roles/view-owner/grants to pg -- requires: roles/view-owner/create seattleflu/schema:roles/reporter begin; grant reporter to "view-owner"; /* This is stupidly necessary for RDS since postgres isn't a true superuser and * only gets superuser-like permissions via its CREATE RO...
<reponame>chitratsr/AzureSynapseScriptsAndAccelerators<filename>Assessment/Scripts/Netezza/_v_sys_object_storage_size_V1.sql select * from admin._v_sys_object_storage_size;
<reponame>ehardy/graphql-schema-registry ALTER TABLE `schema` CHANGE `type_defs` `type_defs` MEDIUMTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'Graphql schema definition for specific service';
if not exists (select 1 from dbo.Expense) BEGIN INSERT INTO dbo.Expense (Purpose, ExpenseDate, Amount, EmployeeName, EmployeeEmail, ApproverName, ApproverEmail, Receipt) values ('FastTrack team visit-1', '2017-7-10', 1500, '<NAME>', '<EMAIL>', '<NAME>', '<EMAIL>', 'http://contosocandies-cdnep.azureedge.net/cdn/cand...
INSERT INTO TASK_DEF_BASE(ID,CODE,PROCESS_DEFINITION_ID) VALUES(1,'taskuser-2','vacation:1:12'); INSERT INTO TASK_DEF_BASE(ID,CODE,PROCESS_DEFINITION_ID) VALUES(2,'taskuser-3','vacation:1:12'); INSERT INTO TASK_DEF_BASE(ID,CODE,PROCESS_DEFINITION_ID) VALUES(3,'taskuser-6','vacation:1:12'); INSERT INTO TASK_DEF_B...
/****** Object: StoredProcedure [dbo].[GetOrganismID] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE GetOrganismID /**************************************************** ** ** Desc: Gets organismID for given organism name ** ** Return values: 0: failure, otherwise, organismID ** *...
<reponame>fjudith/sql-benchmark<gh_stars>10-100 CREATE table test_simple ( id INTEGER PRIMARY KEY AUTOINCREMENT, value INTEGER )
ALTER TABLE users ADD COLUMN `flightaware_username` VARCHAR(255) NOT NULL DEFAULT '', ADD COLUMN `flightaware_apikey` VARCHAR(255) NOT NULL DEFAULT '';
update website_purchase_service_ads set state = 5 where id in ( SELECT website_purchase_service_ads.id FROM website_service_ads,website_purchase_service_ads Where website_purchase_service_ads.service_ads_id_id = website_service_ads.id and website_purchase_service_ads.state = '4' and (website_purchase_service_ads.date...
UPDATE alipay_gzuserinfo SET <#if alipayGzuserinfo.userid ?exists && alipayGzuserinfo.userid ?length gt 0> userid = :alipayGzuserinfo.userid, </#if> <#if alipayGzuserinfo.name ?exists && alipayGzuserinfo.name ?length gt 0> name = :alipayGzuserinfo.name, </#if> <#if alipayGzuserinfo.department...
<filename>optimizer/creative_w_plan/profile/q1.sql select /* PROFTEST */ * from sales WHERE sale_date >= trunc(sysdate);
<reponame>feelpix/homeCost TRUNCATE `category`; INSERT INTO `category` (`code`, `label`, `tag`, `show`) VALUES ('CHARGE', 'Charges', 'Charges', 0); INSERT INTO `category` (`code`, `label`, `tag`, `show`) VALUES ('APPORT', 'Apports', 'Apports', 0); INSERT INTO `category` (`code`, `label`, `tag`, `show`) VALUES ('DIVERS'...
-- @testpoint: opengauss关键字Host(非保留),作为存储过程名,部分测试点合理报错 --关键字不带引号-成功 create or replace procedure Host( section number(6), salary_sum out number(8,2), staffs_count out integer) is begin select sum(salary), count(*) into salary_sum, staffs_count from staffs where section_id = section; end; / drop procedure Host(secti...
HDF5 "tall.h5" { DATASET "/g1/g1.1/dset1.1.1" { DATATYPE H5T_STD_I32BE DATASPACE SIMPLE { ( 10, 10 ) / ( 10, 10 ) } SUBSET { START ( 1, 1 ); STRIDE ( 2, 3 ); COUNT ( 3, 2 ); BLOCK ( 1, 1 ); DATA { (1,1): 1, 4, (3,1): 3, 12, (5,1): 5, 20 } } ATTRIBUT...
DROP DATABASE IF EXISTS employeeDB; CREATE database employeeDB; USE employeeDB; CREATE TABLE department ( id INTEGER NOT NULL identity PRIMARY KEY, name VARCHAR(30) ); CREATE TABLE role ( id INTEGER NOT NULL identity PRIMARY KEY, position VARCHAR(30), salary DECIMAL, department_id INTEGER, FOREIGN KEY...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Feb 01, 2017 at 06:00 AM -- Server version: 10.1.16-MariaDB -- PHP Version: 5.5.38 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
<gh_stars>0 CREATE PROC usp_GetEmployeesSalaryAbove35000 AS BEGIN SELECT FirstName, LastName FROM Employees WHERE Salary > 35000 END
<reponame>uzzwalbadal/laravelecommerce-amazcart-<filename>static_sql/cities/cities_3.sql INSERT INTO `cities` (`id`, `name`, `state_id`) VALUES (4479, 'Medchal', 36), (4480, 'Miryalaguda', 36), (4481, '<NAME>', 36), (4482, 'Nakrekal', 36), (4483, 'Nalgonda', 36), (4484, 'Narayanpet', 36), (4485, 'Narsampet', 36), (448...
<reponame>webatozexpert/newprojec<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 30, 2020 at 04:11 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; ...
<reponame>rf101010/omdb<filename>sql/abasiccomposer_db.sql -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 03, 2020 at 10:48 PM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.3.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; STA...
<gh_stars>0 -- Database generated with pgModeler (PostgreSQL Database Modeler). -- pgModeler version: 0.9.4 -- PostgreSQL version: 13.0 -- Project Site: pgmodeler.io -- Model Author: --- -- object: tarmo_admin | type: ROLE -- -- DROP ROLE IF EXISTS tarmo_admin; CREATE ROLE tarmo_admin WITH CREATEROLE LOGIN ENCRYPTED...
SET ANSI_NULLS ON; SET ANSI_PADDING ON; SET ANSI_WARNINGS ON; SET ANSI_NULL_DFLT_ON ON; SET CONCAT_NULL_YIELDS_NULL ON; SET QUOTED_IDENTIFIER ON; go CREATE VIEW [fb].[CommentsPostsView] AS ( SELECT [Id] ,[Created Date] ,CONVERT(date, [Created Date]) AS...
CREATE DATABASE seata_order; CREATE TABLE `seata_order`.`t_order` ( `id` BIGINT(11) NOT NULL AUTO_INCREMENT COMMENT 'id', `user_id` BIGINT(11) COMMENT '用户id', `product_id` BIGINT(11) COMMENT '产品id', `count` INT(11) COMMENT '数量', `money` DECIMAL(11,0) COMMENT '金额', `status` INT(1) COMMENT '订单状态,0创建中;1已完结', PRIMARY KEY (...
<reponame>daviddyess/api create table ingredient_category ( id serial not null, name varchar(50) not null, ordinal int not null, description text not null, constraint pk_ingredient_category primary key (id), constraint uk1_ingredient_category unique (name), constraint uk2_ingredient_category unique (ordi...
DROP DATABASE IF EXISTS employee_trackerdb; CREATE database employee_trackerdb; USE employee_trackerdb; CREATE TABLE department ( ID INT NOT NULL AUTO_INCREMENT, dept_name VARCHAR(30) NULL, PRIMARY KEY (ID) ); CREATE TABLE emp_role ( ID INT NOT NULL AUTO_INCREMENT, title VARCHAR(30) NULL, salary DECIMAL(...
ALTER TABLE `contestant` CHANGE `tmpIsOfficial` `tmpIsOfficial` TINYINT(4) NULL DEFAULT NULL;
-- update.test -- -- execsql {UPDATE test1 SET f2=f2-1 WHERE f1==8 and f2<800} UPDATE test1 SET f2=f2-1 WHERE f1==8 and f2<800
<reponame>commi235/oos-utils create or replace package oos_util_string as -- TYPES -- CONSTANTS /** * @constant gc_default_delimiter Default delimiter for delimited strings * @constant gc_cr Carriage Return * @constant gc_lf Line Feed * @constant gc_crlf Use for new lines. */ gc_default_delimit...
CREATE TABLE [dbo].[BugNet_ProjectMailBoxes] ( [ProjectMailboxId] INT IDENTITY (1, 1) NOT NULL, [MailBox] NVARCHAR (100) NOT NULL, [ProjectId] INT NOT NULL, [AssignToUserId] UNIQUEIDENTIFIER NULL, [IssueTypeId] INT NULL, [CategoryId] ...
<filename>microservicio/infraestructura/src/main/resources/sql/revision/buscarxId.sql<gh_stars>0 select * from revisiones where idRevision = :idRevision
/* terminal: > mysql mykitchen_db < <path>/mykitchen.sql > mysql -u <username> (password optional) -p mykitchen_db < <path>/mykitchen.sql (mit Password) -- mykitchen_db optional */ /* create database and use it */ CREATE DATABASE IF NOT EXISTS mykitchen_db; USE mykitchen_db; /* delete tables and create new */ DROP ...
-- -- Copyright 2009-2012 The MyBatis Team -- -- 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 requ...
<gh_stars>1-10 /* Copyright © 2020 Hashmap, 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 agreed to in wri...
<reponame>h4ck3rm1k3/S2RDF<gh_stars>10-100 SELECT tab0.v1 AS v1 , tab6.v7 AS v7 , tab4.v5 AS v5 , tab5.v6 AS v6 , tab3.v4 AS v4 , tab8.v9 AS v9 , tab2.v3 AS v3 , tab7.v8 AS v8 , tab1.v2 AS v2 FROM (SELECT obj AS v1 FROM wsdbm__follows$$1$$ WHERE sub = 'wsdbm:User8533474' ) tab0 JOIN (SELECT sub AS v1 ...
<reponame>UAMS-DBMI/PosdaTools -- Name: RTDOSEWithBadModality -- Schema: posda_files -- Columns: ['collection', 'site', 'patient_id', 'series_instance_uid', 'modality', 'dicom_file_type', 'num_files'] -- Args: [] -- Tags: ['by_series', 'consistency', 'for_bill_series_consistency'] -- Description: Check a Series for Con...
<reponame>opengauss-mirror/Yat -- @testpoint:不同参数个数及类型测试(合理报错) select asin() as result; select asin(2 2) as result; select asin(2,2) as result; select asin(2)(2) as result; select asin('abcd') as result; select asin 1 as result;
-- @testpoint: opengauss关键字constraint_catalog(非保留),作为数据库名,关键字带单引号、反引号、不带引号时,合理报错 --关键字不带引号-成功 drop database if exists constraint_catalog; create database constraint_catalog; --关键字带双引号-成功 drop database if exists "constraint_catalog"; create database "constraint_catalog"; --关键字带单引号-合理报错 drop database if exists 'constr...
<reponame>lol768/wss-case-management # --- !Ups ALTER TABLE UPLOADED_FILE ADD OWNER_ID uuid; ALTER TABLE UPLOADED_FILE ADD OWNER_TYPE varchar(20); ALTER TABLE UPLOADED_FILE_VERSION ADD OWNER_ID uuid; ALTER TABLE UPLOADED_FILE_VERSION ADD OWNER_TYPE varchar(20); CREATE INDEX IDX_UPLOADED_FILE_OWNER ON UPLOADED_FILE (OW...
<reponame>OpenSundsvall/api-service-messaging<filename>src/main/resources/db/migration/V2.1__drop_unneeded_tables.sql DROP TABLE IF EXISTS `queued_emails_attachments`; DROP TABLE IF EXISTS `queued_emails`; DROP TABLE IF EXISTS `queued_smses`;
<reponame>jspilinek/sqlperf<filename>sql/AllConfigValues.sql SELECT name, value, value_in_use, minimum, maximum, is_dynamic, is_advanced, description FROM sys.configurations ORDER BY name;
<filename>3person_address.sql INSERT INTO person_address VALUES ( 1, 1 ); INSERT INTO person_address VALUES ( 2, 2 ); INSERT INTO person_address VALUES ( 3, 3 ); INSERT INTO person_address VALUES ( 4, 4 ); INSERT INTO person_address VALUES ( 5, 5 ); -- INSERT INTO person_address VALUES ( 6, 6 ); INSERT I...
CREATE TABLE `lead` ( `id` bigint(20) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `phone` bigint(20) NOT NULL, `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `message` text COLLATE utf8mb4_unicode_ci NOT NULL...
<gh_stars>0 CREATE TABLE [Calculation_of_a_Component].[DS_1] ( [Id_1] INT NOT NULL, [Id_2] VARCHAR(32) NOT NULL, [Id_3] VARCHAR(32) NOT NULL, [Me_1] INT CONSTRAINT [PK_Calculation_of_a_Component_DS_1] PRIMARY KEY CLUSTERED ([Id_1], [Id_2], [Id_3]) )
<reponame>ShiftCipher/Preodator<filename>db.sql CREATE TABLE users( "id" SERIAL PRIMARY KEY, "data" JSONB, "create_at" TIMESTAMP default current_timestamp ); CREATE TABLE admins( "id" SERIAL PRIMARY KEY, "data" JSONB, "create_at" TIMESTAMP default current_timestamp ); CREATE TABLE campaigns( "id" SERIAL...
<filename>db/structure.sql -- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET client_min_messages = warning; -- -- Name: pl...
<reponame>truongtu268/togo<filename>internal/storages/schema/todo.sql<gh_stars>0 CREATE TABLE users ( id TEXT NOT NULL, password TEXT NOT NULL, max_todo INTEGER DEFAULT 5 NOT NULL, CONSTRAINT users_PK PRIMARY KEY (id) ); INSERT...
<reponame>tushartushar/dbSmellsData CREATE TABLE msys_ct ('msys_name' text, id integer primary key) CREATE TABLE constraint_ah3_term (p0 integer, p1 integer, p2 integer, p3 integer, param integer not null) CREATE TABLE particle ( id integer primary key, anum integer, name text not null, x float, y float, z float, vx fl...
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 24 Apr 2020 pada 12.37 -- Versi server: 10.4.8-MariaDB -- Versi PHP: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select {{ json_extract_scalar('_airbyte_data', ['id']) }} as {{ adapter.quote('id') }}, ...
-- -- View to fetch table names in the database. -- CREATE VIEW utils.vw_table_names AS ( SELECT table_name AS name FROM information_schema.tables WHERE table_schema = 'public' AND table_type = 'BASE TABLE' );
ALTER TABLE Questions ADD COLUMN RemoteOptionSetId LONG; ALTER TABLE Questions ADD COLUMN DisplayId LONG; ALTER TABLE Options ADD COLUMN RemoteOptionSetId LONG;
/* dapatkan jumlah total dari kolom price dimana nilai character_name adalah "Ninja Ken" */ SELECT SUM(price) FROM purchases WHERE character_name = "Ninja Ken" ;
<filename>DB/stats.sql<gh_stars>0 /* -- Query: SELECT * FROM footprono.stats LIMIT 0, 1000 -- Date: 2022-03-21 21:01 */ INSERT INTO `` (`nombrebut`,`goodprono`,`goodwinner`,`redcard`,`yellowcard`) VALUES (0,0,0,0,0);
/****** Object: StoredProcedure [dbo].[AutoResolveOrganismName] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE Procedure dbo.AutoResolveOrganismName /**************************************************** ** ** Desc: Looks for entries in T_Organisms that match @NameSearchSpec ** First check...
---------------------------------------------------------------------------- -- Trivadis AG, Infrastructure Managed Services -- Saegereistrasse 29, 8152 Glattbrugg, Switzerland ---------------------------------------------------------------------------- -- Name......: ld_profiles.sql -- Author....: <NAME> (oes) <EM...
\connect bunsen -- -- bunsen_nvd_versions -- CREATE TABLE bunsen_nvd_versions ( id integer NOT NULL, version_type character varying, version character varying, applied timestamp without time zone ); ALTER TABLE bunsen_nvd_versions OWNER TO postgres; ALTER TABLE ONLY bunsen_nvd_versions ADD CONSTRAINT...
SELECT [AssessmentIdentifier] ,[IdentificationCode] ,[Namespace] ,[AssessmentItemCategoryDescriptorId] ,[MaxRawScore] ,[ItemText] ,[CorrectResponse] ,[ExpectedTimeAssessed] ,[Nomenclature] ,[AssessmentItemURI] ,[Discriminator] ,[CreateDate] ,[LastM...
DROP VIEW vw_rsk; DROP VIEW vw_rsk_failure; ALTER TABLE rsk_run ALTER COLUMN create_instant SET DATA TYPE timestamp with time zone; ALTER TABLE rsk_run ALTER COLUMN start_instant SET DATA TYPE timestamp with time zone; ALTER TABLE rsk_run ALTER COLUMN end_instant SET DATA TYPE timestamp with time zone; ALTER TABLE rsk...
INSERT INTO comment(uuid, comment, post_uuid) VALUES ('28612604-abc9-42f2-b257-0fe34d0bd2f9', 'random comment', '4e3668a3-ac58-406d-96f6-ed9a52c37e70'), ('e44a23be-cbaa-4175-a8c9-c31723adb303', 'comment', 'dbb7308c-fb1b-402b-9096-e0274448e0c8'), ('e44ad3be-c1a2-4175-a8c9-c3172aadb303', 'lorem ipsu...
<filename>src/migrations/postgresql/1520474950_create_verifications_ip_addresses_table.down.sql<gh_stars>10-100 DROP TABLE verifications_ip_addresses;
DROP TABLE auth_failure_audit_record; DROP TABLE request_audit_record; DROP TABLE event_audit_record;
select ps_partkey, sum(ps_supplycost * ps_availqty) as value from partsupp, supplier, nation where ps_suppkey = s_suppkey and s_nationkey = n_nationkey and n_name = 'tnRfQFMQ8WmXJ' group by ps_partkey having sum(ps_supplycost * ps_availqty) > ( select sum(ps_supplycost * ps_a...
CREATE TABLE IF NOT EXISTS `accounts` ( `id` int(11) NOT NULL, `name` varchar(13) NOT NULL, `password` varchar(128) NOT NULL, `salt` varchar(32) DEFAULT NULL, `2ndpassword` varchar(134) DEFAULT NULL, `salt2` varchar(32) DEFAULT NULL, `loggedin` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, `lastlogin` timesta...
<filename>optimizer/spm_on_11g/q1.sql set echo on var val number exec :val := -1 select /* SPM_DEMO */ sum(val) from sales where id = :val; select /* SPM_DEMO */ sum(val) from sales where id = :val; select /* SPM_DEMO */ sum(val) from sales where id = :val; select /* SPM_DEMO */ sum(val) from sales where id = :val; s...
SET optimize_on_insert = 0; select '-- SummingMergeTree with Nullable column without duplicates.'; drop table if exists tst; create table tst (timestamp DateTime, val Nullable(Int8)) engine SummingMergeTree partition by toYYYYMM(timestamp) ORDER by (timestamp); insert into tst values ('2018-02-01 00:00:00', 1), ('2...
<gh_stars>0 -- Copyright (c) Microsoft Corporation. All rights reserved. -- Licensed under the PostgreSQL License. -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION pgautofailover" to load this file. \quit DO $body$ BEGIN if not exists (select * from pg_catalog....
create table if not exists surpasser_power( area_id int(5) not null auto_increment, power_value int(5) default 0, area varchar(20) null, primary key (area_id) ); insert into surpasser_power(power_value, area) values(3, 'China'); insert into surpasser_power(power_value, area) values(4, 'Europe')...
CREATE SEQUENCE plugin_datashare_pk_seq; CREATE TABLE plugin_datashare ( study_id integer DEFAULT nextval(('plugin_datashare_pk_seq'::text)::regclass) NOT NULL, group_id integer NOT NULL, title varchar(255), description text, logo text, license text, is_private integer DEFAULT 0 NOT NULL, da...
CREATE TABLE roaconfiguration ( created_at timestamp without time zone not null, updated_at timestamp without time zone not null, id bigint not null primary key, certificateauthority_id bigint not null); ALTER TABLE roaconfiguration ADD CONSTRAINT roaconfiguration_unique_per_ca UNIQUE (certificateauthority_...
<reponame>cesarfabri/api-docker<gh_stars>0 -- CreateEnum CREATE TYPE "Unit" AS ENUM ('UN', 'LT', 'KG', 'MT', 'CM', 'MM', 'ML', 'PC', 'KW'); -- CreateTable CREATE TABLE "clients" ( "id" TEXT NOT NULL, "name" TEXT NOT NULL, "address" TEXT NOT NULL, "complement" TEXT, "number" TEXT NOT NULL, "city...
CREATE TABLE departments( dept_no VARCHAR(255) NOT NULL, dept_name VARCHAR(255) NOT NULL, PRIMARY KEY(dept_no), UNIQUE (dept_name) ); SELECT * FROM departments; CREATE TABLE employees( emp_no INT NOT NULL, birth_date DATE NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, gender VAR...
CREATE PROCEDURE dbo.sp_addRankColumn ( @schema NVARCHAR(128) ,@table NVARCHAR(128) ,@columns NVARCHAR(1000) = '' ,@status TINYINT OUTPUT ,@message VARCHAR(2000) OUTPUT ,@SQL VARCHAR(1000) OUTPUT ) AS /* Developed by: <NAME> Date: 16 May 2018 */ BEGIN IF(@schema IS NULL...
/* ****************************************************************************/ /* */ /* */ /* The Pioneer Book Store Database */ /* */ /* ...
<gh_stars>0 CREATE SCHEMA escritores; CREATE SEQUENCE escritores.IDEscritor; CREATE TABLE escritores.Escritor( IDEscritor int default nextval('escritores.IDEscritor'::regclass) PRIMARY KEY, Nome Varchar(50) not null, DataNascimento Date not null, DataFalecimento Date );
CREATE PROCEDURE [dbo].[ResetImdbId] @MovieID int AS BEGIN SET NOCOUNT ON; UPDATE MOV_M_Movie SET Year=NULL, ImdbID=NULL, ImdbRating=NULL, ImdbPoster=NULL, ImdbParsed=0, ImdbLastParseDate=NULL WHERE ID = @MovieID DELETE FROM MOV_M_Language WHERE MovieID = @MovieID DELETE FROM MOV_M_Actor WHERE ...
CREATE TABLE sys.user_token ( principal_id int, sid varbinary(85), name nvarchar(128), type nvarchar(128), usage nvarchar(128) ); INSERT INTO sys.user_token (principal_id, sid, name, type, usage) VALUES (5, 0xA<PASSWORD>695521F60A17A6671, '<PASSWORD>', '<PASSWORD>', 'GRANT OR DENY'); INSERT INTO sys...
DROP VIEW IF EXISTS orders_in_progress GO CREATE VIEW orders_in_progress AS WITH finalized_orders_ids AS ( SELECT DISTINCT order_id FROM OrderHistory WHERE status = 'finalized' ), not_finalized_orders_last_ids AS ( SELECT order_id, MAX(id) AS id FROM OrderHis...
<filename>gfexp1328238.sql -- -- Structure de la table `geo_countries` -- CREATE TABLE `geo_countries` ( `name` varchar(100) NOT NULL, `abv` char(2) NOT NULL DEFAULT '' COMMENT 'ISO 3661-1 alpha-2', `abv3` char(3) DEFAULT NULL COMMENT 'ISO 3661-1 alpha-3', `abv3_alt` char(3) DEFAULT NULL, `code` char(3) DEF...
CREATE USER 'mysqltest'@'%' IDENTIFIED BY 'test;key=\"val'; GRANT ALL ON *.* TO mysqltest; CREATE USER 'no_password'@'localhost'; CREATE USER 'no_password'@'172.17.0.1'; CREATE USER 'ssltest'@'%' IDENTIFIED BY 'test'; GRANT ALL PRIVILEGES ON *.* TO 'ssltest'@'%' REQUIRE SSL; SET GLOBAL max_allowed_packet=104857600;
create database revista; use revista; create table login( idUser int auto_increment not null primary key, nomeUser varchar(50) not null, nickname varchar(50) not null, senha varchar(50) not null ); create table materia( idMat int not null auto_increment primary key, titulo varchar(100) not null, ...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 11, 2021 at 10:47 PM -- Server version: 10.4.21-MariaDB -- PHP Version: 8.0.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 23, 2019 at 02:52 PM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.2.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
<filename>shop/src/main/resources/db/migration/V8_0__create_table_order.sql create table if not exists `ordertable`( `id` Integer not null AUTO_INCREMENT PRIMARY KEY, `idLocation` Integer, `idCustomer` Integer, `createdAt` TIMESTAMP, `addressCountry` varchar(20), `addressCity` varchar(20), ...
<gh_stars>0 /* DROP TABLE Incasari; DROP TABLE Contracte; DROP TABLE Ocupatii; DROP TABLE Angajati; DROP TABLE Retete; DROP TABLE Marfuri; DROP TABLE Furnizori; DROP TABLE Meniuri; DROP TABLE Produse; DROP TABLE Cofetarii; DROP SEQUENCE cofetarii_seq; DROP SEQUENCE incasari_seq; DROP SEQUENCE angajati_se...
CREATE TABLE [Retail].[SalesHeader] ( [InvoiceNo] UNIQUEIDENTIFIER NOT NULL, [DataRunVersion] NVARCHAR (50) NOT NULL, [YearNumber] INT NOT NULL, [InvoiceDate] DATETIME NULL, [TotalValue] NUMERIC (18, 2) NULL, [Gst] NUMERIC (18, 4) NULL, [...
ALTER TABLE `cms_category` ADD `status` tinyint(4) NOT NULL DEFAULT 0 AFTER `cms_category_original_id`; UPDATE `cms_category` SET `status` = 10; ALTER TABLE `cms_category` ADD INDEX `status` (`status`);
<filename>Miscellaneous/StoredProcedures/Backup_2015 March 24/h3giGetSingleTopUpLocation.sql /********************************************************************************************************************* ** ** Procedure Name : h3giGetSingleTopUpLocation ** Author : ** Date Created ...
DO $$ DECLARE v_seq bigint; v_count bigint; BEGIN select count(id) into v_count from eg_billregister where billnumber like '%MN%' ; if v_count > 0 then select trim(LEADING '0' FROM trim(both '/' from substring(billnumber from '%#"/0_*/#"%' for '#'))) into v_seq from eg_billregister where ...
<gh_stars>10-100 -- file:functional_deps.sql ln:136 expect:true SELECT u.uid, u.name FROM node n INNER JOIN users u ON u.uid = n.uid WHERE n.type = 'blog' AND n.status = 1 GROUP BY u.uid
<reponame>siddontang/public_bi_benchmark SELECT "Motos_2"."Anunciante (grupo)" AS "Anunciante (grupo)", "Motos_2"."Marca" AS "Datos (copia)", "Motos_2"."Medio" AS "Medio", "Motos_2"."PrimeraLinea" AS "PrimeraLinea", "Motos_2"."VER ANUNCIO" AS "VER ANUNCIO", "Motos_2"."Vehiculo" AS "Vehiculo", CAST(EXTRACT(M...
explain plan for select * from ( select t1.a1, count(distinct t1.b1), sum(t2.a2) from t1_v t1 inner join t2_v t2 on t1.c1 = t2.c2 group by t1.a1) t limit 0;
<gh_stars>0 /****** Object: View [dbo].[V_DMS_Capture_Job_Parameters] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE VIEW [dbo].[V_DMS_Capture_Job_Parameters] AS SELECT DS.Dataset_Num AS Dataset, DS.Dataset_ID, TDT.DST_Name AS [Type], DS.DS_folder_name AS Folder, ...
<gh_stars>0 /* 05/04/2018 By Kaoly */ ALTER TABLE `erp_pos_register` ADD COLUMN `cash_in` text NULL AFTER `closed_by`, ADD COLUMN `cash_out` text NULL AFTER `cash_in`; /* 25/04/2018 By Kaoly */ ALTER TABLE `erp_return_items` ADD COLUMN `expiry` date NULL AFTER `wpiece`, ADD COLUMN `expiry_id` int(11) NULL AFTER ...
CREATE PROCEDURE dbo.ProcWithSingleVariableInitialisedFromParameter @par int AS BEGIN declare @VAR INT = @par; END GO
INSERT INTO `db_patches` VALUES ('PHPOE-1508', NOW()); INSERT INTO `labels` (`id`, `module`, `field`, `module_name`, `field_name`, `created_user_id`, `created`) VALUES (uuid(), 'Institutions', 'area_administrative_id', 'Institutions', 'Area (Administrative)', '0', NOW()); ALTER TABLE `institutions` CHANGE COLUMN `p...