sql
stringlengths
6
1.05M
use "Northwind" select * from Suppliers as sup where sup.SupplierID in (select SupplierID from Products where UnitsInStock = 0)
<gh_stars>0 CREATE TABLE departments ( dept_id INT NOT NULL PRIMARY KEY, dept_name VARCHAR(55) NOT NULL ); INSERT INTO departments (dept_id, dept_name) VALUES (1, 'Administration'); INSERT INTO departments (dept_id,dept_name) VALUES (2,'Customer Service'); INSERT INTO departments (dept_id,dept_name) VALUES (3,'Finance...
<filename>target/classes/META-INF/insert.sql INSERT INTO usuario(usuario_id, nombre, ap_paterno, ap_materno, fecha_nac, email, telefono) VALUES(1, 'Roberto', 'Vidal', 'González', '1985-09-28', '<EMAIL>', '925781509'); INSERT INTO usuario(usuario_id, nombre, ap_paterno, ap_materno, fecha_nac, email, telefono) VALUES(2, ...
CREATE PROCEDURE [dbo].[UpdateProtectedBranch] @RepositoryId BIGINT, @Name NVARCHAR(255), @Protection NVARCHAR(MAX), @MetadataJson NVARCHAR(MAX) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON DECLARE @Changes TABLE ( [Id] BI...
CREATE TABLE IF NOT EXISTS customer (id INT,name VARCHAR(25),referee_id INT);; Truncate table customer; insert into customer (id, name, referee_id) values ('1', 'Will', 'None'); insert into customer (id, name, referee_id) values ('2', 'Jane', 'None'); insert into customer (id, name, referee_id) values ('3', 'Alex', '2'...
<filename>database/query-lib/requetes_sondage_fevrier2021.sql select count(distinct(fk_producteur_sondage)), reponse, clef_question from cetcal_sondage where clef_question='s001' group by reponse order by clef_question; select count(distinct(a.fk_producteur_sondage)) as 'nombre de r...
UPDATE `registrars` SET `class` = 'Shineisp_Plugins_Registrars_Ovh_Main' WHERE `registrars`.`registrars_id` =2;
<gh_stars>0 /* Navicat MySQL Data Transfer Source Server : mysql Source Server Version : 100116 Source Host : localhost:3306 Source Database : peta Target Server Type : MYSQL Target Server Version : 100116 File Encoding : 65001 Date: 2017-06-10 07:10:46 */ SET FOREIGN_KEY_CHECKS=0...
<reponame>douggal/advent-of-code-2020<filename>Day07_HandyHaversacks/PuzzleInputSQLs.sql --run python script to regenerate the SQL insert stmts --all these insert stmts throws off GitHub languages stats
<reponame>spro80/apiRestLumen<gh_stars>0 use carritoresponsive; /*==============================================================*/ /* DBMS name: MySQL 5.0 */ /* Created on: 02/09/2016 0:34:09 */ /*===============================================...
/* Navicat MySQL Data Transfer Source Server : localhost_mysql Source Server Version : 50720 Source Host : localhost:3306 Source Database : asset Target Server Type : MYSQL Target Server Version : 50720 File Encoding : 65001 Date: 2018-10-10 17:04:50 */ SET FOREIGN_KEY_CHECKS=0; ...
<filename>desain/DB/crebas.sql /*==============================================================*/ /* DBMS name: MySQL 5.0 */ /* Created on: 10/25/2019 8:33:24 AM */ /*==============================================================*/ alter table BATASKA...
<reponame>cliffordcarnmo/generic-db-template CREATE UNIQUE INDEX id_UNIQUE ON logs(id ASC);
<reponame>jariolaine/APEX-Blog<gh_stars>0 -------------------------------------------------------- -- DDL for Table BLOG_LINK_ROUPS -------------------------------------------------------- create table blog_link_groups( id number( 38, 0 ) not null, row_version number( 38, 0 ) not null, created_on timestamp( 6 ) ...
CREATE TABLE Users( Id int PRIMARY KEY IDENTITY(1,1), UserId int, FirstName nvarchar(25), LastName nvarchar(25), Email nvarchar(25), Password nvarchar(25), FOREIGN KEY (UserId) REFERENCES Customers(UserId) ) CREATE TABLE Customers( UserId int PRIMARY KEY IDENTITY(1,1), CompanyName nvarchar(25), ) CREATE ...
<reponame>syilviawkp/projectmagang<filename>absenlaporan (2).sql -- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 24, 2019 at 03:28 AM -- Server version: 10.1.25-MariaDB -- PHP Version: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0...
insert into department (id, name) values (1, "Human Resources"); insert into department (id, name) values (2, "Customer Service"); insert into department (id, name) values (3, "Sales"); insert into department (id, name) values (4, "IT"); insert into department (id, name) values (5, "Marketing"); insert into empl...
CREATE PROCEDURE [dbo].[InsertSubmarketHelper](@Id INT, @MarketId INT, @Name NVARCHAR(50), @Timestamp DATETIME) WITH NATIVE_COMPILATION, SCHEMABINDING, EXECUTE AS OWNER AS BEGIN ATOMIC WITH (TRANSACTION ISOLATION LEVEL = SNAPSHOT,LANGUAGE = N'English') INSERT INTO dbo.Submarket(Id, MarketId, Name, Timestamp) VALUES ...
begin; grant insert on segmentacion.conteos to segmentador; grant delete on segmentacion.conteos to segmentador; grant usage on schema listados to segmentador; grant select on listados.listado_humauaca_chiquitas to segmentador; commit; -- hardcode ------------------------ alter table add column segi integer; alter tab...
-- RESCHEDULE AN ACTIVE DOCUMENT -- returns: -- { affected_rows: 1 } DROP FUNCTION IF EXISTS fetchq_doc_reschedule(CHARACTER VARYING, CHARACTER VARYING, TIMESTAMP WITH TIME ZONE); CREATE OR REPLACE FUNCTION fetchq_doc_reschedule ( PAR_queue VARCHAR, PAR_subject VARCHAR, PAR_nextIteration TIMESTAMP WITH TIME ZONE, ...
CREATE PROCEDURE [dbo].[sproc_CheckGenre] ( @GenreId int ) AS SELECT CASE WHEN EXISTS ( SELECT * FROM [Genre] WHERE GenreId = @GenreId ) THEN CAST(1 AS BIT) ELSE CAST(0 AS BIT) END
-- tkt2450.test -- -- execsql { -- SELECT "t a".* FROM "t a"; -- } SELECT "t a".* FROM "t a";
-- MS SQL: Boosting effiency with pre-filtering WITH department_ranking AS ( SELECT e.Name AS Employee ,e.Salary ,e.DepartmentId ,DENSE_RANK() OVER (PARTITION BY e.DepartmentId ORDER BY e.Salary DESC) AS rnk FROM Employee AS e ) -- pre-filter table to reduce join size ,top_three AS ( SELECT Employee ,Salary...
#方法一 SELECT d.name AS Department, e.name AS Employee, e.Salary AS Salary FROM Employee e INNER JOIN department d ON e.DepartmentId = d.Id WHERE e.salary = ( SELECT MAX(salary) FROM Employee WHERE departmentId = d.id) 方法二 SELECT D.Name AS Department ,E.Name AS Employee ,E.Salary FROM Employee E, (SELECT Department...
-- 2020-12-15T13:45:07.401Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnSQL='CASE WHEN md_candidate_type IN (''DEMAND'', ''UNEXPECTED_DECREASE'', ''INVENTORY_DOWN'', ''STOCK_UP'', ''ATTRIBUTES_CHANGED_FROM'') THEN -qtyFulfilled WHEN md_candidate_type IN (''SUPPLY...
/* Replace with your SQL commands */ CREATE TABLE "water"."gauging_stations" ( "id" VARCHAR NOT NULL, "label" VARCHAR NOT NULL, "lat" DECIMAL, "long" DECIMAL, "easting" BIGINT, "northing" BIGINT, "grid_reference" VARCHAR, "catchment_name" VARCHAR, "river_name" VARCHAR, "wiski_id" VARCHAR, "statio...
<reponame>UQ-RCC/nimrodg -- -- Nimrod/G -- https://github.com/UQ-RCC/nimrodg -- -- SPDX-License-Identifier: Apache-2.0 -- Copyright (c) 2021 The University of Queensland -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may o...
library ReferencingLibraryWithNullTypeSpecifierJsonElm include SupplementalDataElements_FHIR4_Null_TypeSpecifier version '2.0.0' called SDE valueset "Race": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.836' define "SDE Ethnicity": SDE."SDE Ethnicity"
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.0.27-standard /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNEC...
insert into Products(CategoryId, Name) select Id, N'Galaxy Tab S6 Lite' from Categories with(nolock) where name = N'Tablets' GO insert into Products(CategoryId, Name) select Id, N'Tab S6' from Categories with(nolock) where name = N'Tablets' GO insert into Products(CategoryId, Name) select Id, N'Tab S5e' from Categories...
<filename>tests/T009.ddl def P = { x = UInt8; y = UInt8 } def Q = { @s = P; $$ = ^s.x } def R = Choose { a = UInt8; b = {} } def S = { @u = R; $$ = u is a }
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost -- Tiempo de generación: 07-02-2019 a las 11:37:29 -- Versión del servidor: 10.1.36-MariaDB -- Versión de PHP: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00";...
<filename>fdb-sql-layer-core/src/test/resources/com/foundationdb/sql/optimizer/rule/prepone-selects/in.sql SELECT customers.cid FROM customers INNER JOIN orders ON customers.cid = orders.cid INNER JOIN items ON orders.oid = items.oid WHERE sku = '1234' AND quan > 100 AND name IN (SELECT name FROM child WHERE p...
<filename>sql/0013_weather_observation_station_8.sql /* Query the list of CITY names from STATION which have vowels (i.e., a, e, i, o, and u) as both their first and last characters. Your result cannot contain duplicates. */ SELECT DISTINCT CITY FROM STATION WHERE LOWER(LEFT(CITY, 1)) IN ('a', 'e', 'i', 'o', 'u') A...
-- CreateTable CREATE TABLE "Message" ( "id" TEXT NOT NULL, "userId" TEXT NOT NULL, "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "text" TEXT NOT NULL, CONSTRAINT "Message_pkey" PRIMARY KEY ("id") ); -- AddForeignKey ALTER TABLE "Message" ADD CONSTRAINT "Message_userId_fkey" FOREIG...
-- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64) -- -- Host: localhost Database: e-commerce -- ------------------------------------------------------ -- Server version 5.7.9-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *...
UPDATE music_provider_settings SET [value]=null WHERE [provider]=?1 AND [id]=?2
-- +goose Up -- SQL in section 'Up' is executed when this migration is applied CREATE TYPE archived_job_status AS enum('succeeded', 'failed', 'expired'); CREATE TABLE archived_jobs ( id UUID PRIMARY KEY, name TEXT NOT NULL REFERENCES jobs(name), attempts SMALLINT NOT NULL CHECK (attempts >= 0), status archived_job_...
<gh_stars>1-10 -- Example query for testing query_loader select * from users;
DROP TABLE IF EXISTS variant; CREATE TABLE variant ( pk SERIAL PRIMARY KEY, name VARCHAR UNIQUE, reference_allele VARCHAR NOT NULL, alternate_allele VARCHAR NOT NULL ); ALTER TABLE variant DROP CONSTRAINT variant_name_key; ALTER TABLE variant DROP CONSTRAINT variant_pkey; \! rm -rf /tmp/psql_pipe &...
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100 -- file:window.sql ln:423 expect:true SELECT i::text || ':' || COALESCE(v::text, 'NULL') as row, logging_agg_strict(v::text) over wnd as inverse, logging_agg_strict(v::text || CASE WHEN random() < 0 then '?' ELSE '' END) over wnd as noinverse FROM (VALUES (1, 'a'...
<reponame>Boronururu/SymfonyGuestbook -- phpMyAdmin SQL Dump -- version 4.4.15.5 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1:3306 -- Время создания: Авг 21 2016 г., 12:26 -- Версия сервера: 5.6.29 -- Версия PHP: 5.6.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
/* 签到, 只能在实验室环境执行 */ UPDATE dbsign SET sign=1; /* 查询签到 */ SELECT * FROM dbsign; /* 验证当前 sql 语句, 再点击 commit 提交 */ UPDATE dbtest SET test=1; /* 查成绩 */ SELECT * FROM dbscore; /* 查班级排行榜 */ SELECT * FROM dbrank; /* 删除某张错误的表 */ DROP TABLE wrong_table;
-- SQL-Unit wrapper for executing SQL string within a T-SQL transaction -- USE [BARRETT_TEST]; GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO BEGIN TRY DECLARE @TMP_DB AS VARCHAR(50) = 'BARRETT_TEST'; DECLARE @TMP_SCHEMA AS VARCHAR(50) = 'dbo'; DECLARE @TMP_LOC AS VARCHAR(160) = '[' + @TMP_DB + '].[' ...
CREATE TABLE IF NOT EXISTS news( id bigint not null auto_increment, clean_title varchar(255), menu_title varchar(255) default '', title varchar(255), short_content text, content text, html_title varchar(255) default '', html_keywords varchar(255) default '', html_description varchar(255) default '', ...
<filename>postgres/init/tables/question.table.sql CREATE TABLE IF NOT EXISTS "Question" ( "id" serial, "category_id" integer, "text" text, "audio" text, "color" text, "image" text, PRIMARY KEY( id ) );
-- testcontainers creates db named test -- create schema _reports; SET secret.key = 'new value 8'; -- sets for current session ALTER DATABASE test SET secret.key = 'new value 8'; -- sets for subsequent sessions -- ALTER SYSTEM does not allow for setting of custom keys -- ALTER SYSTEM SET secret.key = 'new va...
INSERT INTO public.cluster (id, name, filter_id, definition, description) VALUES (6, 'user SSH files', 1, '\/(home|root).*\.ssh\/(id_rsa|authorized_keys).*', 'files according to regex .*.ssh\/(id_rsa|authorized_keys*).'); INSERT INTO public.cluster (id, name, filter_id, definition, description) VALUES (7, 'standard exe...
CREATE PROCEDURE [dbo].[GetOrAddSymbol] @Name NVARCHAR(100), @Id INT OUTPUT AS /* clear the input just in case anything was passed in */ SET @Id = NULL; /* quick path for existing symbol */ SELECT @Id = [Id] FROM [dbo].[Symbol] WHERE [Name] = @Name; IF @Id IS NOT NULL RETURN; /* slow path for adding a new symbol ...
<filename>spec/fixtures/copy.sql<gh_stars>100-1000 INSERT INTO %{shadow_table} ("username", "seller_id", "password", "email", "createdOn", "last_login", "user_id") SELECT "username", "seller_id", "password", "email", "createdOn", "last_login", "user_id" FROM ONLY books
<reponame>Oldarorn/linden_inventory -- Update for 1.5.3 ALTER TABLE `linden_inventory` CHANGE COLUMN `owner` `owner` VARCHAR(60) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci' FIRST, CHANGE COLUMN `name` `name` VARCHAR(100) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci' AFTER `owner`; -- Update for 1.5.2 ALTER ...
DROP TYPE IF EXISTS landlord.cbi_action_type CASCADE; CREATE TYPE landlord.cbi_action_type AS ENUM ('SCHUFA2_ANFRAGE_IDENTITAETS_CHECK', 'SCHUFA2_ANFRAGE_BONITAETSAUSKUNFT', 'SCHUFA2_AUSKUNFT_BONITAETSAUSKUNFT', 'SCHUFA2_ANFRAGE_KONTONUMMERN_CHECK'); DROP TYPE IF EXISTS landlord.job_state CASCADE; CREATE TYPE...
<reponame>jerroldlaw/apac-workshops<gh_stars>0 drop table custaccount; drop table custtransactions; create table custaccount ( customer_id varchar(10) not null, account_id varchar(10) not null, account_type varchar(10) not null, account_opening_date date default sysdate ); insert into custaccount (customer_id, acc...
<gh_stars>0 CREATE INDEX index_servers_machine_id ON servers (server_machine_id); CREATE INDEX index_clients_server_id_lastconnected_unique_id ON clients (server_id, client_lastconnected, client_unique_id); CREATE INDEX index_group_server_to_client_serverid_id1 ON group_server_to_client (server_id, id1);
<filename>kubernetes/scripts/database/survey.sql -- Table: public.survey -- DROP TABLE public.survey; CREATE TABLE IF NOT EXISTS public.survey ( id uuid, created timestamp with time zone, updated timestamp with time zone, data json, schema json ) WITH ( OIDS = FALSE ) TABLESPACE pg_default; A...
<filename>src/main/resources/db/migration/V4__1.1.4_add_three_ds_method_url_field.sql alter table three_ds_server_storage.card_range add column three_ds_method_url character varying;
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1141912281207017473', 'station', '123', '[0],[123],', '岗位管理', '', '/station', '99', '2', '1', NULL, '1', '0'); INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pco...
DO $$ DECLARE arow RECORD; BEGIN FOR arow IN (SELECT * FROM accessibility_requests WHERE deleted_at IS NOT NULL) LOOP INSERT INTO accessibility_request_status_records VALUES(uuid_generate_v4(), arow.ID, 'DELETED', arow.deleted_at, arow.eua_user_id); END LOOP; END $$
CREATE INDEX DATICAL_ADMIN.idx_first_name ON DATICAL_ADMIN.authors(first_name) CREATE INDEX DATICAL_ADMIN.idx_last_name ON DATICAL_ADMIN.authors(last_name)
<filename>htdocs/installer/schema.sql<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.2.12deb2+deb8u2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Erstellungszeit: 01. Apr 2018 um 11:46 -- Server Version: 5.5.58-0+deb8u1 -- PHP-Version: 5.6.30-0+deb8u1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone =...
<filename>db/verify/poi-extras.sql -- Verify phoebot:poi-extras on pg BEGIN; SELECT dimension FROM poi LIMIT 1; ROLLBACK;
<gh_stars>0 -- @testpoint: 创建存储过程并测试execute immediate drop table if exists user_tables; create table user_tables( table_id int, table_name varchar2(10)); insert into user_tables values(1,'t_cust'); insert into user_tables values(1,'t_user'); drop procedure if exists pro001; create or replace procedure pro001(v_mont...
<reponame>locker/leetcode select t1.score, count(*) as 'rank' from Scores as t1 left join (select distinct score from Scores) as t2 on t2.score >= t1.score group by t1.score, t1.id order by t1.score desc
SOURCE 00 DDL.sql SOURCE 01 SPF.sql SOURCE 02 Triggers.sql SOURCE 03 Users Grants.sql SOURCE 04 Inserts.sql
DROP TABLE Animales; DROP TABLE Usuarios; DROP TABLE Users; DROP TABLE Roles; CREATE TABLE Usuarios ( dni INTEGER NOT NULL PRIMARY KEY, nombre VARCHAR(25) NOT NULL, apellidos VARCHAR(100), email VARCHAR(50), direccion VARCHAR(50), usuario VARCHAR(25), pass ...
<reponame>zettasolutions/zsi-fmis CREATE TABLE gas_stations( gas_station_id INT IDENTITY(1,1) NOT NULL ,gas_station_code NVARCHAR(100) NULL ,gas_station_name NVARCHAR(100) NULL ,gas_station_addr NVARCHAR(100) NULL ,is_active CHAR(1) NULL ,created_by INT NULL ,created_date DATETIME NULL ,updated_by INT NULL ,updated_dat...
<reponame>ICE-SIB/sib ALTER TABLE machine_deployments DROP COLUMN rate_type; ALTER TABLE machine_deployments DROP CONSTRAINT location; ALTER TABLE machines RENAME COLUMN code TO asset_number; ALTER TABLE machines ADD COLUMN rate_type char(1) NOT NULL; ALTER TABLE machines ADD CONSTRAINT valid_rate_type CHECK (rate_typ...
<gh_stars>0 CREATE PROCEDURE [dbo].[spOrders_UpdateName] @Id int, @OrderName nvarchar(50) AS begin set nocount on; update dbo.[Order] set OrderName = @OrderName where Id = @Id; end
<filename>internship_project.sql CREATE TABLE `labs` ( `sr_no` int AUTO_INCREMENT, `lab_id` varchar(255) PRIMARY KEY, `lab_name` varchar(255), `description` text, `date` date, `quantity` int, `unit_cost` decimal, `ammount` decimal ); CREATE TABLE `master_table` ( `sr_no` int AUTO_INCREMENT, `comput...
<reponame>SamRibes/2019-09-c-sharp-labs --create table Categories( --CategoryID int not null Identity Primary Key, --CategoryName nvarchar(50) null --) --go --create table Oranges( --OrangeID int not null Identity Primary Key, --OrangeName nvarchar(50) null, --DateHarvested Date null, --IsLuxuryGrade Bit null, --Cat...
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Oct 22, 2019 at 05:04 AM -- Server version: 8.0.17 -- PHP Version: 7.3.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
DELETE FROM USER; INSERT INTO USER(name,age) values('hello',18);
CREATE USER pt_user@localhost IDENTIFIED BY 'passwd'; GRANT ALL ON pivot_table.* TO pt_user@localhost; CREATE SCHEMA IF NOT EXISTS pivot_table;
-------------------------------------------------------- -- DDL for Table AT_CLIENT -------------------------------------------------------- CREATE TABLE "AT_CLIENT" ( "UUID" VARCHAR2(40 CHAR), "CREATED" TIMESTAMP (6), "CREATED_BY" VARCHAR2(255 CHAR), "MODIFIED" TIMESTAMP (6), "MODIFIED_BY" ...
<filename>src/Infrastructure.DAL/DatabaseScript/Procedures/Attachment/spGetAttachment.sql USE [Kama.Mefa.Azmoon] GO IF EXISTS(SELECT 1 FROM sys.procedures WHERE [object_id] = OBJECT_ID('pbl.spGetAttachment')) DROP PROCEDURE pbl.spGetAttachment GO CREATE PROCEDURE pbl.spGetAttachment @AID UNIQUEIDENTIFIER WITH ENCR...
drop schema if exists proj001_lfb_1_0_0 cascade; create schema proj001_lfb_1_0_0;
-- file:date.sql ln:14 expect:true INSERT INTO DATE_TBL VALUES ('1997-02-29')
# knownMore.sql was originally generated by the autoSql program, which also # generated knownMore.c and knownMore.h. This creates the database representation of # an object which can be loaded and saved from RAM in a fairly # automatic way. #Lots of auxiliary info about a known gene CREATE TABLE knownMore ( nam...
<filename>gdp-liquibase-changelogs/src/main/resources/queueThrottleTables/createTableThrottleQueueToggle.sql --liquibase formatted sql --changeset slarson:8createThrottleQueueToggle CREATE TABLE throttle_queue_toggle ( ID serial NOT NULL PRIMARY KEY, ENABLED BOOLEAN, TOGGLE_TYPE VARCHAR(50)) ...
<reponame>loveniit01/ipr<gh_stars>0 -- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 8.0.12 - MySQL Community Server - GPL -- Server OS: Win64 -- HeidiSQL Version: 9.5.0.5196 -- -------------------...
<filename>Scripts/SXP_exm_master_save_supression.sql<gh_stars>0 /* Upgrade script for EXM.Master from 9.0.1, 9.0.2 or 9.1.0 to 9.1.1 */ GO PRINT N'Altering [dbo].[SaveSuppression] stored procedure...'; GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[SaveSuppression] @Email...
SELECT hll_set_output_version(1); DROP TABLE IF EXISTS test_binary; CREATE TABLE test_binary (id SERIAL, v1 hll); INSERT INTO test_binary(id,v1) VALUES (1, hll_empty() || hll_hash_text('A')); SELECT hll_cardinality(v1) FROM test_binary; \COPY test_binary TO 'binary.dat' WITH (FORMAT "binary") DELETE FROM test_bin...
/* SQLyog Ultimate v11.11 (64 bit) MySQL - 5.5.37 : Database - newc0 ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE,...
<filename>skripte/db_schema_definition_pub/migriert/awa_netzbetreiber_strom_pub-abgeloest_durch_awa_stromversorgungssicherheit/v1/postscript.sql COMMENT ON SCHEMA awa_netzbetreiber_strom_pub IS 'Netzbetreiber Strom. Fragen: Amt für Wirtschaft und Arbeit (AWA)' ; GRANT USAGE ON SCHEMA awa_netzbetreiber_strom_p...
CREATE TABLE bitcoin ( id SERIAL PRIMARY KEY, tweet_id BIGINT NOT NULL, text VARCHAR NOT NULL, screen_name VARCHAR NOT NULL, author_id BIGINT, created_at VARCHAR NOT NULL, inserted_at TIMESTAMP NOT NULL, followers_count INT NULL, tweet_place_type VARCHAR NULL, tweet_place_name VARCHAR NULL, tweet_country VARCHA...
<filename>database/song_1200.sql -- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 25, 2021 at 07:15 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 8.0.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!4...
USE db; CREATE TABLE IF NOT EXISTS accounts( id BIGINT AUTO_INCREMENT, login VARCHAR(64) NOT NULL, password VARCHAR(64) NOT NULL, card_code VARCHAR(16) NOT NULL, is_admin TINYINT(1) NOT NULL DEFAULT 0, PRIMARY KEY (id) ); CREATE TABLE IF NOT EXISTS subjects( id BIGINT AUTO_INCREMENT, name VARCHAR(256) NOT NUL...
-- # Problem: https://www.hackerrank.com/challenges/the-report/problem -- # Score: 20 SELECT IIF(g.Grade < 8, NULL, s.Name), g.grade, s.Marks FROM STUDENTS s JOIN GRADES g ON s.Marks BETWEEN g.Min_Mark AND g.Max_Mark ORDER BY g.Grade DESC, s.Name, s.Marks;
<gh_stars>1-10 create or replace package body imp_2_file_adapter_data as -------------------------------------------------------------------------------- -- AS_ZIP subprograms ---------------------------------------------------------- -------------------------------------------------------------------------------- c_...
-- auth.test -- -- db eval { -- DETACH DATABASE test1; -- } DETACH DATABASE test1;
<filename>.sh/db/postgresql/sql/close_connections.sql SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'p_dbname';
<reponame>bcgov/cas-ggircs -- Revert ggircs-app:utils/grant_permissions from pg begin; drop function ggircs_app_private.grant_permissions(text, text, text); drop function ggircs_app_private.grant_permissions(text, text, text, text[]); commit;
<filename>x-postgres-features/src/test/resources/createStoredProcedure.sql<gh_stars>1-10 create or replace function sp_insert (p_name VARCHAR, OUT p_id INTEGER) as $$ DECLARE BEGIN insert into p_customer (name, inactive, version, when_created, when_updated) values (p_name, true, 1, current_timestamp, current_timest...
CREATE FUNCTION func576() RETURNS integer LANGUAGE plpgsql AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE435);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE27);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE97);val:=(SELECT COUNT(*)INTO MYCOUNT...
<filename>Benchmarks/synthetic_benchmark/queries/NonGroupedAgg/NGA04.sql<gh_stars>100-1000 select MIN(x10), MIN(y10), MIN(z10), MIN(x100), MIN(y100), MIN(z100) from ##TAB##
-- @testpoint: 创建表,将“char”数据类型转换至VARCHAR2,char -- @modified at: 2020-11-16 drop table if exists special_char_03; CREATE TABLE special_char_03 (id "char"); insert into special_char_03 values ('t'); alter table special_char_03 alter column id TYPE VARCHAR2(200); --查询字段信息是否修改成功 SELECT format_type(a.atttypid,a.atttypmod...
CREATE FUNCTION get_dispatched_products(@distributor_id INT, @dispatch_id INT) RETURNS TABLE AS RETURN SELECT products.name , dispatched_products.amount, dispatched_products.price FROM dispatched_products INNER JOIN dispatches ON dispatches.dispatch_id = dispatched_products.dispatch_id AND dispatches.d...
<reponame>gc-convex-test/gc-tech-test /* Grant the required privileges on the database objects. */ USE ROLE dba; -- Grant the loader role the relevant privileges GRANT usage ON warehouse loading_wh TO ROLE loader; GRANT usage ON database raw_db TO ROLE loader; GRANT usage ON schema raw_db.snowpipe TO ROLE loader;...
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50505 Source Host : localhost:3306 Source Database : printtasks Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2020-05-05 01:48:20 */ SET FOREIGN_KEY_CHECKS=0; -...
<filename>schema.sql DROP DATABASE IF EXISTS company_db; CREATE DATABASE company_db; USE company_db; CREATE TABLE departments ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, department_name VARCHAR(30) NOT NULL ); CREATE TABLE roles ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, title VARCHAR(30) NOT NULL, ...