sql
stringlengths
6
1.05M
<reponame>pavel-voinov/oracle-dba-workspace<filename>scripts/sysdba/setup_xdb.sql /* */ begin execute immediate 'ALTER SYSTEM SET dispatchers=''(PROTOCOL=TCP)(SERVICE=' || sys_context('USERENV', 'DB_UNIQUE_NAME') || 'XDB)'' SCOPE=BOTH SID=''*'''; end; / set serveroutput on size unlimited exec dbms_xdb.sethttpport(0)...
<reponame>daviddyess/api delete from roles_permissions where permission_subject_id in (select id from permission_subject where name = 'flavorNote'); delete from permission_subject where name = 'flavorNote';
<reponame>sbwiecko/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL use employees; SELECT * FROM employees WHERE first_name = 'Elvis'; SELECT * FROM employees WHERE last_name = 'Elvis'; SELECT * FROM employees WHERE first_name <> 'Elvis'; SELECT * FROM employees WHERE first_name != 'Elvis'; SELECT count(...
insert overwrite table query67 select * from (select i_category , i_class , i_brand , i_product_name , d_year , d_qoy , d_moy , s_store_id , sumsales , rank() over (partition by i_category order by sumsales desc) rk ...
<filename>services/doseo/init.sql create table if not exists public.users( login varchar not null unique, password_hash varchar not null);
USE AdventureWorks2012; GO SELECT 'Total income is', ((OrderQty * UnitPrice) * (1.0 - UnitPriceDiscount)), ' for ', p.Name AS ProductName FROM Production.Product AS p INNER JOIN Sales.SalesOrderDetail AS sod ON p.ProductID = sod.ProductID ORDER BY ProductName ASC; GO
delete from tips; delete from checkins; delete from userfriends; delete from users; delete from businessattributes; delete from businesscategories; delete from businesses; delete from attributes; delete from categories;
CREATE TABLE users ( id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, username VARCHAR(50) NOT NULL UNIQUE, name VARCHAR(200) NOT NULL, email VARCHAR(200), salt VARCHAR(50), hash VARCHAR(200) ); CREATE TABLE courses ( id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name VARCHAR (50) NOT NULL UNIQUE, descrip...
<filename>FourWallpapers.Repositories.SqlServer/Queries/Search/Random.sql --DEBUG ONLY VARIABLES... THESE WILL BE FILLED IN VIA PARAMS IN CODE --DECLARE @PerPage TINYINT = 100; --END OF DEBUG ONLY VARIABLES ;WITH [results] AS ( SELECT DISTINCT IMG.* ,[RandomKey] = ABS(CAST((BINARY_CHECKSUM(*) * RAND()) AS INT)) FR...
<filename>dbflute_maihamadb/playsql/replace-schema-92-whitebox.sql -- /= = = = = = = = = = = = = = = = = = = = = -- for the test of too-many relations -- = = = = = = = = = =/ CREATE TABLE WHITE_BASE ( BASE_ID INTEGER NOT NULL, BASE_NAME VARCHAR(200) NOT NULL, SEA_ID INTEGER, LAND_ID INTEGER, PIARI_ID INT...
CREATE TABLE "CITENOTES" ( "CAT_NUM" VARCHAR2(100), "TYPE_STATUS" VARCHAR2(100), "CITED_AS" VARCHAR2(100), "CITATION_URL_WHIT" VARCHAR2(1000), "NOTES" VARCHAR2(1000), "PUBLICATION_TITLE" VARCHAR2(1000), "MEDIA_URI" VARCHAR2(1000) )
<gh_stars>1-10 CREATE TABLE IF NOT EXISTS users ( user_id BIGINT PRIMARY KEY, user_name TEXT, org_defined_id TEXT, first_name TEXT, middle_name TEXT, last_name TEXT, is_active BOOLEAN, organization TEXT, internal_email TEXT, external_email TEXT, signup_date TIMESTAMP )
-- Copyright 2018 <NAME>. All rights reserved. More info at http://tanelpoder.com -- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions. drop table a; drop table b; create table A(col11 number, col12 number); create table B(col21 number, col22 number); insert into a values (-3,-7...
--Test rownum in result set create class t1(col1 integer, col2 varchar(20)); insert into t1 values(101, 'aaa'); insert into t1 values(102, 'bbb'); insert into t1 values(103, 'ccc'); insert into t1 values(104, 'ddd'); insert into t1 values(101, 'aaa'); insert into t1 values(102, 'bbb'); insert into t1 values(103, 'ccc...
-- @testpoint:opengauss关键字datetime_interval_code(非保留),作为角色名 --关键字不带引号-成功 drop role if exists datetime_interval_code; create role datetime_interval_code with password '<PASSWORD>' valid until '2020-12-31'; drop role datetime_interval_code; --关键字带双引号-成功 drop role if exists "datetime_interval_code"; create role "datet...
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 14 Agu 2021 pada 08.05 -- 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...
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <NAME> -- Create date: -- Description: Deletes PropertyUser and ChangeLog -- ============================================= CREATE OR ALTER PROCEDURE dbo.SP_B_deletePropertyOwner @inOwnerDocValue varchar(30)...
<reponame>nik3348/gome-backend create table users ( uid int not null primary key, name varchar(255) null, email varchar(255) null );
<reponame>vutruong626/vieclamthoivuNL -- MySQL dump 10.16 Distrib 10.1.26-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: vieclamthoivu -- ------------------------------------------------------ -- Server version 10.1.26-MariaDB-0+deb9u1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_...
<filename>postgresql/04_random_timestamp_between.sql CREATE OR REPLACE FUNCTION random_timestamp_between ( low TIMESTAMP, high TIMESTAMP ) RETURNS TIMESTAMP LANGUAGE 'plpgsql' AS $$ BEGIN RETURN low + random() * (high - low); END; $$;
<filename>db/seeds.sql INSERT INTO department (name) VALUES ('Sales'), ('Engineering'), ('Finance'), ('Legal'); INSERT INTO role (title, salary, department_id) VALUES ('Sales Person', 85000, 1), ('Sales Manager', 150000, 1), ('Lead Engineer', 151000, 2), ('Software Engineer', 123000, 2), ('Account Manager', 161000, 3)...
DROP TABLE IF EXISTS reportes; create table reportes ( id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT, id_sucursal INT, motivo varchar(30), texto text, fecha date, hora time, PRIMARY KEY (id) ); alter table reportes add index id_sucursal(id_sucursal); alter table reportes add index fecha(fecha);
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 27, 2020 at 12:23 PM -- Server version: 10.1.16-MariaDB -- PHP Version: 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
<reponame>MS-BI/JobExceutionFramework<filename>JobExecutionFramework/SSISDB/catalog/Stored Procedures/validate_project.sql CREATE PROCEDURE [catalog].[validate_project] @folder_name nvarchar(128), @project_name nvarchar(128), @validate_type ...
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for user -- ---------------------------- DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT ...
CREATE DEFINER=`root`@`localhost` PROCEDURE `spConsultarSubCategoriaTodos`() begin select sc.id , sc.categoria_id , c.nombre as categoria , sc.nombre , sc.estado from tb_sub_categoria sc join tb_categoria c on c.id = sc.categoria_id where sc.estado = 1; end
CREATE OR REPLACE PROCEDURE U_Curr as rt student%ROWTYPE; CURSOR curr is select * FROM student; begin open curr; LOOP FETCH curr INTO rt; EXIT WHEN curr%NOTFOUND; DBMS_OUTPUT.PUT_LINE ('Student Name ' || rt.NAME); END LOOP; IF curr%NOTFOUND THEN DBMS_OUTPUT.PUT_LINE ('Number of Students...
CREATE TABLE group_users ( group_id int NOT NULL, user_id int NOT NULL, inviter_user_id int NOT NULL, invited_at timestamp NOT NULL, PRIMARY KEY (group_id, user_id) ); CREATE INDEX on group_users (user_id);
<filename>db/StoredProcedures/Security/Security_Account_Update.sql SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <NAME> -- Create date: 01/10/2018 -- Description: To update an account entity. -- ============================================= CREATE OR ...
-- pagerfault.test -- -- execsql { -- PRAGMA cache_size = 10; -- BEGIN; -- INSERT INTO t1 VALUES(a_string(3000)); -- INSERT INTO t1 VALUES(a_string(3000)); -- } PRAGMA cache_size = 10; BEGIN; INSERT INTO t1 VALUES(a_string(3000)); INSERT INTO t1 VALUES(a_string(3000));
-- file:hs_standby_disallowed.sql ln:53 expect:true COMMIT PREPARED 'foobar'
use payroll; GO -- turn off temporal tables alter table employees SET (SYSTEM_VERSIONING=OFF); alter table employees DROP PERIOD FOR SYSTEM_TIME GO delete from paychecks; delete from timecard_entries; delete from pay_periods; delete from employees; delete from jobtitle_lookup;; delete from department_lookup;
<gh_stars>10-100 -- LAB #8 -- 1 -- Based on the University Database Schema in Lab 2, write a procedure which takes -- the dept_name as input parameter and lists all the instructors associated with -- the department as well as list all the courses offered by the department. Also, -- write an anonymous block with the p...
delete from `spell_proc_event` where `entry` = 23547; insert into `spell_proc_event` values(23547,0,0,0,0,32,0);
<filename>db/seeds.sql INSERT INTO burgers (burger_name, devoured) VALUES ('Mushroom Swish', false); INSERT INTO burgers (burger_name, devoured) VALUES ('Baconater', false); INSERT INTO burgers (burger_name, devoured) VALUES ('PB&J', false); INSERT INTO burgers (burger_name, devoured) VALUES ('Vegan', false);
<reponame>maxtsimpson/Eat-Da-Burger<filename>db/schema.sql create database burgers_db; use database burgers_db; create table burgers( id int auto_increment not null, burger_name varchar(50), devoured boolean, primary key (id) )
<reponame>malkiewiczm/FL_voter_db<filename>post_init.sql -- post init to be run after importing the data BEGIN TRANSACTION; CREATE INDEX name_ordering ON voters(last_name, first_name); COMMIT;
<reponame>sunglen/op3c INSERT INTO member_config (id, member_id, name, value, name_value_hash, created_at, updated_at) (SELECT NULL, c_member_id, "blog_url", rss, MD5(<?php echo $this->conn->expression->concat($this->conn->quote('blog_url'), $this->conn->quote(','), 'rss') ?>), NOW(), NOW() FROM c_member WHERE rss <> "...
INSERT INTO evento(id,nome,dia,mes,ano,distancia,horas,minutos,segundos) VALUES (5, 'PoaRunDay', 3,3,2021,5,5,3,34)
<reponame>prup/data-lawyer -- Q1. : Patient’s ID, sex, AND date of birth4. SELECT subject_id, sex, dob FROM mimic2v26.d_patients WHERE dob < '2521-12-07' AND dob > '2304-09-13'; -- Q2. : Count the number of patients in the database. SELECT count(subject_id) FROM mimic2v26.d_patients; -- Q3. : Serum HCO3 Histogram. S...
<reponame>park0450/snowplow -- get new events -- determine most recent mapping between domain_userid and user_id -- add new & overwrite existing if changed {{ config( materialized='incremental', sort='domain_userid', dist='domain_userid', unique_key='domain_userid', enabled=...
delete from espm_customer; insert into ESPM_CUSTOMER(CUSTOMER_ID, EMAIL_ADDRESS, PHONE_NUMBER, FIRST_NAME, LAST_NAME, DATE_OF_BIRTH, CITY, POSTAL_CODE, STREET, HOUSE_NUMBER, COUNTRY) values ('1000000002','<EMAIL>','1029384757','Paul','Burke','19811224','Los Angeles, California','90067','Main Street','100','USA');
<filename>src/main/resources/database/postgresql/alter_10_4_0_to_10_5_0.sql create table o_goto_organizer ( id int8 not null, creationdate timestamp not null, lastmodified timestamp not null, g_name varchar(128) default null, g_account_key varchar(128) default null, g_access_token varchar(128) not nul...
<filename>source/R-Portable-Win/library/AnnotationDbi/DBschemas/schemas_2.1/INPARANOID_DB.sql<gh_stars>0 CREATE TABLE metadata ( name VARCHAR(80) PRIMARY KEY, value VARCHAR(255)); CREATE TABLE map_metadata ( map_name VARCHAR(80) NOT NULL, source_name VARCHAR(80) NOT NULL, source_url VARCHA...
<filename>30-sql-solutions/the_report.sql<gh_stars>0 SELECT IF(G.Grade < 8, NULL, S.Name), G.Grade, S.Marks FROM Students S, Grades G WHERE S.Marks >= G.Min_Mark AND S.Marks <= G.Max_Mark ORDER BY G.Grade DESC, S.Name ASC;
-- -- Base de données: `event` -- CREATE DATABASE IF NOT EXISTS event DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; USE `event`; -- -- Structure de la table `agenda` -- CREATE TABLE IF NOT EXISTS agenda ( `agenda_id` int auto_increment, `day` date NOT NULL, `start_hour` date NOT NULL, `end_hour` date NOT N...
<reponame>bogdanghita/public_bi_benchmark-master_project --SELECT 1 from pg_class r where r.relname = '__Insert_Stream__#Tableau_2_2FCB0D6B-63F3-469A-9012-0F168B2ECE3F_10_Filter__0__' and r.relkind = 'x';
insert into city values (1263752,"Mangrol","IN",70.116669,21.116671), (1263761,"Manglaur","IN",77.866669,29.799999), (1263797,"Mangalagiri","IN",80.550003,16.433331), (1263807,"Maner","IN",84.883331,25.65), (1263824,"Mandvi","IN",69.366669,22.83333), (1263834,"Mandsaur","IN",75.066673,24.066669), (1263879,"Mandawar","I...
-- AlterTable ALTER TABLE "Account" ADD COLUMN "oauth_token" TEXT, ADD COLUMN "oauth_token_secret" TEXT, ADD COLUMN "refresh_token_expires_in" INTEGER;
INSERT OVERWRITE TABLE `{{database}}`.token_transfers PARTITION (dt = date '{{ds}}') SELECT /*+ REPARTITION(1) */ token_transfers.token_address, token_transfers.from_address, token_transfers.to_address, token_transfers.value, token_transfers.transaction_hash, token_transfers.log_index, T...
<filename>application/drop_production.sql rem Quilt 0.1.0 define g_quilt_prod_schema_def = "QUILT_000100" accept g_quilt_prod_schema prompt "Quilt schema [&&g_quilt_prod_schema_def] : " default "&&g_quilt_prod_schema_def" rem Quilt Production Schema prompt .. Dropping &&g_quilt_prod_schema user drop user &&g_quilt_pr...
INSERT INTO public."USERS" ("REFERENCE", "USER_NAME", "USER_PASSWORD") VALUES (1, 'test', '<PASSWORD>'); INSERT INTO public."EXERCISES"("REFERENCE", "DESCRIPTION", "DURATION", "USER_ID", "DATE") VALUES (1, 'test_exercise', 60, 1, '2019-01-08')
/** * @version v1.10.0 * @title Add collaborators to tasks * @signature 9143a511719555e8f8f09b49523bd022 * * This patch renames the %ticket_lock table to just %lock, which allows for * it to be considered more flexible. Instead, it joins the lock to the * ticket and task objects directly. * * It also redefines...
# Table backup from Sphider # Creation date: 01-Aug-2012 08:46 # Database: # MySQL Server version: 5.1.36-community-log # Valid end of backup from Sphider backup
:setvar Role "db_owner" :r $(WorkingFolder)\CreateUser.sql :r $(WorkingFolder)\AddRoleMember.sql
CREATE TABLE subdivision_MH (id VARCHAR(6) NOT NULL, name VARCHAR(255) NOT NULL, level VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; INSERT INTO `subdivision_MH` (`id`, `name`, `level`) VALUES ('MH-ALL', 'Ailinglaplap Atoll', 'municipality'); INSERT INTO `su...
<filename>source/TSQLLint.Tests/UnitTests/LintingRules/set-nocount/test-files/set-nocount-one-error-rowset-action.sql -- Rowset Actions SELECT * FROM FOO; UPDATE FOO SET BAR = 1; DELETE FROM BAR; INSERT INTO Production.UnitMeasure (Name, ID) VALUES (N'Foo', 1);
alter table patientroom modify printDischargeAt DateTime; alter table patientroom modify printAdmittedAt DateTime;
/*! START TRANSACTION */; CREATE TABLE green_occupations ( onetsoc_code CHARACTER(10) NOT NULL, green_occupational_category CHARACTER VARYING(40) NOT NULL, FOREIGN KEY (onetsoc_code) REFERENCES occupation_data(onetsoc_code)); /*! COMMIT */; /*! START TRANSACTION */; INSERT INTO green_occupations (onetsoc...
DELIMITER / UPDATE KRCR_PARM_T SET VAL = 'N' WHERE PARM_NM = 'ALL_SPONSORS_FOR_PROPOSAL_AWD_DISCLOSE' / commit / DELIMITER ;
<gh_stars>0 /****************************************************************************** * TABLE solaruser.user_meta * * JSON metadata specific to a user. */ CREATE TABLE solaruser.user_meta ( user_id BIGINT NOT NULL, created solarcommon.ts NOT NULL, updated solarcommon.ts NOT NULL, jdata js...
<gh_stars>0 CREATE TABLE consumer_properties ( interface varchar not null, path varchar, wave blob, PRIMARY KEY (interface, path) )
<reponame>BjoernKW/Freshcard<filename>src/main/resources/db/migration/V19__Add_version_to_connections.sql ALTER TABLE contacts_users ADD COLUMN version INTEGER DEFAULT 0 NOT NULL;
<filename>tests/test_printers_roundtrip/ddl/create_function.sql CREATE OR REPLACE FUNCTION funca(somearg text, someotherarg text) RETURNS void AS $$ BEGIN PERFORM $function$<some_string_literal>$function$; RETURN; END; $$ language plpgsql IMMUTABLE PARALLEL SAFE STRICT CREATE FUNCTION funcb(somearg text) RETUR...
<filename>author.t/tenant_files/dbicdh/MySQL/deploy/1/001-auto.sql<gh_stars>10-100 -- -- Created by SQL::Translator::Producer::MySQL -- Created on Thu Aug 1 14:58:11 2013 -- ; SET foreign_key_checks=0; -- -- Table: `users` -- CREATE TABLE `users` ( `id` char(36) NOT NULL, `date_created` datetime NOT NULL, `dat...
<reponame>AVENTER-UG/ispconfig3 -- create mail_relay_domain and load with current domains from mail_transport table CREATE TABLE IF NOT EXISTS `mail_relay_domain` ( `relay_domain_id` bigint(20) NOT NULL AUTO_INCREMENT, `sys_userid` int(11) NOT NULL DEFAULT '0', `sys_groupid` int(11) NOT NULL DEFAULT '0', `s...
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Dec 27, 2016 at 02:31 PM -- Server version: 5.7.9 -- PHP Version: 7.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*...
CREATE DATABASE tadesgames; use tadesgames; CREATE TABLE `cliente` ( `IdCliente` int(11) NOT NULL AUTO_INCREMENT, `Nome` varchar(80) NOT NULL, `Cpf` varchar(11) NOT NULL, `Cnpj` varchar(14) NOT NULL, `DataNasc` date NOT NULL, `Email` varchar(100) NOT NULL, `Telefone` varchar(10) DEFAULT NULL, `Celular...
CREATE TABLE IF NOT EXISTS "class" ( "id" INTEGER NOT NULL, "class" TEXT NOT NULL UNIQUE, PRIMARY KEY ("id") ); CREATE TABLE IF NOT EXISTS "language" ( "id" INTEGER NOT NULL, "language" TEXT NOT NULL UNIQUE, PRIMARY KEY ("id") ); CREATE TABLE IF NOT EXISTS "word" ( "id" INTEGER NOT NULL, ...
<filename>SQL/Indexes/IndexDetails.sql<gh_stars>0 -- Limited returns the leaf level only -- and only physical fragmentation details. However, this is very -- fast as it uses the first level of the non-leaf structure to -- see the fragmentation of the leaf level (very clever!). SELECT * , STATS_DATE(object_id,...
<filename>setting_email_alesco.sql<gh_stars>0 -- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.1.39-MariaDB - mariadb.org binary distribution -- Server OS: Win64 -- HeidiSQL Version: 11.2.0.6213 -- -...
<reponame>nscon160498/ESHOP-CODE -- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th1 18, 2022 lúc 03:43 AM -- Phiên bản máy phục vụ: 10.4.21-MariaDB -- Phiên bản PHP: 8.0.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "...
INSERT INTO `users` (`ID`, `customerID`, `firstname`, `lastName`, `email`, `phonenumber`, `effectiveDate`, `endEffectiveDate`) VALUES (1, 1, 'khalil', 'daou', '<EMAIL>', '0699738518', '2018-04-16', NULL);
<reponame>happyliyingzhi/php  -- 1,如果没有m数据库 就创建 create database if not exists m; use m; -- 2.创建电影信息表 drop table if exists `mInfo`; CREATE TABLE `mInfo` ( `id` int(11) NOT NULL AUTO_INCREMENT, `m_title` varchar(255) NOT NULL DEFAULT '', `m_url` varchar(255) NOT NULL DEFAULT '', `m_score` varchar(255) NOT NULL ...
<gh_stars>0 CREATE TABLE usuarios( id INTEGER PRIMARY KEY AUTO_INCREMENT, username VARCHAR(255) NOT NULL UNIQUE, email VARCHAR(255) NOT NULL UNIQUE, nome_completo VARCHAR(255) NOT NULL, senha VARCHAR(255) NOT NULL )
<gh_stars>1-10 CREATE TABLE IF NOT EXISTS chat_messages ( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, message_text TEXT NOT NULL, sender TEXT NOT NULL, creation_timestamp DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL );
delete from eg_roleaction where roleid in (select id from eg_role where name = 'ULB Operator') and actionid in (select id from eg_action where name in('WaterTaxCollectionView','collectTaxForwatrtax')); delete from eg_roleaction where roleid in (select id from eg_role where name = 'CSC Operator') and actionid in (selec...
<filename>function/ts/insertchronology.sql<gh_stars>1-10 CREATE OR REPLACE FUNCTION ts.insertchronology(_collectionunitid integer, _agetypeid integer DEFAULT NULL::integer, _contactid integer DEFAULT NULL::integer, _isdefault boolean DEFAULT NULL::boolean, _chronologyname character varying DEFAULT NULL::character varyi...
<gh_stars>1-10 CREATE SCHEMA [employer_account]
<reponame>TihomirIvanovIvanov/SoftUni SELECT ProductName, OrderDate, DATEADD(DAY, 3, OrderDate) AS 'Pay Due', DATEADD(MONTH, 1,OrderDate) AS 'Delivery Due' FROM Orders
<gh_stars>1-10 -- RETURNS - -- 0 -> WHEN REQUEST IS SUCCESSFULLY MADE -- 1 -> NOT A SUBSCRIBER -- 2 -> ALREADY REQUESTED THE BOOK (REQUEST IS PENDING FOR THIS BOOK) -- 3 -> ALREADY BORROWED THE BOOK CREATE OR REPLACE FUNCTION REQUEST_TO_BORROW(ARG_CUSTOMER_ID VARCHAR2, ARG_ISBN VARCHAR2, ARG_CURRENT_TIME DATE) RETURN...
<gh_stars>100-1000 SET @s := ' set @chosen_index := NULL; split({table: test_cs.test_split_multiple_unique, index: non_existing}) { set @chosen_index := $split_index; } '; call run(@s); select @chosen_index = 'non_existing';
ALTER INDEX PPGA.PK_AJUSTES REBUILD; ALTER INDEX PPGA.PPGA_AJUSTES_I02 REBUILD; ALTER INDEX PPGA.PPGA_AJUSTES_I01 REBUILD; ALTER INDEX PPGA.PPGA_AJUSTES_I04 REBUILD; ALTER INDEX PPGA.PPGA_AJUSTES_I03 REBUILD; ALTER INDEX PPGA.PK_AJUSTESSOS REBUILD; ALTER INDEX PPGA.PPGA_AJUSTESSOS_I01 REBUILD; ALTER INDEX PPGA.PPGA_AJU...
DROP SCHEMA IF EXISTS demo; CREATE SCHEMA demo; USE demo; DROP TABLE IF EXISTS employees; DROP TABLE IF EXISTS prerequisites; DROP TABLE IF EXISTS courses; DROP TABLE IF EXISTS students; DROP TABLE IF EXISTS sights; CREATE TABLE employees (number INTEGER PRIMARY KEY, name VARCHAR(100), manager INTEGER REFERENCES empl...
# drawing.sql DROP TABLE IF EXISTS drawing; #@ _CREATE_TABLE_ CREATE TABLE drawing ( entry int unsigned NOT NULL, PRIMARY KEY(entry) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; #@ _CREATE_TABLE_ INSERT INTO `drawing` VALUES (14557), (15865), (20009), (7597), (18811), (16586), ...
<gh_stars>0 -- password is always <PASSWORD> in these examples INSERT INTO `users`(`name`, `surname`, `username`, `email`, `password`) VALUES ('Davide', 'Zorzella', 'Zoorzy', '<EMAIL>', <PASSWORD>GFETs.nAiayceFw6jKVO.xp0urfveoQbLNLAxN.6DsjSSk6gmXN.'); INSERT INTO `users`(`name`, `surname`, `username`, `email`, `passwor...
/* Navicat Premium Data Transfer Source Server : 192.168.127.12 Source Server Type : MySQL Source Server Version : 50645 Source Host : 192.168.127.12:3306 Source Schema : tap_water Target Server Type : MySQL Target Server Version : 50645 File Encoding : 65001 Date: 2...
<gh_stars>0 DROP KEYSPACE IF EXISTS fortis; CREATE KEYSPACE fortis WITH replication = {'class':'SimpleStrategy', 'replication_factor' : 3}; USE fortis; /****************************************************************************** * Down migration *******************************************************************...
--Test Comment CREATE TABLE blubahjfsdvasd(wasd varchar(255)); CREATE TABLE dfgndbfgfdg(wasd varchar(255));
<reponame>dtalon42/Portfolio use master go if exists (select * from sysdatabases where name='MovieLibrary') drop database MovieLibrary go create database MovieLibrary go use MovieLibrary go drop table if exists Movie go create table Movie ( movieId int identity(1,1) primary key not null, title nvarchar(30) not ...
<filename>actor-persist/src/main/resources/sql/migration/V20151112033332__AddShownAtToDialogs.sql ALTER TABLE dialogs ADD COLUMN shown_at TIMESTAMP DEFAULT now(); ALTER TABLE dialogs DROP COLUMN is_hidden; CREATE INDEX dialogs_user_id_shown_at_idx ON dialogs(user_id, shown_at);
<gh_stars>10-100 CREATE FUNCTION func878() RETURNS integer LANGUAGE plpgsql AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE242);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE123);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE155);val:=(SELECT C...
CREATE SCHEMA IF NOT EXISTS test_schema; CREATE TABLE "public".example_a ( column_a varchar NOT NULL , column_b varchar NOT NULL , column_c integer , column_d integer[] , column_e varchar[] , column_f text[] , column_g ...
CREATE SEQUENCE ${ohdsiSchema}.sec_permission_id_seq START WITH 500; ALTER TABLE ${ohdsiSchema}.sec_permission ADD CONSTRAINT permission_unique UNIQUE (value); insert into ${ohdsiSchema}.sec_permission (id, value, description) values (${ohdsiSchema}.sec_permission_id_seq.nextval, 'cohortanalysis:post', 'Create Cohort ...
<gh_stars>10-100 with enabled_settings as ( select name, id, resource_group, subscription_id, count(*) filter (where l ->> 'enabled' = 'true' and l ->> 'category' in ('Administrative', 'Security', 'Alert', 'Policy') ) as valid_category_count, string_agg(l ->> 'category', ', ') filter...
<filename>hackernews/submissions-by-year-month.sql -- Summary stats by year and month -- For story-type submissions only. Change to `t.type = 'comment'` in `where` to get stats for comments. select # group year(sec_to_timestamp(t.time)) year, month(sec_to_timestamp(t.time)) month, count(*) n, # stats: autho...
<reponame>ingensky/flowable-engine update ACT_GE_PROPERTY set VALUE_ = '5.15.1' where NAME_ = 'schema.version';
INSERT INTO geode_security.roles_permissions (role_id, resource, operation) VALUES ((SELECT id FROM geode_security.roles WHERE name = 'ADMIN'), 'CLUSTER', 'MANAGE'); INSERT INTO geode_security.roles_permissions (role_id, resource, operation) VALUES ((SELECT id FROM geode_security.roles WHERE name = 'ADMIN'), 'CLUSTER',...
<reponame>linz/nz-building-outlines -- Deploy nz-buildings:buildings_bulk_load/functions/compare to pg BEGIN; ------------------------------------------------------------ -- Script to compare all new (most recent bulk load) outlines to the -- existing outlines that intersect with the new outlines' capture source -- a...
<filename>SampleSqlScripts/Additional/Reporting/MealCalc_Report_SpendReport_Load.sql SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[MealCalc_Report_SpendReport_Load] @GoodSpendByCalcDayID INT AS --DECLARE @GoodSpendByCalcDayID INT --SET @GoodSpendByCalcDayID = 67 SELECT MealCalc_...