sql
stringlengths
6
1.05M
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET...
-- @testpoint:opengauss关键字nclob(非保留),作为数据库名 --关键字不带引号-成功 drop database if exists nclob; create database nclob; drop database nclob; --关键字带双引号-成功 drop database if exists "nclob"; create database "nclob"; drop database "nclob"; --关键字带单引号-合理报错 drop database if exists 'nclob'; create database 'nclob'; --关键字带反引号-合理报错 d...
-- license.sql -- -- Author(s): <NAME>, <NAME> -- Date: 11/20/20 -- URL: https://www.github.com/kyoogoo/TBD-491 -- -- Description: This creates a master drivers license table which information such as the -- picture, drivers id, first/last name, address, et cetera of the driver can -- ...
<filename>PostgreSQL-Queries/Database Managment/create_subject_table.sql CREATE TABLE subject ( subject_id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), subject TEXT NOT NULL, description TEXT );
DROP TABLE IF EXISTS Запись; DROP TABLE IF EXISTS Учащийся; CREATE TABLE Учащийся ( -- Поля `Фамилия` VARCHAR(100) NOT NULL, `Имя` VARCHAR(100) NOT NULL, `Отчество` VARCHAR(100), `Тип документа` VARCHAR(60) NOT NULL, `Номер документа` VARCHAR(60) NOT NULL, `Пол` VARCHAR(3) NOT NULL, `Дата рожд...
DROP DATABASE scoped_news_api_test; DROP DATABASE scoped_news_api;
<gh_stars>0 delimiter // create procedure sp_total_cargos(in fecha date) begin select count(cargo_id) as cantidad from tb_informacion_profesional where extract(year from fecha_creacion ) = fecha; end // delimiter //
# 系统表, id # MAXID 表,几个主要的大表,每天的最大ID,用来削减索引 create_date # day = 0 表示月; month = 0 AND day = 0 表示年 # 计划任务,1点执行。 不需要太精准,用来作为过滤条件。 # 可以有效的过滤冷热数据 DROP TABLE IF EXISTS `bbs_table_day`; CREATE TABLE `bbs_table_day` ( `year` smallint(11) unsigned NOT NULL DEFAULT '0' COMMENT '年', # `month` tinyint(11) unsigned NOT NULL DEFAUL...
<filename>StackOverflow/SCH - RPT-usp_Users_with_high_self_accept_rates.sql use StackOverflow go create or alter procedure rpt.usp_Users_with_high_self_accept_rates as begin -- https://data.stackexchange.com/stackoverflow/query/1933/users-with-high-self-accept-rates-and-having-10-answers --Users with high self-accep...
ALTER TABLE binaries ADD state VARCHAR(255) DEFAULT 'PROCESSED';
CREATE TYPE [dbo].[LabelType] AS TABLE ( [Name] NVARCHAR(512) NOT NULL, [RepositoryId] INT NULL, [Sort] INT NULL )
CREATE DATABASE casdb CHARACTER SET utf8mb4 collate utf8mb4_bin; CREATE USER casuser IDENTIFIED WITH mysql_native_password BY 'password'; GRANT ALL PRIVILEGES on casdb.* to 'casuser'@'%';
<reponame>Patryk27/janet BEGIN TRANSACTION; CREATE TABLE logs ( event TEXT NOT NULL, payload TEXT NOT NULL, created_at DATETIME NOT NULL DEFAULT (datetime('now', 'localtime')) ); -- CREATE TABLE users ( id TEXT NOT NULL PRIMARY KEY, ext_id INT NOT NULL, cr...
CREATE PROCEDURE usp_GetEmployeesByGender ( @Gender nchar(1) = 'M', @GenderCount int OUT ) AS BEGIN select * from [dbo].[Employee] where Gender = @Gender select @GenderCount = count(*) from [dbo].[Employee] where Gender = @Gender END GO DECLARE @ReturnValue int , @GenderCountOut int EXEC @Return...
<filename>src/test/resources/randexpr1.test_370.sql -- randexpr1.test -- -- db eval {SELECT case when coalesce((select d from t1 where not coalesce((select f*t1.b from t1 where exists(select 1 from t1 where (t1.f*t1.a)-19-13 in (select ~(cast(avg(t1.b) AS integer)) from t1 union select min(t1.a)+case min( -t1.a) when ...
<reponame>flexsocialbox/una SET @sName = 'bx_donations'; -- TABLE: entries CREATE TABLE IF NOT EXISTS `bx_donations_entries` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `profile_id` int(11) unsigned NOT NULL default '0', `type_id` int(11) NOT NULL default '0', `period` int(11) unsigned NOT NULL d...
<filename>Chapter10/service/libs/storage/db/sql/data.sql INSERT INTO delivery_order_status (delivery_id, status) VALUES (1, 'd'), (2, 'd'), (3, 't'), (4, 't'), (5, 't'), (6, 't'), (7, 't'), (8, 'f'), (9, 'f'), (10, 'f'), (11, 'f') ; INSERT INTO dispatched (delivery_id, dispa...
<reponame>eallion/foot<filename>sql/table/temp_tuijian_lt_this.sql<gh_stars>100-1000 DROP table IF EXISTS `temp_tuijian_lt_this`; CREATE TABLE temp_tuijian_lt_this AS SELECT t.* FROM (SELECT l.Id AS LeagueId, l.Name AS LeagueName, mh.MainTeam AS MainTeam, mh.GuestTeam AS GuestTeam, mh.MainTeam...
INSERT INTO user_role (email, role) VALUES ('<EMAIL>', 'ROLE_ADMIN'); INSERT INTO user_role (email, role) VALUES ('<EMAIL>', 'ROLE_USER'); INSERT INTO user_role (email, role) VALUES ('<EMAIL>', 'ROLE_USER');
with accounts as ( select * from {{ ref('stg_quickbooks__account') }} ), classification_fix as ( select account_id, account_number, is_sub_account, parent_account_id, name, account_type, account_sub_type, balance, balance_with_sub_acc...
<gh_stars>0 CREATE TABLE IF NOT EXISTS `form_ankleinjury` ( id bigint(20) NOT NULL auto_increment, date datetime default NULL, pid bigint(20) default NULL, user varchar(255) default NULL, groupname varchar(255) default NULL, authorized tinyint(4) default NULL, activity tinyint(4) default NULL, ankle_date_of_injuary dat...
<filename>emit-attic/emit-process/emit-process-services/src/main/resources/fr/icam/emit/queries/environment-list.sql SELECT `id`, `uri`, `arch`, `os`, `version` FROM `environments` WHERE `deleted` IS NULL;
<reponame>bcgov/cas-ciip-portal -- Revert ggircs-portal:computed_columns/facility_application_last_swrs_reporting_year from pg begin; drop function ggircs_portal.facility_application_last_swrs_reporting_year; commit;
CREATE OR REPLACE VIEW `APP_ID.PROJECT_NAME.sheriffable_failures` AS /* Sheriffable failures table. This view represents a set of steps that are currently failing, and for each includes information about when (commit position, build number) the step began failing in the latest run of failures. This is the view that the...
<gh_stars>1-10 /* r227 Option to display home link in breadcrumb */ INSERT INTO `sed_config` (`config_owner` ,`config_cat` ,`config_order` ,`config_name` ,`config_type` ,`config_value`) VALUES ('core', 'skin', '03', 'homebreadcrumb', '3', '0');
<gh_stars>1-10 USE [AIDE] GO /****** Object: StoredProcedure [dbo].[sp_getDailyAuditorByWeek] Script Date: 6/17/2019 7:31:08 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date,,> -- Description...
-- @testpoint: list_list二级分区表修改:split,测试点合理报错 --test1: alter table split --step1: 创建二级分区表; expect:成功 drop table if exists t_subpartition_0040; drop tablespace if exists ts_subpartition_0040; create tablespace ts_subpartition_0040 relative location 'subpartition_tablespace/subpartition_tablespace_0040'; create table i...
<filename>database/loginsystem.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: May 30, 2020 at 04:30 PM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION;...
-- -------------------------------------------------------- -- -- Table structure for table `rest_days` -- CREATE TABLE IF NOT EXISTS `rest_days` ( `restDay` date NOT NULL, `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`restDay`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;...
CREATE TABLE customers (id BIGSERIAL NOT NULL, email varchar(255) NOT NULL, zipcode int8 NOT NULL, PRIMARY KEY (id)); CREATE TABLE groups (id BIGSERIAL NOT NULL, name varchar(255) NOT NULL, PRIMARY KEY (id)); CREATE TABLE groups_users (id BIGSERIAL NOT NULL, user_id int8 NOT NULL, group_id int8 NOT NULL, PRIMARY KEY (i...
<reponame>nhs-digital-gp-it-futures/GPITBuyingCatalogue CREATE TABLE ordering.DefaultDeliveryDates_History ( OrderId int NOT NULL, CatalogueItemId nvarchar(14) NOT NULL, DeliveryDate date NOT NULL, LastUpdated datetime2(7) NOT NULL, LastUpdatedBy int NULL, SysStartTime datetime2(0) NOT NULL, ...
<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: May 17, 2018 at 02:25 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*...
<filename>data/open-source/extracted_sql/hjue_JustWriting.sql SELECT * FROM $table SELECT TABLE_NAME FROM ALL_TABLES SELECT * FROM (select inner_query.*, rownum rnum FROM ($sql) inner_query WHERE rownum < $limit) SELECT * FROM INFORMATION_SCHEMA.Columns WHERE TABLE_NAME = '".$this->_escape_table($table)."' SELECT COUNT...
<filename>data/open-source/extracted_sql/rootpy_rootpy.sql select * from locks select * from SYS.XYZZY Select A, B, C from Sys.dual Select A, B, C from Sys.dual, Table2 SELECT * from XYZZY, ABC Select A from Sys.dual Select AA,BB,CC from Sys.dual select unique_name from locks
drop view if exists raw_not_in_lsrscan; create view raw_not_in_lsrscan as select time_stamp, home_session_id, home_subsession_id, home_id, room_id, sensor_id from raw where sensor_id = 0 except select time_stamp, home_session_id, home_subsession_id, home_id, room_id, sensor_id from lsrscan;
-- Question 1 SELECT name, continent, population FROM world -- Question 2 SELECT name FROM world WHERE population > 200000000 -- Question 3 SELECT name, gdp/population FROM world WHERE population > 200000000 -- Question 4 SELECT name, population/1000000 FROM world WHERE continent = 'South America' -- Question 5 SEL...
CREATE TRIGGER trigger_before_insert_flow_users_20210708200853 BEFORE INSERT ON flow_users FOR EACH ROW BEGIN -- trigger for triggers_20210708200853_flow_users SET NEW.flow_user_guid = UUID_TO_BIN(UUID(),1); -- swap out the quicker time parts for faster indexing with the 1 SET NEW.created_at_ts = UN...
-- SQL Views -- A view is a virtual table. -- create, update, and delete a view. -- In SQL, a view is a virtual table based on the result-set of an SQL statement. -- You can add SQL functions, WHERE, and JOIN statements to a view and present the data as if the data were coming from one single table. -- SQL CREATE VIE...
<reponame>tosh223/stairlight WITH c AS ( SELECT test_id, col_c FROM PROJECT_C.DATASET_C.TABLE_C WHERE created_at = {{ execution_date.add(days=1).isoformat() }} and updated_at = {{ execution_date.add(days=2).isoformat() }} ), d AS ( SELECT test_id, ...
CREATE TABLE missing_documents_record ( id UUID PRIMARY KEY, recall_id UUID NOT NULL REFERENCES recall (id), email_id UUID NOT NULL REFERENCES document (id), detail TEXT NOT NULL, version INTEGER NOT NULL, created_by_user_id UUID NOT NULL, created_da...
<reponame>NHMD/svampeatlas CREATE TABLE Substrate ( _id INT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255) NOT NULL, name_uk VARCHAR(255) ) ENGINE = InnoDB DEFAULT CHARSET=UTF8; ALTER TABLE Substrate add column _id INT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT; ALTER TABLE Substrate add column name_uk VARCHA...
drop view at_conf_email; drop table at_conf_;
-- Dynamic Data Masking examples -- DROP TABLE dbo.CustomerDDM CREATE TABLE dbo.CustomerDDM ( [customerId] INT NOT NULL, [name] VARCHAR(40) NOT NULL, [email] VARCHAR(100), [phoneNum] VARCHAR(40), [city] VARCHAR(40), [SSN] VARCHAR (12) ) WITH ( CLUSTERED COLUMNSTORE INDEX, DISTRIBUTION ...
<reponame>Shuttl-Tech/antlr_psql<filename>src/test/resources/sql/select/5f03f43b.sql -- file:limit.sql ln:105 expect:true select unique1, unique2, nextval('testseq') from tenk1 order by tenthous limit 10
# eapDb.sql was originally generated by the autoSql program, which also # generated eapDb.c and eapDb.h. This creates the database representation of # an object which can be loaded and saved from RAM in a fairly # automatic way. #An analysis pipeline job to be run asynchronously and not too many all at once. CREATE...
<gh_stars>1-10 DROP FUNCTION IF EXISTS de_metas_material.retrieve_atp_at_date_debug(timestamp with time zone); CREATE FUNCTION de_metas_material.retrieve_atp_at_date_debug(IN p_date timestamp with time zone) RETURNS TABLE( M_Product_ID numeric, M_Warehouse_ID numeric, C_BPartner_Customer_ID numeric, StorageAttr...
<gh_stars>0 SELECT row_number, gross_outlay_amount_by_awa_cpe, gross_outlays_undelivered_cpe, gross_outlays_delivered_or_cpe FROM award_financial WHERE submission_id = {} AND COALESCE(gross_outlay_amount_by_awa_cpe,0) <> COALESCE(gross_outlays_undelivered_cpe,0) + COALESCE(gross_outlays_delivered_or_cpe,0);
<filename>packages/acs-kernel/sql/oracle/acs-objects-drop.sql -- -- acs-kernel/sql/acs-objects-drop.sql -- -- DDL commands to purge the ACS Objects data model -- -- @author <NAME> (<EMAIL>) -- @creation-date 2000-05-18 -- @cvs-id $Id: acs-objects-drop.sql,v 1.1 2001/03/20 22:51:55 donb Exp $ -- drop table general_obje...
<filename>cnprc_ehr/resources/queries/cnprcSrc/q_formulary_name.sql<gh_stars>0 /* * Copyright (c) 2016 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:/...
<reponame>pribtech/nodete INSERT INTO SEQ_EMPLOYEE_SECOND VALUES (EMPNO.NEXTVAL, DEPTNO.NEXTVAL, 'George'), (EMPNO.NEXTVAL, DEPTNO.CURRVAL, 'Paul'), (EMPNO.NEXTVAL, DEPTNO.CURRVAL, 'Kevin');
<reponame>viswaratha12/dbwarden /****** Object: View [dbo].[V_Collection_Member_List_Report] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE VIEW dbo.V_Collection_Member_List_Report AS SELECT dbo.T_Proteins.Protein_ID, dbo.T_Protein_Names.Name, dbo.T_Protein_Names.Description, dbo.T_Proteins...
DELETE FROM addr WHERE id=:id or a=:a
<reponame>quixxxy/casquatch CREATE KEYSPACE IF NOT EXISTS junitTest WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1} AND durable_writes = true;
DROP TABLE IF EXISTS users; -- Create users table {migration} -- Populate with test data INSERT INTO users (username, hash, salt) VALUES ('mei', '\xaac846b3ef07dc88f417cc73775e32724580c17b2068c11b722e9dc6a220c0e8', '\x37a82d20d2f53963b1ac7934e9fc9b80c5778bc51bd57ccb33543d2da0d25069'), ('foobar', '\x615585bfbdd7c76217...
<filename>api/db/migrations/carpool/20191130003916_create_unique_index.up.sql CREATE UNIQUE INDEX IF NOT EXISTS carpools_acquisition_id_is_driver_idx ON carpool.carpools (acquisition_id, is_driver);
--drive_users_1day SELECT date AS date, email FROM ( SELECT DATE(_PARTITIONTIME) AS date, email, NTH(2, SPLIT(email, '@')) AS domain FROM [YOUR_PROJECT_ID:EXPORT_DATASET.activity] WHERE record_type = 'drive' AND email <> '' AND drive.primary_event = true AND _PARTITIONTIME >= D...
insert into datamodel_datatables (TableName, TableInformation, StatusID, CreatedDate) values ('auditing_dataplatform', 'Platform Auditing - Data Requests Made from Within the Platform', 1, '2020-08-04 22:18:04'), ('auditing_datarequest', 'Platform Auditing - Data Requests Made within the platform', 1, '2020-08...
-- Name: RecordElementDispositionChangeSimple -- Schema: posda_phi_simple -- Columns: [] -- Args: ['id', 'who', 'why', 'disp'] -- Tags: ['tag_usage', 'simple_phi', 'used_in_phi_maint'] -- Description: Private tags with no disposition with values in phi_simple insert into element_disposition_changed( element_seen_id,...
# Q8 # 查询至少有一门课与学号为"01"的同学所学相同的同学的信息 # 双重子查询 select s.* from Student as s where s.SId in ( # 获取同学课的学生的id select sc.SId from SC as sc where sc.CId in ( # 先把01同学学的课查出来 select sc.CId from SC as sc ...
<reponame>EPICKnowledgeSociety/rollup DROP TABLE IF EXISTS provers CASCADE;
INSERT INTO `category` (`id`, `name`, `icon`) VALUES (1, 'Перевод текстов', 'translate'), (2, 'Уборка', 'clean'), (3, 'Переезды', 'cargo'), (4, 'Компьютерная помощь', 'computer'), (5, 'Ремонт квартирный', 'roller'), (6, 'Ремонт техники', 'repair'), (7, 'Красота', 'hairdryer'), (8, 'Фото', 'camera');
/* * This file is used to test pull down of count(distinct) expression */ drop schema if exists distribute_count_distinct_part1 cascade; create schema distribute_count_distinct_part1; set current_schema = distribute_count_distinct_part1; -- prepare a temp table for import data create table tmp_t1(c1 int); insert int...
<filename>webtech_database.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 19, 2016 at 05:27 AM -- Server version: 10.1.10-MariaDB -- PHP Version: 5.6.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @O...
-- Intial system startup or restart /* SELECT * FROM do; SELECT * FROM do_do; SELECT * FROM do_class; SET search_path TO todos,public; */ --rollback transaction; abort; begin transaction; -- commit; -- abort; SET CONSTRAINTS ALL DEFERRED; ALTER TABLE do DISABLE TRIGGER USER; DELETE FROM do_do; ...
<gh_stars>0 USE ApressFinancial GO ALTER VIEW ShareDetails.v_CurrentShares AS SELECT TOP(100) ShareId, Description, StockExchangeTicker, CurrentPrice AS [Latest Price] FROM ShareDetails.Shares WHERE (CurrentPrice > 0) ORDER BY Description
CREATE TABLE [Reference].[BlankStatuses] ( [id] [bigint] NOT NULL, [gid] [uniqueidentifier] NOT NULL ROWGUIDCOL, [Name] [nvarchar](50) NOT NULL, [Code] [nvarchar](20) NOT NULL, [RecordSource] [nvarchar](128) NOT NULL, [LoadDateTime] [datetime2] NOT NULL, CONSTRAINT [PK_BlankStatuses_Id] PRIMARY KEY CLUST...
use my_db; # order by highest price. order id by smallest id if the price is same. select * from products order by price desc, id asc;
<filename>OR-M Data Entities/OR-M Data Entities.Tests.Database/dbo/Functions/GetLastName.sql -- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date, ,> -- Description: <Description, ,> -- ============================================= CREATE FUNCTION [dbo].[GetLastName]...
<reponame>sujanya001/mimic-code -- create a table which has fuzzy boundaries on hospital admission -- involves first creating a lag/lead version of disch/admit time with h as ( select subject_id, hadm_id, admittime, dischtime , lag (dischtime) over (partition by subject_id order by admittime) as dischtime_lag...
ALTER TABLE `events` ADD `outcome_index` INT NULL DEFAULT NULL AFTER `event_payout_offset_time`;
<gh_stars>1-10 INSERT INTO course.wp_comments (comment_ID, comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_karma, comment_approved, comment_agent, comment_type, comment_parent, user_id) VALUES (1, 1, 'A WordPress Comm...
insert into document_table (id, title, content, view_count, reg_date, edit_date) values (0, '자동완성', '', 0,CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); insert into document_table (id, title, content, view_count, reg_date, edit_date) values (1, '자동완성 익스플로러', '', 0,CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); insert into document_t...
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 80014 Source Host : 127.0.0.1:3306 Source Schema : erp-framework Target Server Type : MySQL Target Server Version : 80014 File Encoding : 65001 Date: 14/05/201...
<reponame>aalishov/School CREATE DATABASE ManyToMany; USE ManyToMany; CREATE TABLE students ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(30) NOT NULL ); CREATE TABLE exams ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(10) NOT NULL )AUTO_INCREMENT=101; CREATE TABLE students_exams ( s...
-- Set ScriptName update `gameobject_template` set ScriptName='go_merchant_square_door' where entry=195327;
<filename>cobweb/movie/movie.sql<gh_stars>0 CREATE TABLE IF NOT EXISTS movie ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT COMMENT 'id 自增', name VARCHAR(512) NOT NULL COMMENT '名称', movieInfo VARCHAR(1024) NOT NULL COMMENT '详情', star VARCHAR(512) DEFAULT...
ALTER TABLE meeting_participation ADD COLUMN expires_at timestamp;
-- Dropping and creating vds_groups view in order to contain the change DROP VIEW IF EXISTS vds_groups; SELECT fn_db_drop_column ('cluster', 'optional_reason'); SELECT fn_db_drop_column ('cluster', 'maintenance_reason_required'); CREATE VIEW vds_groups AS SELECT * FROM cluster;
drop procedure if exists int_unlink_role_actions; delimiter $$ create procedure int_unlink_role_actions(i_role_id int(10), i_actions_list text ) main_sql: begin declare v_sql_core text; set v_sql_core = concat('delete ura ', ' from user_role_actions ura ', ...
<reponame>abhijit-tilak/ctf-analytics<filename>usecases/Team4_Q2_Q3_CleanUpQueries.sql SELECT * FROM "PROD_CTF_RAW"."SRC_SF"."CTF_SF_ACCOUNT" LIMIT 100 -- Clean Billing country to be only Alpha.. Needs to be a Country code -- Import Country code master table -- Take care of Nulls SELECT COUNT(*), BILLINGCOUNTRY FROM "...
<gh_stars>0 /* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50547 Source Host : localhost:3306 Source Database : luluyii Target Server Type : MYSQL Target Server Version : 50547 File Encoding : 65001 Date: 2016-06-06 17:10:00 */ SET FOREIGN_KEY_CHE...
CREATE TABLE [dbo].[CustomerSearchTermType] ( [ID] INT IDENTITY (1, 1) NOT NULL, [Name] VARCHAR (100) NOT NULL, [Description] VARCHAR (4000) NOT NULL, [DisplayName] VARCHAR (100) NOT NULL, [DisplayOrder] INT NULL, [IsActive] BIT CONSTRA...
<gh_stars>0 INSERT INTO CATEGORY (CATEGORY_ID, GROUP_ID, NAME) VALUES (GEN_RANDOM_UUID(), ${ groupID }, ${ name }) RETURNING CATEGORY_ID, GROUP_ID, NAME;
<gh_stars>0 DELETE from user_preference Where quantum_id = 'API_TEST_USER'; DELETE from user_preference Where quantum_id = 'API_TEST_USER_OLD_P'; DELETE from user_preference Where quantum_id = 'API_TEST_USER_NP';
<reponame>zonafets/TSQL-Utils<gh_stars>0 /* leave this l:see LICENSE file g:utility v:120528\s.zaglio:wrapper for fn__str_unpattern */ CREATE proc sp__str_unpattern @blob ntext =null, @filter sysname =null, @opt sysname =null, @dbg int =0 as begin -- set nocount on added to pr...
<filename>sql/database.sql -- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64) -- -- Host: localhost Database: EventIt -- ------------------------------------------------------ -- Server version 5.7.21-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER...
create table ers_reimbursment_status ( reimb_status_id serial not null primary key, reimb_status varchar(10) not null ); create table ers_reimbursment_type ( reimb_type_id serial not null primary key, reimb_type varchar(10) not null ); create table ers_user_roles( ers_user_role_id serial not null primary key, u...
DROP INDEX "pathway_courses_pathway_id"; DROP INDEX "pathway_courses_course_id"; DROP TABLE "pathway_courses"; DROP TABLE "pathways";
<reponame>Palleas/massive-computing-machine<gh_stars>0 create table `characters` ( id INTEGER NOT NULL PRIMARY KEY, name VARCHAR(255) NOT NULL, description LONGTEXT, image VARCHAR(255) );
<filename>Dump20181016_pacientes.sql -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: citas_medicas -- ------------------------------------------------------ -- Server version 5.5.5-10.1.19-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET ...
<reponame>anrs07/Ordem-de-Servi-o-API CREATE TABLE IF NOT EXISTS `Produto_Servico` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `nome` VARCHAR(45) NULL, `desc` VARCHAR(45) NULL, `valor_atual` FLOAT NULL, `definicao` CHAR NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARACTER SET = utf8; ...
\i create-tables.sql
<filename>ciud.sql -- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : mer. 21 mars 2018 à 08:31 -- Version du serveur : 5.7.17 -- Version de PHP : 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00";...
USE [ANTERO] GO /****** Object: StoredProcedure [dw].[p_lataa_f_haku_ja_valinta_aloituspaikat_ja_pistemaarat] Script Date: 24.7.2018 15:55:54 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dw].[p_lataa_f_haku_ja_valinta_aloituspaikat_ja_pistemaarat] AS TRUNCATE TABLE dw.f_haku_ja_valint...
<filename>MultiPointtoLineFast.sql /* Script: MultiPointtoLineFast.sql Purpose: This script will take pairs of coordinates of the same line and convert them into a LineString that can be used to generate lines of the geometry data type. User will need to update the database, ta...
INSERT INTO t_form_show_field ( tuid, form_id, field_id, show_order, created, createdby, updated, updatedby, width, show_type, show_color, colspan, rowspan, item_id, is_mandatory, is_readonly, is_cascade_combo ) SELECT ${seq:nextval@${schema}seq_default}, ${form_id}, field_id, show_order, created, cre...
-- file:bit.sql ln:76 expect:true SELECT a,a<<4 AS "a<<4",b,b>>2 AS "b>>2" FROM varbit_table
<filename>src/test/resources/sql/alter_foreign_data/63e46b57.sql -- file:foreign_data.sql ln:87 expect:true ALTER FOREIGN DATA WRAPPER foo RENAME TO foo1
<filename>db/sql/helpers.sql create or replace function create_constraint_if_not_exists (s_name text, t_name text, c_name text, constraint_sql text) returns void as $body$ begin -- look for our constraint if not exists (select constraint_name from information_schema.key_column_usage ...
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 05, 2018 at 07:14 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...