sql
stringlengths
6
1.05M
<gh_stars>1-10  GO --ALTER ROLE [DataViewer] ADD MEMBER [User_DSCI]; GO ALTER ROLE [DataViewer] ADD MEMBER [DASPaymentROUser]; GO ALTER ROLE [DataProcessing] ADD MEMBER [DASPaymentRWUser]; GO
-- fts3b.test -- -- execsql { -- SELECT rowid FROM t1 WHERE c MATCH 'this'; -- } SELECT rowid FROM t1 WHERE c MATCH 'this';
<filename>schema/createTables.sql<gh_stars>100-1000 DROP TABLE ztc_database; CREATE TABLE ztc_database ( version integer ); INSERT INTO ztc_database VALUES (5); SELECT * FROM ztc_database; DROP TABLE ztc_network; CREATE TABLE ztc_network ( id text UNIQUE, creation_time timestamp, owner_id text, cap...
<reponame>lukealbao/postgres-rrule CREATE OR REPLACE FUNCTION _rrule.rruleset_array_has_before_timestamp(_rrule.RRULESET[], TIMESTAMP) RETURNS BOOLEAN AS $$ DECLARE item _rrule.RRULESET; BEGIN FOREACH item IN ARRAY $1 LOOP IF (SELECT count(*) > 0 FROM _rrule.before(item, $2) LIMIT 1) THEN RETURN true; ...
-- 2019-09-17T15:45:11.572Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process (AD_Client_ID,IsActive,Created,CreatedBy,Updated,IsReport,IsDirectPrint,AccessLevel,ShowHelp,IsBetaFunctionality,IsServerProcess,Classname,CopyFromProcess,UpdatedBy,JasperReport,AD_Process_ID,Value,Allow...
<reponame>mossnisse/Virtuella-Herbariet<filename>SQL/samhall_samlare.sql CREATE DATABASE IF NOT EXISTS `samhall` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `samhall`; -- MySQL dump 10.13 Distrib 5.5.16, for Win32 (x86) -- -- Host: 172.16.17.32 Database: samhall -- --------------------------------------------...
/* * Copyright 2014 CyberVision, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
use bryntum_scheduler go INSERT [dbo].[options] ([name], [value], [dt]) VALUES (N'revision', N'1', NULL) INSERT [dbo].Resources_Room default VALUES
<reponame>Ellisonac/SQL-Employee-Tracker<gh_stars>0 -- Create initial seed data USE employee_tracker_db; INSERT INTO departments(name) VALUES ('Engineering'), ('Sales'), ('Finance'), ('Production'); INSERT INTO roles(title, salary, department_id) VALUES ('Engineer',85000,1), ('Engineeeer',110000,1), ...
DROP FUNCTION IF EXISTS f_etf_etf0111_SR(text); CREATE OR REPLACE FUNCTION f_etf_etf0111_SR ( req_json text ) RETURNS TABLE ( total_count character varying ) AS $$ DECLARE req_item_code t_kw_tr40005.item_code%TYPE; req_trdd_from t_kw_tr40005.trdd%TYPE; req_trdd_to t_kw_tr40005.trdd%TYPE; BEGIN SE...
/********************************************************************************************************** NAME: Product Detail Page Views SYNOPSIS: Main metrics for basic ecommerce KPIs querying GA360 BigQuery export DEPENDENCIES: BigQuery Editor role (at least) AUTHOR: <NAME...
<gh_stars>0 USE Backbone; DROP TABLE IF EXISTS Config; CREATE TABLE Config ( Id INT(32) UNSIGNED NOT NULL AUTO_INCREMENT, InsertedTS timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, UpdatedTS TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, ApplicationId varchar(50) NOT NULL, Compon...
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50553 Source Host : localhost:3306 Source Database : yaoyue Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2017-10-14 21:28:05 */ SET FOREIGN_KEY_CHECKS=0; -- --...
Create View [EntityCode].[GovernmentInfo] As Select G.GovernmentId As [Id], G.GovernmentKey As [Key], G.GovernmentName As Name, G.CreatedDate, G.ModifiedDate From [Entity].[Government] G Where G.RecordStateKey <> '081C6A5B-0817-4161-A3AD-AD7924BEA874'
<gh_stars>1-10 /* * Copyright (c) 2011-2012 LabKey Corporation * * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 */ select * from ( SELECT a.id, a.status as StatusFromDemographicsTable, a.calculated_status as CalculatedStatus, a.birth as BirthFromDemograp...
<gh_stars>10-100 define column domain fk_column generate-foreign-key (constraint-name (alias-name || "_" || column-name || "_FK") pk-column-name(column-name regexp "(....).*" replace "$1_id") on delete cascade) ( number(15) );
-- start_ignore SET gp_create_table_random_default_distribution=off; -- end_ignore -- -- SYNC1 ALTER Schema name -- -- -- HEAP TABLE - SET TO NEW SCHEMA -- CREATE SCHEMA old_schema; CREATE SCHEMA new_schema; CREATE TABLE old_schema.sync1_heap_alter_table_schema1( text_col text, bigint_col bigint, char_vary_col cha...
<filename>saldo_awal_2020/dinkes/puskesmas/paringin_selatan/paringin_selatan_masuk.sql 517,9,0 539,10,0 562,499,0 575,251,0 664,60,0 681,200,0 475,952,0 699,1513,0 711,528,0 2505,1328,0 771,1,0 750,13,0 937,41,0 927,1005,0 941,27,0 5055,16,0 491,866,0 511,644,0 536,274,0 556,166,0 565,344,0 549,19,0 486,154,0 5060,2,0 ...
--TEST: [Merge Statement] 'System error (generate attr) in ../../src/parser/xasl_generation.c (line: 9557)' error occurs when there is pk violation in the insert_clause. autocommit on; drop table if exists t1; drop table if exists t2; --server side create table t1(id int primary key, name varchar(20) not null); crea...
CREATE OR REPLACE VIEW olympiad_box_session_vw AS SELECT line_vw.name AS line ,line_vw.gene AS gene ,line_vw.synonyms AS synonyms ,sv.id AS session_id ,sv.name AS session ,sv.experi...
--! Previous: sha1:bc6ce8856de8253945dda006e8f1704396c80149 --! Hash: sha1:b89807a916c11b253f57bf81196798da001b67a5 -- Enter migration here CREATE OR REPLACE FUNCTION public.before_invite_emails_insert() RETURNS trigger LANGUAGE plpgsql AS $$ begin if (NEW.status != 'QUEUED' and NEW.status != 'UNSUBSCRIB...
CREATE DATABASE sigmafacyt WITH ENCODING 'UTF8' owner "adminsigma"; \c sigmafacyt CREATE TABLE Roles( ROL_ID SERIAL PRIMARY KEY, Nombre VARCHAR(100) NOT NULL UNIQUE, Observaciones TEXT ); CREATE TABLE Permisos( Per_ID SERIAL PRIMARY KEY, Opcion VARCHAR(100) NOT NULL UNIQUE, Observaciones TEXT ); ...
<reponame>andey-robins/school SELECT adsrc FROM pg_attrdef WHERE adrelid = ( SELECT oid FROM pg_class WHERE relname = 'department' ) ;
INSERT INTO airport VALUES ('LKXB', 'KXB', N'Kobeřice International Airport'); INSERT INTO airport VALUES ('EDDF', 'FRA', 'Frankfurt Airport'); INSERT INTO airport VALUES ('KLAX', 'LAX', 'Los Angeles International Airport'); INSERT INTO airport VALUES ('OMDB', 'DXB', 'Dubai International'); INSERT INTO airport VALUES (...
<gh_stars>0 SET SERVEROUTPUT ON; /* basic loops structure: LOOP my_code EXIT [WHEN condition] END LOOP; */ DECLARE v_counter NUMBER(2) := 1; BEGIN LOOP IF v_counter MOD 2 = 0 THEN dbms_output.put_line('Even : ' || v_counter); ELSE dbms_o...
-- 1. Write a SQL query to find the names and salaries of the employees that take the minimal salary in the company. -- Use a nested SELECT statement. SELECT FirstName + ' ' + LastName Name, Salary FROM [TelerikAcademy].[dbo].[Employees] WHERE Salary = (SELECT MIN(Salary) FROM [TelerikAcademy].[dbo].[Employees]) ...
/* Number of Blocks, per day */ /* Total Number of Blocks */ /* num_blocks = 12107128 */ SELECT DATE_TRUNC('day', time) AS dt COUNT(*) AS num_blocks FROM ethereum."blocks" LIMIT 10 /* VISUALIZE Number of Blocks PER DAY */ /* earliest: 2015-07-30 - 6911 */ /* latest: 2021-03-23 - 6505 */ SELECT DATE_TRUNC('day', ...
<gh_stars>0 DO $$ DECLARE c_audit cursor for select * from audit_log where log_msg->>'msg_type' = 'get rss' and (log_msg->>'new_rss_items') is null for update; BEGIN for rec in c_audit loop update audit_log set log_msg = log_msg || jsonb '{"new_rss_items":-1}' where current of c_audit; end loop; ...
CREATE TABLE IF NOT EXISTS `character_shortcuts` ( `charId` INT UNSIGNED NOT NULL DEFAULT 0, `slot` decimal(3) NOT NULL DEFAULT 0, `page` decimal(3) NOT NULL DEFAULT 0, `type` decimal(3) , `shortcut_id` decimal(16) , `level` varchar(4) , `class_index` int(1) NOT NULL DEFAULT '0', PRIMARY KEY (`charId`,`...
<filename>AirlineDB/tests/flight_start_end.sql USE Airline1 GO -- Bir uçuşun başlangıç ve bitiş havaalanı kodlarını (kaç aktarma olursa olsun) bulan sql SELECT F.Flight_number, ( SELECT Start_leg.Departure_airport_code FROM FLIGHT_LEG as Start_leg WHERE Start_leg .Flight_no = F.Flight_number AND Start_leg.Leg_n...
<gh_stars>0 DROP FUNCTION IF EXISTS read_poultry_inspection; CREATE FUNCTION read_poultry_inspection ( IN user_id INT , IN id INT ) RETURNS SETOF poultry_inspections_readonly AS $body$ BEGIN IF permission_check_poultry_inspection(set_user_id(read_poultry_inspection.user_id), read_poultry_inspection.id) THEN RE...
CREATE PROCEDURE [dbo].[usp_sqlwatch_internal_broker_dialog_end] @cid uniqueidentifier as --the best way to end the conversation is to send a message to tell the target (receiving end) to end it instead of issuing END CONVERSATION from the initiator --this way we can be 100% sure that we have sent all the messa...
<gh_stars>0 CREATE ALGORITHM = UNDEFINED DEFINER = `root`@`localhost` SQL SECURITY DEFINER VIEW `view_product` AS SELECT `product`.`product_id` AS `product_id`, `view_sub_category`.`category_id` AS `category_id`, `view_sub_category`.`sub_category_id` AS `sub_category_id`, ...
--List all employees in the Sales department, including their employee number, last name, first name, and department name select employees.emp_no as employee_number, employees.last_name as employee_last_name, employees.first_name as employee_first_name, departments.dept_name as employee_dept from employees inner join ...
INSERT INTO javaee.user (username, email, grade, consumption, integration, status, password) VALUES ('island', '<EMAIL>', 4, 3124, 324, 1, '123456'); INSERT INTO javaee.user (username, email, grade, consumption, integration, status, password) VALUES ('island2', '<EMAIL>', 4, 0, 0, 1, '12345'); INSERT INTO javaee.user (...
<gh_stars>1-10 -- Adminer 4.2.4 MySQL dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; CREATE DATABASE `items_list` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `items_list`; DROP TABLE IF EXISTS `items`; CREATE TABLE `items` ( `id` int(11) NOT NULL ...
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[WebApplication]') AND type in (N'U')) BEGIN CREATE TABLE [dbo].[WebApplication]( [Id] [int] NOT NULL, [Name] [nvarchar](500) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [AppKey] [nvarchar...
<reponame>Sim-frpt/Jepsen-Brite<filename>DBBackup/DeventDB.sql<gh_stars>1-10 -- Adminer 4.7.1 PostgreSQL dump DROP TABLE IF EXISTS "events" CASCADE; DROP SEQUENCE IF EXISTS events_id_seq; CREATE SEQUENCE events_id_seq INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1; CREATE TABLE "public"."events"...
<gh_stars>1-10 # https://leetcode.com/problems/user-activity-for-the-past-30-days-ii/ SELECT round(ifnull(avg(average_sessions_per_user),0.00),2) as average_sessions_per_user FROM (SELECT count(distinct session_id) as average_sessions_per_user FROM Activity WHERE activity_date between date_sub('2019-07-27', IN...
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!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 utf8mb4 */; CR...
SELECT date_trunc_ymd(trip_start_timestamp) as ymd, pickup_community_area, dropoff_community_area, count(1) as n_trips, sum(case( trips_pooled > 1, 1, shared_trip_authorized, 1, true, 0 )) as n_trips_pooled_authorized, sum(case( trips_pooled > 1, 1, ...
<gh_stars>1-10 /* @name Signup */ INSERT INTO accounts (id, username, email, password, created_at) VALUES(:id, :username, :email, digest(:password::text, 'sha256'), :createdAt); /* @name initialAccountSettings */ INSERT INTO account_settings(id, account_id) VALUES(:id, :accountId); /* @name initialAccountEmailSetting...
<gh_stars>1-10 CREATE TABLE [dbo].[ContactLogs]( [DateTime] [datetime2](7) NOT NULL, [UserId] [uniqueidentifier] NOT NULL, [ContactId] [uniqueidentifier] NOT NULL, [ContactLogType] [nvarchar](50) NOT NULL, [ContactLogDetails] [nvarchar](max) NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO
<reponame>Kcjohnson/SCGP WITH selected_samples AS ( SELECT tumor_barcode_a AS aliquot_barcode, pair_barcode FROM analysis.diamond_set ds INNER JOIN analysis.pairs pa ON pa.tumor_barcode = ds.tumor_barcode_a UNION SELECT tumor_barcode_b AS aliquot_barcode, pair_barcode FROM analysis.diamond_set ds INNER JOIN analys...
if object_id('dbo.SearchCascadeByFK', 'P') is null exec(N'CREATE PROC dbo.SearchCascadeByFK AS RETURN;') go --exec dbo.SearchCascadeByFK 'dbo.Catalog', @debug = 1 --two part naming convention ALTER PROC dbo.SearchCascadeByFK @table sysname -- use two part name convention , @lvl int=0 -- do not change , @ParentTable...
<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Feb 18, 2020 at 11:32 AM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.1.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /...
DROP TABLE accepted_blocks;
update acs_objects set title = (select msg_type_name from acs_sc_msg_types where msg_type_id = object_id) where object_type = 'acs_sc_msg_type'; update acs_objects set title = (select contract_name from acs_sc_contracts where contract_id = object_id) where object_typ...
select sum(lo_revenue), d_year, p_brand1 from lineorder, date, part, supplier where lo_orderdate = d_datekey and lo_partkey = p_partkey and lo_suppkey = s_suppkey and p_brand1 between 'MFGR#2221' and 'MFGR#2228' and s_region = 'ASIA' group by d_year, p_brand1 order by d_year, ...
--Insert into concept_manual and concept_relationship_manual --==================================== -- concept_manual --==================================== -- Use current_date for valid_start_date, always show date format after valid_end_date e.g. 'yyyymmmdd' -- In case if you need to insert more, than one concept us...
<gh_stars>0 {{ config( materialized='table' ) }} with int_products_promos as ( SELECT product.product_name, promo.promo_code, promo.promo_status, count(distinct(product.product_id)) as number_of_products, sum(product.product_price) as sum_product_price, sum(product.product_quantit...
<gh_stars>0 -- 1_copy_from_guests.sql -- Copy data from "guests" database to CSV files. -- NOTE: leave out facility_id and level on users. -- NOTE: facilities.zipCode needs special treatment. \copy access_tokens (id, expires, scope, token, user_id) TO 'access_tokens.csv' CSV; \copy checkins (id,checkin_date,comments,f...
CREATE DATABASE IF NOT EXISTS petclinic; ALTER DATABASE petclinic DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; GRANT ALL PRIVILEGES ON petclinic.* TO pc@localhost IDENTIFIED BY 'pc'; USE petclinic; CREATE TABLE IF NOT EXISTS vets ( id INT ( 4 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY...
<gh_stars>10-100 SELECT "$a" FROM t
CREATE TABLE "FIXCOLL" ( "ATTRIBUTE_VALUE" VARCHAR2(100), "NEW_ATTRIBUTE_VALUE" VARCHAR2(100) )
<reponame>uoregon-libraries/newspaper-curation-app -- +goose Up -- SQL in section 'Up' is executed when this migration is applied -- Metadata review rejection ALTER TABLE `issues` ADD `rejection_notes` TINYTEXT COLLATE utf8_bin; ALTER TABLE `issues` ADD `rejected_by_user_id` INT(11); -- +goose Down -- SQL section 'Do...
<gh_stars>10-100 ALTER TABLE "public"."MediaLiveChannel" DROP COLUMN "conferenceId";
<gh_stars>0 -- @testpoint:opengauss关键字localtime(保留),作为模式名 --关键字不带引号-合理报错 drop schema if exists localtime; create schema localtime; --关键字带双引号-成功 drop schema if exists "localtime"; create schema "localtime"; --清理环境 drop schema "localtime"; --关键字带单引号-合理报错 drop schema if exists 'localtime'; create schema 'localtime'; ...
CREATE TABLE IF NOT EXISTS default.drivers ( timestamp DateTime, driver String, state String ) ENGINE = MergeTree() PARTITION BY toYYYYMM(timestamp) ORDER BY (driver, timestamp) SETTINGS index_granularity = 8192; ALTER TABLE default.drivers DELETE WHERE 1=1
<reponame>hmcts/rd-location-data-load alter table court_district_family_jurisdiction_assoc drop CONSTRAINT dfj_court_location_id_fk; alter table court_district_family_jurisdiction_assoc drop CONSTRAINT dfj_court_district_family_jurisdiction_id_fk; alter table court_district_civil_jurisdiction_assoc drop CONSTRAINT dcj...
INSERT INTO departments (name) VALUES ("Legal"), ("Sales"), ("Engineering"), ("Finance"), ("Management"); INSERT INTO roles (job, salary, dep_id) VALUES ("Lawyer", 95000, 1), ("Salesman", 70000, 2), ("Engineer", 100000, 3), ("Financial Advisor", 84000, 4), ("Chief Legal Officer", 150000, 1), ("Chief Sales Officer", 95...
SELECT AVG(energy) FROM songs ;
<gh_stars>0 -------------------------------------------------------------------------------- -- Document -------------------------------------------------------------------- -------------------------------------------------------------------------------- CREATE OR REPLACE VIEW Document (Id, Object, Entity, EntityCod...
/* COM236 SQL - Knowledge Verification Labs 2 - INSERT Pre-configure database for lab 2 exercises. WARNING: this file will delete the `HandSanitiserLevels` database before recreating it. */ /*** Create database ***/ -- Create a new database called 'HandSanitiserLevels' -- Connect to the 'master' database to ru...
INSERT INTO department (name) VALUES ("engineering"), ("finance"), ("marketing"), ("sales"); SELECT * FROM DEPARTMENT; INSERT INTO roles (title, salary, department_id) VALUES ("Software Engineer", 120000, 1), ("Project Manager", 90000, 1), ("Engineering Manager", 225000, 1), ("Accountant", 700...
-- -------------------------------------------------------- -- -- Table structure for table `roles` -- CREATE TABLE IF NOT EXISTS `roles` ( `id` int(11) NOT NULL AUTO_INCREMENT, `parent_id` int(11) NOT NULL DEFAULT '0', `name` varchar(50) NOT NULL, `description` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`...
SET DEFINE OFF; CREATE UNIQUE INDEX AFW_25_THEME_SUBST_PK ON AFW_25_THEME_SUBST (SEQNC) LOGGING /
<filename>bbdd/bbdd.sql -- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1:3306 -- Tiempo de generación: 21-05-2018 a las 20:18:12 -- Versión del servidor: 5.7.19 -- Versión de PHP: 7.1.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET ti...
UPDATE creature_template SET ScriptName='npc_hungry_nether_ray' WHERE entry=23439;
<reponame>maltsavkiryl/stamhoofd ALTER TABLE `payments` ADD COLUMN `freeContribution` int NULL COMMENT '';
INSERT INTO Language (Code, Name,NativeName,Code1,Code2T,Locale) VALUES ('abk','Abkhaz','аҧсуа бызшәа, аҧсшәа','ab','abk','ab'), ('aar','Afar','Afaraf','aa','aar','aa'), ('afr','Afrikaans','Afrikaans','af','afr','af'), ('aka','Akan','Akan','ak','aka','ak'), ('alb','Albanian','gjuha shqipe','sq','sqi','sq'), ('amh','Amh...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 25-Nov-2019 às 22:48 -- Versão do servidor: 10.1.40-MariaDB -- versão do PHP: 7.3.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
-- update feature table alter table public.feature add column sta_identifier varchar(255); update public.feature set sta_identifier = feature_id; alter table public.feature alter column sta_identifier set not null; -- update datastream table alter table public.datastream add column sta_identifier varchar(255); update ...
<filename>admin/schema_changes/8.sql BEGIN; ALTER TABLE revision ALTER COLUMN text DROP NOT NULL; ALTER TABLE revision ADD COLUMN rating SMALLINT; ALTER TABLE revision ADD CONSTRAINT revision_rating_check CHECK (rating >= 0 AND rating <=100); ALTER TABLE revision ADD CONSTRAINT revision_text_rating_both_not_null_tog...
<reponame>qiuhere/Bench update web_page set wp_rec_end_date = sysdate where wp_web_page_id in (select wp_web_page_id from webv) and wp_rec_end_date is NULL; insert into web_page (select * from webv);
<reponame>Zhaojia2019/cubrid-testcases create table t1 (col1 decimal(6,5),col2 int); insert into t1 values (1.001, 1); insert into t1 values (2.001, 2); select /*+ recompile */ * from t1 where col1> 1.001; create index i_t1_all on t1(col1,col2); select /*+ recompile */ * from t1 where col1> 1.001; drop table t1;
DELETE FROM `pricatdb`.`Products` WHERE Id >= 0; ALTER TABLE `pricatdb`.`Products` AUTO_INCREMENT = 1; INSERT INTO `pricatdb`.`Products` (`CategoryId`, `EanCode`, `Description`, `Unit`, `Price`) VALUES ( 1, '7707548516286', 'Arroz', 'Lb', 500.00); INSERT INTO `pricatdb`.`Products` (`CategoryId`, `EanCode`, `Description...
<reponame>Illya1074/twitter-clone -- CreateTable CREATE TABLE "Like" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "authorId" INTEGER );
/* Warnings: - You are about to drop the column `addressId` on the `Delivery` table. All the data in the column will be lost. - You are about to drop the column `arrivedAt` on the `Delivery` table. All the data in the column will be lost. - You are about to drop the column `deliveredAt` on the `Delivery` table...
CREATE TABLE translation_tbl ( id bigint NOT NULL, version bigint NOT NULL DEFAULT 1, createdwhen timestamp without time zone NOT NULL DEFAULT now(), modiwhen timestamp without time zone NOT NULL DEFAULT now(), word_from_id bigint ...
CREATE TABLE [dbo].[SFN_204_ProjctMatches] ( [Accession] CHAR (7) NULL, [Project] VARCHAR (24) NULL, [Chart] VARCHAR (2) NULL, [Account] VARCHAR (7) NULL, [OpFund] VARCHAR (6) NULL, [AwardNumbersDiffer] BIT ...
INSERT INTO `admins` (`id`, `fname`, `lname`, `image_path`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 'ali', 'reza', 'templates/melody/images/faces/face5.jpg', '<EMAIL>', '2020-07-21 15:00:00', '$2y$10$D3DZKKJJ/g8ouwNsxhT8G.0KB3sEqx8k0Ql/lv3WTrhwjhCFRRANC', NULL,...
<filename>sdweb_fpw_afast.sql DECLARE -- EXPORTAR ARQUIVO DE AFASTAMENTO /* ********************************************************************************************************************** HISTÓRICO DE ATUALIZAÇÕES Analista Sistemas Analista Negocios Data comentários <NAME> ...
create table users ( username varchar(50) not null primary key, password varchar(50) not null, enabled boolean not null ) engine = InnoDb; create table authorities ( username varchar(50) not null, authority varchar(50) not null, foreign key (username) references users (username), unique ind...
select P.ProductID, P.ProductName, P.ProductDesc, P.Price,C.CategoryID,C.CategoryName from Product P inner join Category C on P.CategoryID = C.CategoryID Create proc UpdateProduct @ProductID int, @ProductName nvarchar(50), @ProductDesc nvarchar(500), @Price decimal(6,2), @CategoryID int as Update Product set ProductN...
<gh_stars>10-100  --Цель: анализ свободного места в БД --Автор: <NAME>. - АБД --Дата создания: 10.08.2015 CREATE procedure [srv].[DB_USE_DATASPACE] @DATABASE nvarchar(255)=N'' as begin set nocount on; set xact_abort on; begin try --Цель: анализ свободного места в БД DECLARE @SQL nvarchar(max)=N''; IF...
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for jtbc_aboutus -- ---------------------------- DROP TABLE IF EXISTS `jtbc_aboutus`; CREATE TABLE `jtbc_aboutus` ( `a_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '{"manual":"true"}', `a_topic` varchar(200) DEFAULT NULL COMMENT '{"autoReq...
<filename>db/migrate/000247_pexcard_action.sql ALTER TABLE `pexcard_action` ADD `status` enum('scheduled','processing','done','error') DEFAULT NULL; ALTER TABLE `pexcard_action` ADD `status_date` DATETIME DEFAULT NULL; ALTER TABLE `pexcard_action` ADD `tries` INT DEFAULT 0;
<filename>src/test/resources/sql/explain/e95e3da4.sql<gh_stars>10-100 -- file:select_parallel.sql ln:77 expect:true explain (costs off) select * from (select count(unique1) from tenk1 where hundred > 10) ss right join (values (1),(2),(3)) v(x) on true
<filename>install/database.sql CREATE TABLE IF NOT EXISTS `pdodrop` ( `id` int(55) NOT NULL AUTO_INCREMENT, `type` varchar(255) NOT NULL, `dt1` text NOT NULL, `dt2` text NOT NULL, `dt3` text NOT NULL, `dt4` text NOT NULL, `ref` varchar(255) NOT NULL, `crdate` varchar(11) NOT NULL, `crhour` va...
<gh_stars>10-100 DELETE FROM permissions_roles; DELETE FROM permissions; DELETE FROM users_roles; DELETE FROM roles; DELETE FROM contacts; DELETE FROM addresses; DELETE FROM users; INSERT INTO permissions(id, permission, note) VALUES (1, 'LOGIN', 'User Login'); INSERT INTO permissions(id, permission, note) VALUES (2...
-- tous les champs de la table actor select * from actor; -- noms et prénoms de tous les acteurs select first_name, last_name from actor; -- tous les champs de la table film select * from film; -- titre et année de sortie de tous les films select title, release_year from film;
<reponame>chandanchowdhury/ISUCDC2017<gh_stars>0 -- -- Comment Meta Language for sql upgrades: -- -- Each section within an upgrade sql file is enveloped with an #If*/#EndIf block. At first glance, these appear to be standard mysql -- comments meant to be cryptic hints to -other developers about the sql goodness c...
<reponame>kevin-at-datical/liquibase-test-harness ALTER TABLE LBUSER.posts ADD CONSTRAINT fk_posts_authors_test FOREIGN KEY (author_id) REFERENCES LBUSER.authors (id) ON DELETE CASCADE ALTER TABLE LBUSER.posts DROP CONSTRAINT fk_posts_authors_test
<reponame>NgurahPrihandana/jktrans_prihandana<filename>database/tb_pengiriman.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 02, 2021 at 01:30 PM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_...
<reponame>markash/management CREATE TABLE PartyName ( LabelledByPartyId BIGINT NOT NULL , Name VARCHAR(256) NOT NULL , PartyNameType VARCHAR(128) NOT NULL , IssuedByPartyId BIGINT , Comment VARCHAR(256) , Efd TIMESTAMP NOT NULL , Etd TIMESTAMP , CONSTRAINT PARTY_NAME_PK PRIMARY KEY...
-- BP 6.1D content: domain syschar: 3 INSERT INTO S_DOM VALUES (4300000, 'reflexive', 'This domain tests reflexive relationships - all of them. To wit (where the middle digit is an associative object): - 1:1 - 1:m - 1:1:1 - 1:M:1 - 1:1:M - 1:M:M - M:M:M - M:1:M Each of these arrangements is...
create table task_child_task (task_id int8 not null, child_task_id int8 not null, primary key (task_id, child_task_id)); create table task_runs (id bigserial not null, endDate timestamp, stackTrace text, startDate timestamp, status varchar(255), sysErr text, sysOut text, taskId int8 not null, version int4 not null, pr...
<reponame>Carroll-guogaoqin/ssm<filename>SSMProject/sql/customer.sql /* Navicat MySQL Data Transfer Source Server : itlike Source Server Version : 50720 Source Host : localhost:3306 Source Database : mybatis Target Server Type : MYSQL Target Server Version : 50720 File Encoding : 6...
<gh_stars>1-10 /* Navicat Premium Data Transfer Source Server : testAli Source Server Type : MySQL Source Server Version : 80016 Source Host : rm-wz971ui03hdi94s1cao.mysql.rds.aliyuncs.com:3306 Source Schema : dealate Target Server Type : MySQL Target Server Version : 80016 Fi...