sql
stringlengths
6
1.05M
<reponame>pirocorp/Databases-Basics-MS-SQL-Server<filename>07. Database Programmability and Transactions/Exercises/18. Money Transfer/Money Transfer.sql CREATE OR ALTER PROC usp_TransferMoney(@SenderId INT, @ReceiverId INT, @Amount DECIMAL(15, 4)) AS BEGIN TRANSACTION EXEC usp...
--CLEAR DOWN TRUNCATE TABLE ontology.location_datasets; TRUNCATE TABLE ontology.topographic_object_function_manifestations,ontology.topographic_object_location_manifestations,ontology.topographic_object_mereological_link_manifestations,ontology.topographic_object_name_manifestations,ontology.topographic_object_provenan...
# This file contains configuration defaults for both Panda3d # and the game itself. Users will be able to modify some of these in-game and # have them persist to the next play-session. # --- [Display Config] --- window-title Teapot Wars 2 #fullscreen #t win-size 1080 720 #win-size 1920 1080 show-frame-rate-meter tru...
<reponame>tushartushar/dbSmellsData<gh_stars>1-10 SELECT shop FROM slumber_examples_order WHERE id=%s
CREATE DATABASE TableRelations USE TableRelations CREATE TABLE Persons( [Id] INT PRIMARY KEY NOT NULL IDENTITY, [FirstName] NVARCHAR(30) NOT NULL, [Salary] DECIMAL(7,2) NOT NULL, [PassportID] INT NOT NULL ); CREATE TABLE Passports( [PassportID] INT NOT NULL, [PassportNumber] NVARCHAR(8) NOT NULL ); ALTER TABLE [Pa...
-- CreateTable CREATE TABLE "Article" ( "id" SERIAL NOT NULL, "identification" INTEGER NOT NULL, "name" TEXT NOT NULL, "availableStock" INTEGER NOT NULL DEFAULT 0, PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Product" ( "id" SERIAL NOT NULL, "name" TEXT NOT NULL, "price" DECIMAL(...
<gh_stars>1-10 -- Seata库中创建 branch_table, global_table, lock_table 表 -- 业务库中创建 undo_log 表 -- the table to store GlobalSession data drop table if exists `global_table`; create table `global_table` ( `xid` varchar(128) not null, `transaction_id` bigint, `status` tinyint not null, `application_id` varchar...
CREATE TABLE user_books ( user_id INT NOT NULL, book_id INT NOT NULL, creation_date DATETIME, update_date DATETIME, CONSTRAINT user_books_book_id_fkey FOREIGN KEY (book_id) REFERENCES books(id) ON DELETE NO ACTION ON UPDATE CASCADE, CONSTRAINT user_books_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(i...
-- file:alter_table.sql ln:271 expect:true INSERT INTO tmp3 values (1,10)
<gh_stars>1000+ create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_AB3" as ( -- SQL model to build a hash column based on the values of this record select md5(cast(coalesce(cast(ID as varchar ), '') || '-' || coalesce(cast(NAME as varchar ), '') || '-' || c...
<gh_stars>0 create database if not exists bd_pacman default character set utf8 default collate utf8_general_ci;
CREATE PROCEDURE [dbo].[usp_Plycur_App_Delete] ( @nvc_key [nvarchar](50) ) AS DELETE FROM [dbo].[tbl_Plycur_App] WHERE [nvc_key] = @nvc_key
<filename>src/resources/tpch/queries/sanity/query24_max.sql select max(C_NATIONKEY) from customer;
CREATE TABLE open_dataset ( id INTEGER PRIMARY KEY, dataset_id INTEGER REFERENCES dataset(id) ON DELETE CASCADE ON UPDATE CASCADE, created datetime DEFAULT CURRENT_TIMESTAMP );
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 13, 2013 at 02:02 PM -- Server version: 5.5.24-log -- PHP Version: 5.4.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
create table ristorante_position ( id varchar(36) not null, cos_latitude float8 not null, cos_longitude float8 not null, latitude float8, longitude float8 not null, sin_latitude float8 not null, sin_longitude float8 not null, ristorante varchar(3...
CREATE OR REPLACE TRIGGER "TRG_BEF_AGENT_RANK" before insert OR UPDATE ON agent_rank for each row begin if :NEW.agent_rank_id is null then select sq_agent_rank_id.nextval into :new.agent_rank_id from dual; end if; IF :new.agent_rank = 'unsatisfactory' AND length(:NEW.remark) < 20 THEN ...
<reponame>frantchico/igrp-catalogo update public.tbl_user set pass_<PASSWORD> = '<PASSWORD>' where user_name = '<EMAIL>';
-- @testpoint:opengauss关键字And(保留),作为角色名 --关键字不带引号-合理报错 drop role if exists And; create role And with password '<PASSWORD>' valid until '2020-12-31'; --关键字带双引号-成功 drop role if exists "And"; create role "And" with password '<PASSWORD>' valid until '2020-12-31'; --清理环境 drop role "And"; --关键字带单引号-合理报错 drop role if exi...
<gh_stars>0 DROP DATABASE IF EXISTS trackerDB; CREATE database trackerDB; USE trackerDB; CREATE TABLE department ( deptID INT AUTO_INCREMENT NOT NULL PRIMARY KEY, department VARCHAR(30) NULL, manager VARCHAR(30) NULL ); CREATE TABLE role ( roleID INT AUTO_INCREMENT NOT NULL PRIMARY KEY, title VAR...
----------------------------------- --- gym ----------------------------------- CREATE SEQUENCE gym_seq INCREMENT BY 1; CREATE TABLE gym ( id int8 NOT NULL, name varchar(255) NOT NULL, uuid varchar(36) NOT NULL, version timestamp NOT NULL, created_at timestamp NOT NULL, updated_at timestamp NOT...
/** Atividade 1 - Carrinho de Compras @author <NAME> */ create database dbloja; use dbloja; describe carrinho; create table carrinho( id int primary key auto_increment, produto varchar(50) not null, quantidade int(100) not null, valor varchar(250) not null ); -- alterações alter table carrinho add col...
<gh_stars>0 GO CREATE TABLE ExampleSchema.ExampleTable ( id INT IDENTITY(1,1) NOT NULL, somechar CHAR(5) NOT NULL, somenullablechar CHAR(5) NULL, somenullablevarchar VARCHAR(32) NULL, somenullablenvarchar NVARCHAR(32) NULL, ) ; GO
-- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 22, 2016 at 02:01 PM -- Server version: 5.6.24 -- PHP Version: 5.6.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
<filename>procedures/syncUserEventShop.sql CREATE DEFINER=`admin`@`192.168.1.2` PROCEDURE `syncUserEventShop`(IN event_ID INT) BEGIN DECLARE userEvent_ID, user_ID, userMaterialPriority_ID, userEventPriority_ID INT; DECLARE done BOOLEAN DEFAULT 0; DECLARE syncUserEventShopCursor CURSOR FOR -- Items to be insert...
<gh_stars>0 -- public."role" definition -- Drop table -- DROP TABLE "role"; CREATE TABLE "role" ( id int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY, "name" varchar(50) NOT NULL, status bool NOT NULL, CONSTRAINT "PK_role" PRIMARY KEY (id) );
CREATE TABLE [dbo].[GroupCourses] ( [Id] INT NOT NULL IDENTITY(1,1) PRIMARY KEY, [GroupId] INT NOT NULL, [CourseId] INT NOT NULL FOREIGN KEY ([GroupId]) REFERENCES Groups(Id) FOREIGN KEY ([CourseId]) REFERENCES Courses(Id) )
<gh_stars>0 ALTER ROLE [db_datareader] ADD MEMBER [MotorsportsApp]; GO ALTER ROLE [db_datawriter] ADD MEMBER [MotorsportsApp];
-- -- ======================================================================================================================================================================== -- Cleanup content and metadata -- =============================================================================================================...
-- Setup CREATE VIEW [SalesLT].[Customers] as select distinct firstname,lastname from saleslt.customer where lastname >='m' or customerid=3; GO CREATE VIEW [SalesLT].[Employees] as select distinct firstname,lastname from saleslt.customer where lastname <='m' or customerid=3; GO -- Union example SELECT FirstName, LastN...
<gh_stars>1-10 SELECT ROUND(IFNULL(AVG(SES_COUNT),0),2) average_sessions_per_user FROM ( SELECT COUNT(DISTINCT(session_id)) AS SES_COUNT FROM Activity WHERE activity_date BETWEEN DATE_SUB("2019-07-27", INTERVAL 29 DAY) AND "2019-07-27" GROUP BY user_id ) T
-- -- Author: <NAME> -- Date: 15/10/2018 -- Purpose: Report the Resource Monitor notifications for memory -- -- SQL Version: SQL 2012 (+ greater) -- -- Version: 0.1.0 -- Disclaimer: This script is provided "as is" in accordance with the projects license -- -- When Who What ----------...
<reponame>SQLauto/SQLServer-5<filename>Stored Procedures/sp_RestoreScriptGenie.sql<gh_stars>10-100 USE master GO IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_NAME = 'sp_RestoreScriptGenie') EXEC ('CREATE PROC dbo.sp_RestoreScriptGenie AS SELECT ''stub version, to be replaced''') GO /******...
<gh_stars>10-100 /* ## Questions ### 176. [Second Highest Salary](https://leetcode.com/problems/second-highest-salary/) SQL Schema Create table If Not Exists Employee (Id int, Salary int) Truncate table Employee insert into Employee (Id, Salary) values ('1', '100') insert into Employee (Id, Salary) values ('2', '200...
-- file:jsonb.sql ln:951 expect:true select '{"a":1 , "b":2, "c":3}'::jsonb - 'c'
-- 2020-04-16T13:55:54.036Z -- URL zum Konzept UPDATE AD_Process_Para SET IsActive='N',Updated=TO_TIMESTAMP('2020-04-16 15:55:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=540907 ; -- 2020-04-16T13:55:56.802Z -- URL zum Konzept UPDATE AD_Process_Para SET IsActive='N',Updated=TO_TIMESTAMP('2020-04...
<gh_stars>0 create table users(id int primary key, json text); insert into users values(1, '[[1,2],["A", "B"]]'); insert into users values(2, '[[3],["C"]]'); insert into users values(3, '[]'); .headers on .mode column --select json_tree.value from users, json_tree(users.json); select * from users, json_tree((select jso...
<gh_stars>0 /* * Copyright (c) 2019 LabKey Corporation * * 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 appli...
<reponame>zhang-bin-98/hanclass_bioinfor_server CREATE TABLE IF NOT EXISTS user ( user_id int PRIMARY KEY AUTO_INCREMENT, username varchar(25) NOT NULL UNIQUE, password varchar(10) NOT NULL, email varchar(25), create_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, user_role int NOT NULL DEFAU...
ALTER TABLE AM_APPLICATION_KEY_MAPPING ADD CREATE_MODE VARCHAR2(30) DEFAULT 'CREATED' / ALTER TABLE AM_API_LC_EVENT MODIFY USER_ID VARCHAR2(255) / ALTER TABLE AM_APPLICATION_REGISTRATION ADD TOKEN_SCOPE VARCHAR2(256) DEFAULT 'default' / ALTER TABLE AM_APPLICATION_REGISTRATION ADD INPUTS VARCHAR2(256) / ALTER TABLE AM_A...
<gh_stars>0 INSERT INTO USER VALUES (1, 'Jim'); INSERT INTO USER VALUES (2, 'Don');
CREATE TABLE IF NOT EXISTS users ( id bigserial, name varchar(64) );
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table product ( ean varchar(255) not null, name varchar(255), description varchar(255), constraint pk_product primary key (e...
with __dbt__CTE__customer_nation_region as ( /* Modifications © 2019 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...
ALTER TABLE INDEX_TEST3 ADD CONSTRAINT PK_INDEX_TEST12 PRIMARY KEY ( INDEX_TEST3_ID );
<gh_stars>10-100 CREATE TABLE `widgets` ( `widget_token` varbinary(64) NOT NULL, -- intentionally varbinary to have mixed types in the compound key `manufacturer_token` varchar(255) NOT NULL, `created_at_ms` bigint(20) NOT NULL, `name` varchar(128) NOT NULL, PRIMARY KEY (`widget_token`), KEY `ma...
<gh_stars>1-10 CREATE PROCEDURE SP_SelectSomeByID @ID int AS BEGIN SELECT * FROM TSome WHERE someID = @ID END GO CREATE PROCEDURE SP_SplitSomeByID @ID int AS BEGIN SELECT * FROM TSome WHERE someID < @ID; SELECT * FROM TSome WHERE someID >= @ID; END GO CREATE PROCEDURE SP_InsertSome @Title nvarchar(40), @C...
-- https://dev.mysql.com/doc/refman/5.6/ja/innodb-fulltext-index.html -- スペース区切りでinsertしないと特定の単語にヒットしない -- 5.7.6から組み込みngramパーサが使える -- http://mysqlserverteam.com/innodb-%E5%85%A8%E6%96%87%E6%A4%9C%E7%B4%A2-n-gram-parser/ DROP TABLE IF EXISTS full_text_index_table; CREATE TABLE full_text_index_table ( id BIGINT NOT N...
<gh_stars>0 insert into site(id, service, url, url_register, error_type, error_msg, user_agent) values (1, 'Instagram', 'https://www.instagram.com/{}', 'https://www.instagram.com/', 0, null, null); insert into site(id, service, url, url_register, error_type, error_msg, user_agent) values (2, 'Twitter', 'https://mobi...
DROP TABLE ZuordnungReportvorlagen; DROP TABLE SchuelerLeistungsdaten; DROP TABLE SchuelerErzFunktion; DROP TABLE SchuelerLD_PSFachBem; DROP TABLE SchuelerFehlstunden; DROP TABLE SchuelerZuweisungen; DROP TABLE SchuelerFHRFaecher; DROP TABLE SchuelerAbgaenge; DROP TABLE SchuelerMerkmale; DROP TABLE SchuelerLernabschnit...
<reponame>BryanPaz9/jpaejemplo create database dbfacturacion; use dbfacturacion; create table cliente( cliente_id integer auto_increment, codigo varchar(20) not null, nit varchar(20) not null, nombre varchar(30) not null, direccion varchar(100), fecha_ingreso timestamp, PRIMARY KEY(cliente_id)...
<gh_stars>0 select count(*) from ratings;
<gh_stars>0 -------------------------------------------------------- -- DDL for Trigger SOK_SIZE_RANGE_LU_TG -------------------------------------------------------- CREATE OR REPLACE TRIGGER "SOK_SIZE_RANGE_LU_TG" BEFORE INSERT OR UPDATE ON SOK_SIZE_RANGE_LU FOR EACH ROW BEGIN IF INSERTING THE...
/* RESOURCE */ https://ethereumdev.io/explore-ethereum-data-with-sql-queries-on-dune-analytics/ /* BAT - Basic Attention Token - Contract Address, Etherscan */ 0x0D8775F648430679A709E98d2b0Cb6250d2887EF source: https://etherscan.io/token/<KEY> /* Initial BAT Token query from ERC20_evt_Transfer */ SELECT "from", "to"...
<reponame>MohamadSheikhAlshabab/jokes-app DROP TABLE IF EXISTS joketb; CREATE TABLE joketb( id SERIAL PRIMARY KEY, type VARCHAR(255), setup VARCHAR(255), punchline VARCHAR(255) );
SELECT operation.nameop AS "Operation", cow.namecow AS "Cow", cow.dailyprod AS "Production (l/j)" FROM cow NATURAL JOIN herd NATURAL JOIN breeder NATURAL JOIN operation GROUP BY operation.idop, cow.idcow ORDER BY operation.idop, cow.dailyprod DESC
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) values (NEXTVAL('SEQ_EG_ACTION'),'SewerageConnectionChangeInClosetsValidation','/ajaxconnection/check-application-inworkflow',null,(select id...
<gh_stars>10-100 DROP TABLE IF EXISTS dbo.[organisation]
.mode csv .import 'cde_agencies.csv' cde_agencies .import 'agency_participation.csv' agency_participation .import 'nibrs_arrestee.csv' nibrs_arrestee .import 'nibrs_arrestee_weapon.csv' nibrs_arrestee_weapon .import 'nibrs_bias_motivation.csv' nibrs_bias_motivation .import 'nibrs_month.csv' nibrs_month .import 'nibrs_i...
-- file:xml.sql ln:176 expect:true SELECT xpath(NULL, NULL) IS NULL FROM xmltest
-- file:numeric.sql ln:649 expect:true INSERT INTO fract_only VALUES (3, '1.0')
CREATE TABLE rnaStruct ( chrom varchar(255) not null, # Chromosome or FPC contig chromStart int unsigned not null, # Start position in chromosome chromEnd int unsigned not null, # End position in chromosome name varchar(255) not null, # Name of item score int unsigned not null, # Score from 0-1000 ...
<filename>docs/deploy/mysql/init/microservice_exam.sql /* Navicat Premium Data Transfer Source Server : shimmerjordan Source Server Type : MySQL Source Server Version : 80022 Source Host : localhost:3306 Source Schema : microservice-exam Target Server Type : MySQL Target Server...
CREATE TABLE departments ( dept_no VARCHAR NOT NULL, dept_name VARCHAR NOT NULL, CONSTRAINT pk_departments PRIMARY KEY (dept_no) ); CREATE TABLE dept_emp ( emp_no INT NOT NULL, dept_no VARCHAR NOT NULL ); CREATE TABLE dept_manager ( dept_no VARCHAR NOT NULL, emp_no INT NOT NULL ); CREATE TABLE employees ( emp_no IN...
<reponame>dram/metasfresh update c_element set ad_org_id=1000000 where c_element_id=1000000;
-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64) -- -- Host: localhost Database: walletjs -- ------------------------------------------------------ -- Server version 5.7.21-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_S...
-- begin DDCL_LOG_LEVEL create table ddcl_LOG_LEVEL ( ID uuid, VERSION integer not null, CREATE_TS timestamp, CREATED_BY varchar(50), UPDATE_TS timestamp, UPDATED_BY varchar(50), DELETE_TS timestamp, DELETED_BY varchar(50), -- NAME varchar(255) not null, CODE varchar(255), ...
SELECT tierRateType, tierRate, startDate, endDate, isActive FROM wnprc_billing.tierRates WHERE isActive = true
<filename>obevo-db-impls/obevo-db-mssql/src/test/resources/reveng/expected/myschema01/default/DateDefault.sql -- comment CREATE DEFAULT DateDefault AS '01Jan1972' GO
<reponame>datafuselabs/datafuse-operator select * from system.clusters
<reponame>Zhaojia2019/cubrid-testcases drop table if exists alt_comment_tbl; create table alt_comment_tbl(id int, b char(11)) comment='alter table comment testing'; insert into alt_comment_tbl values(1,'22'),(2,'2a2'),(3,'2b2'),(3,'2c2'),(4,'2d2'),(5,'2e2'),(6,'2f2'); select * from alt_comment_tbl order by id, b; sel...
PRAGMA foreign_keys=off; ALTER TABLE outputs RENAME TO outputs_old; CREATE TABLE outputs ( spending_key BLOB PRIMARY KEY NOT NULL, value INTEGER NOT NULL, flags INTEGER NOT NULL, maturity INTEGER NOT NULL, ...
<reponame>Vinodhakumara/joindin-api -- SQL for API write tests -- -- These aren't safe to run on a live platform, but are very valuable in testing. Before they can be run, -- this query needs to be run against the database: insert into oauth_consumers (consumer_key, consumer_secret, user_id, enable_password_grant) ...
--! Previous: sha1:29d90e32fdb447d6d4ec6b9ec5218a695ec792e9 --! Hash: sha1:5173931e593ac45dce778294dc74b9fbfb35fa10 drop policy if exists interactivity_settings_select on interactivity_settings; create policy interactivity_settings_select on interactivity_settings using ( session_has_project_access( coalesce((se...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * Author: aurelien * Created: Aug 14, 2018 */ --tables SOURCE ./ps_helper_logs.sql SOURCE ./slave_sql_load_average.sql --pr...
-- @testpoint: 插入字符串类型,合理报错 drop table if exists float8_09; create table float8_09 (name float8); insert into float8_09 values ('123abc'); insert into float8_09 values ('1235ss4563'); insert into float8_09 values ('abc456'); drop table float8_09;
-- This extension will be used to encrypt a user's password. First DROP the extension if it exists then CREATE it again. DROP EXTENSION if exists pgcrypto; CREATE EXTENSION pgcrypto; -- If the table "bookings" exists delete it. DROP TABLE if exists bookings CASCADE; -- If the table "desks" exists delete it. DROP TAB...
<filename>php/exercise/Exercises/basic/db.sql CREATE DATABASE IF NOT EXISTS shop; USE shop; CREATE TABLE IF NOT EXISTS categories ( CAT_ID INT(11) NOT NULL AUTO_INCREMENT, CAT_NAME VARCHAR (255) NOT NULL, CREATE_DATE DATETIME DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (CAT_ID) ); CREATE TABLE IF NOT EXISTS pro...
CREATE OR ALTER FUNCTION ufn_CalculateFutureValue (@sum DECIMAL(15, 4), @yearlyInterestRate FLOAT, @numberOfYears INT) RETURNS DECIMAL (15, 4) AS BEGIN DECLARE @Result DECIMAL(15, 4) SET @Result = @sum * POWER((1 + @yearlyIn...
-- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 14 Jun 2017 pada 16.34 -- Versi Server: 5.6.24 -- PHP Version: 5.6.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!4...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 18, 2016 at 02:28 PM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
INSERT INTO charity_donation.user_authorities (email, authority) VALUES ('<EMAIL>', 'ROLE_USER'); INSERT INTO charity_donation.user_authorities (email, authority) VALUES ('<EMAIL>', 'ROLE_USER'); INSERT INTO charity_donation.user_authorities (email, authority) VALUES ('<EMAIL>', 'ROLE_USER'); INSERT INTO charity_donati...
<filename>INFO/Books Codes/Oracle9i PLSQL Programming/ch10/forwardDeclaration.sql REM forwardDeclaration.sql REM Chapter 10, Oracle9i PL/SQL Programming by <NAME> REM This block illustrates a forward declaration. set serveroutput on DECLARE v_TempVal BINARY_INTEGER := 5; -- Forward declaration of procedure B. ...
<filename>src/main/resources/db.migration/V1__example.sql<gh_stars>1-10 CREATE TABLE examples ( id SERIAL PRIMARY KEY NOT NULL, name TEXT UNIQUE NOT NULL, created_on TIMESTAMP NOT NULL DEFAULT (NOW() AT TIME ZONE 'UTC') ); INSERT INTO examples (id, name) VALUES (1, 'Example 1');
<filename>Database Basics/MSSQL Server Exam - 22 October 2017/MSSQL Server Exam - 22 October 2017/15. Average Closing Time.sql SELECT d.Name, ISNULL(CAST(AVG(DATEDIFF(DAY, r.OpenDate, r.CloseDate)) AS VARCHAR), 'no info') AS [Average Duration] FROM Reports AS r JOIN Categories AS c ON c.Id = r.CategoryId JOIN Dep...
<gh_stars>1-10 create table ArtifactComment ( id int8 not null, lastActionTime timestamp, username varchar(50), text text, artifact_id int8 not null, primary key (id) ) create table OntologyClass ( surrogateId int8 not null, annotation text, id varchar(255), label varchar(255), uri varchar(255), parent_surrogateId int8...
BEGIN; DROP TABLE IF EXISTS authentication_user; DROP TABLE IF EXISTS authentication_provider_code; COMMIT;
<reponame>UWIT-IAM/uw-redcap-client<gh_stars>10-100 -- Verify seattleflu/schema:roles/redcap-det-processor/grants on pg begin; rollback;
<reponame>ministryofjustice/manage-recalls-api ALTER TABLE recall ADD COLUMN contraband BOOLEAN default NULL, ADD COLUMN vulnerability_diversity BOOLEAN default NULL; UPDATE recall SET contraband = (contraband_detail <> '') WHERE contraband_detail IS NOT NULL; UPDATE recall SET vulnerability_diversity = (vulner...
<reponame>jdkoren/sqlite-parser<filename>src/test/resources/collate3.test_9.sql<gh_stars>100-1000 -- collate3.test -- -- execsql { -- CREATE TABLE collate3t1(a, b); -- INSERT INTO collate3t1 VALUES('2', NULL); -- INSERT INTO collate3t1 VALUES('101', NULL); -- INSERT INTO collate3t1 VALUES('12', NULL); ...
<reponame>srahn/kvwmap ALTER TYPE xplan_gml.rp_klimaschutztypen ADD VALUE '3000' AFTER '2000';
-- Revert postgraphile_user_system:unregistered_email_resets from pg BEGIN; SET search_path TO app_private,public; DROP TABLE unregistered_email_password_resets; COMMIT;
DROP TABLE IF EXISTS Credentials; DROP TABLE IF EXISTS Deploys; DROP TABLE IF EXISTS GroupMembers; DROP TABLE IF EXISTS Permissions; DROP TABLE IF EXISTS Templates; DROP TABLE IF EXISTS Builds; DROP TABLE IF EXISTS Users; DROP TABLE IF EXISTS `Groups`; DROP TABLE IF EXISTS Jobs; DROP TABLE IF EXISTS Applications; CREA...
<reponame>paullewallencom/prestashop-978-1-7832-8025-4<filename>_src/Chapter 9/0254OS_09_code/mymodcomments/upgrade/sql/install-0.4.sql ALTER TABLE `PREFIX_mymod_comment` ADD `id_shop` int(11) NOT NULL AFTER `id_mymod_comment`
<gh_stars>1-10 declare @table_cursor cursor, @table_owner sysname, @table_name sysname, @key_index_name sysname, @key_colid int, @index_active int, @catalog_name sysname, @result int, @qualified_table_name nvarchar(517) declare @column_cursor cursor, @table_id int, @column_id int, ...
<reponame>parshuramreddysudda/InterviewPreparation INSERT INTO my_employee SELECT employee_id, first_name, last_name, department_id, NULL FROM employees WHERE employee_id = 202;
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 11, 2021 at 04:18 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.3.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
SELECT * FROM dept WHERE EXISTS (SELECT dept_id, count(emp.dept_id) FROM emp WHERE dept.dept_id = dept_id GROUP BY dept_id HAVING EXISTS (SELECT 1 FROM bonus WHE...
<reponame>commandprompt/PostgreSQL-Replicator INSERT INTO staff VALUES(3, 'devrim'); INSERT INTO presence VALUES(3, FALSE);
-- NO NULLS DROP TABLE IF EXISTS test_tbl; CREATE TABLE test_tbl(groupid int,itemno int); INSERT INTO test_tbl VALUES(1,1); INSERT INTO test_tbl VALUES(1,2); INSERT INTO test_tbl VALUES(1,3); INSERT INTO test_tbl VALUES(1,4); INSERT INTO test_tbl VALUES(1,5); INSERT INTO test_tbl VALUES(2,6); INSERT INTO test_tbl VALUE...