sql
stringlengths
6
1.05M
ALTER TABLE auctions RENAME COLUMN tokenImage TO tokenMetaData;
use tip_wlan_keyspace; -------------------------------------------------------------------------------- -- Operations on client -------------------------------------------------------------------------------- insert into client (customerId, macAddress, createdTimestamp, lastModifiedTimestamp, details) values ( 1, 1,...
<gh_stars>0 -- @testpoint: opengauss关键字min非保留),作为索引名,部分测试点合理报错 --前置条件,创建一个表 drop table if exists explain_test; create table explain_test(id int,name varchar(10)); --关键字不带引号-成功 drop index if exists min; create index min on explain_test(id); drop index min; --关键字带双引号-成功 drop index if exists "min"; create index "min" o...
<reponame>MonoBan/spring-security-hsql INSERT INTO role VALUES (1,'ADMIN');
CREATE TABLE "user" ( "id" INTEGER NOT NULL, "username" VARCHAR(32) NOT NULL UNIQUE, "email" VARCHAR(120) NOT NULL UNIQUE, "image_file" VARCHAR(255), "password" VARCHAR(255), "is_shipper" VARCHAR(8), "location_id" INTEGER, PRIMARY KEY("id") ); CREATE TABLE "player" ( "id" INTEGER NOT NULL, ...
declare f utl_file.file_type; line varchar2(1000); id donar.donar_id%type; name donar.donar_name%type; bd_grp donar.blood_group%type; contact donar.donar_contact_no%type; loc donar.donar_address%type; BEGIN f := utl_file.fopen('BBMS', 'entries.csv', 'r'); if utl_file.isopen(f) then loop begin ut...
<reponame>Julien-Treuschel/TENFLIX<gh_stars>0 drop database if exists tenflix_sql; Create database tenflix_sql default character set UTF8 collate UTF8_general_ci; Use tenflix_sql; SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_S...
-- A. Seleções Simples -- 1) Mostrar todos os dados da tabela Equipas; Select * From Equipas; -- 2) Mostrar todos os dados da equipa com o id igual a 12; Select * From Equipas Where id_equipa = 12; -- 3) Mostrar o id e o nome de todas as equipas; Select equipas.id_equipa, equipas.nome From equipas; -- 4) Mostrar o id, ...
<reponame>abayakturin/wellness conn dws/dws@orcl set serveroutput on create or replace PROCEDURE load_dw_emp IS dcnt NUMBER; icnt NUMBER; err_code NUMBER; err_msg VARCHAR2(32000); BEGIN dcnt := 0; icnt := 0; for c in (select * from stg_dw_emp) loop delete from dw_emp where empno=c.empno and park_id=c.park_i...
-- Verify database-registration-view-data:tables/registrations on pg BEGIN; SELECT "registration_id", "user_id", "email_address", "is_email_rejected", "is_registered", "global_position", "created_at" FROM "registration"."registrations" WHERE FALSE; ROLLBACK;
------------------------------------------------------------------------------------------------------------------------ -- <NAME> - 19.07.2018 -- license:mit ------------------------------------------------------------------------------------------------------------------------ CREATE SCHEMA [Life] GO CREATE TABLE [L...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 25, 2020 at 07:23 AM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
<filename>predavanje09/SQL14.sql<gh_stars>0 -- AUTO INCREMENT USE sii; -- prvo brisemo primary key ALTER TABLE students DROP PRIMARY KEY; -- sada dodajemo primary key ALTER TABLE students ADD CONSTRAINT PK_Students PRIMARY KEY(StudentID); ALTER TABLE students MODIFY COLUMN StudentID int AUTO_INCREMENT;
-------------------------------------------------------- -- DDL for Table CFTIMESTAMPS -------------------------------------------------------- CREATE TABLE "GROUNDFISH"."CFTIMESTAMPS" ( "ID" NUMBER(2,0), "PROCEDURE" VARCHAR2(35 BYTE), "TIMESTAMP" DATE ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCO...
-- -- PostgreSQL database dump -- -- Dumped from database version 9.6.2 -- Dumped by pg_dump version 9.6.2 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min...
<filename>src/alternative_queries/print_prime_numbers.sql SET @NUMBER = 1; SET @DIVISOR = 1; SELECT GROUP_CONCAT(N SEPARATOR '&') FROM ( SELECT @NUMBER := @NUMBER + 1 AS N FROM INFORMATION_SCHEMA.TABLES AS T1, INFORMATION_SCHEMA.TABLES AS T2 LIMIT 1000 ) AS N1 W...
<filename>sql/database.sql CREATE DATABASE IF NOT EXISTS sil2ah; USE sil2ah; CREATE TABLE settings ( name VARCHAR(255) PRIMARY KEY, value VARCHAR(255) ); CREATE TABLE persons ( uuid CHAR(36) PRIMARY KEY, name VARCHAR(255), gender ENUM('M', 'F'), father CHAR(36), mother CHAR(36), sibli...
-- Volcando estructura para tabla secundaria.alumno CREATE TABLE IF NOT EXISTS `alumno` ( `matricula` varchar(9) CHARACTER SET utf8 COLLATE utf8_spanish_ci NOT NULL, `nom` varchar(40) CHARACTER SET utf8 COLLATE utf8_spanish_ci DEFAULT NULL, `app` varchar(20) CHARACTER SET utf8 COLLATE utf8_spanish_ci DEFAULT NU...
<filename>old_install/assets/database.sql CREATE TABLE IF NOT EXISTS `{prefix}forum_category` (`id` int(11) NOT NULL AUTO_INCREMENT,`category_title` varchar(255) NOT NULL,`category_desc` varchar(255) NOT NULL,`category_place` int(11) NOT NULL DEFAULT '0',PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_IN...
<filename>_migrations/001_service_table.up.sql<gh_stars>1-10 /* * Create service Table */ -- ---------------------------- -- Ensure uuid-ossp is enabled -- ---------------------------- CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -- ---------------------------- -- Table structure for service -- -------------------...
DROP TABLE IF EXISTS `XXX_papoo_keywords_liste`; ##b_dump## DROP TABLE IF EXISTS `XXX_papoo_keywords_tabelle`; ##b_dump##
<reponame>flexsocialbox/una SET @sName = 'bx_forum'; -- STORAGES & TRANSCODERS UPDATE `sys_objects_storage` SET `ext_mode`='allow-deny', `ext_allow`='jpg,jpeg,jpe,gif,png', `ext_deny`='' WHERE `object`='bx_forum_covers';
CREATE TABLE `request_updates` ( `id` int(11) NOT NULL AUTO_INCREMENT, `report_id` int(11) NOT NULL, `status_id` int(11) NOT NULL, `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `update_desc` text, `old_status_id` int(11) DEFAULT NULL, `changed_by` int(11), PRIMAR...
<reponame>warmoil/JavaFx -- MariaDB dump 10.17 Distrib 10.4.12-MariaDB, for Win64 (AMD64) -- -- Host: localhost Database: thecheat -- ------------------------------------------------------ -- Server version 10.4.12-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTE...
<reponame>konglanxin/twu-biblioteca-konglanxin<filename>Sql_exercise.sql 1.Who checked out the book 'The Hobbit’? sql:SELECT m.name FROM Book b, Checkout_item c, Member m WHERE b.TITLE="The Hobbit" AND c.book_id = b.id AND m.id = c.member_id; 2.How many people have not checked out anything? sql:SELECT COUNT(*) from Mem...
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50635 Source Host : localhost:3306 Source Schema : test Target Server Type : MySQL Target Server Version : 50635 File Encoding : 65001 Date: 01/05/2019 18:11...
BEGIN; DROP INDEX IF EXISTS intrusion_time; DROP INDEX IF EXISTS intrusion_operation; DROP INDEX IF EXISTS intrusion_priority; CREATE INDEX intrusion_time ON intrusion (time); CREATE INDEX intrusion_operation ON intrusion (operation); CREATE INDEX intrusion_priority ON intrusion (priority); COMMIT;
<reponame>VictorGMBraga/clowdr DROP INDEX IF EXISTS "VonageSessionLayout_conferenceId";
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA = 'BaseStation' AND ROUTINE_NAME = 'Flights_Upsert') BEGIN EXECUTE sys.sp_executesql N'CREATE PROCEDURE [BaseStation].[Flights_Upsert] AS BEGIN SET NOCOUNT ON; END;'; END; GO ALTER PROCEDURE [BaseStation].[Flights_Upsert] @Bul...
<gh_stars>0 DELIMITER $$ DROP PROCEDURE IF EXISTS Delete_Choice$$ CREATE PROCEDURE Delete_Choice (IN ch_qs_id INT(11), IN ch_no INT(11)) BEGIN DELETE FROM choice WHERE choice.ch_qs_id = ch_qs_id AND choice.ch_no = ch_no; END$$ DELIMITER ;
select codelist, codelist_value, count(codelist_value) from rolecodes group by codelist, codelist_value order by codelist, codelist_value;
<reponame>diosurandito/sales_cpf -- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 17 Mar 2020 pada 05.45 -- Versi server: 10.4.11-MariaDB -- Versi PHP: 7.3.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "...
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 08, 2019 at 04:01 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<reponame>CephHunter/Data-banken-en-webtechnologie SELECT genre_id FROM genres WHERE genre_name = ?
<reponame>unique211/dootell<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 06, 2019 at 05:49 AM -- Server version: 10.3.15-MariaDB -- PHP Version: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET ...
CREATE TABLE list (id VARCHAR(64) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; INSERT INTO `list` (`id`, `value`) VALUES ('af', 'Afrikaans'); INSERT INTO `list` (`id`, `value`) VALUES ('af_NA', 'Afrikaans (Namibia)'); INSERT INTO `list` (`id...
DECLARE @Counter INT; SET @Counter =0; WHILE @Counter <= 10 BEGIN PRINT 'INSIDE WHILE LOOP '; SET @Counter = @Counter +1; END; PRINT 'DONE WHILE LOOP'; GO
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 1192.168.127.12 -- Generation Time: Sep 02, 2021 at 12:03 PM -- Server version: 10.4.16-MariaDB -- PHP Version: 7.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SE...
CREATE TABLE IF NOT EXISTS `grandboss_list` ( `player_id` decimal(11,0) NOT NULL, `zone` decimal(11,0) NOT NULL, PRIMARY KEY (`player_id`,`zone`) );
/* Exercicios da Aula 12 OBS: de acordo com a sequencia */ #1 select nome from gafanhotos where sexo = 'F' order by nome; #2 select * from gafanhotos where nascimento between '2000-01-01' and '2015-12-31' order by nascimento; #3 select nome from gafanhotos where profissao = 'Programador' and sexo = 'M' order by no...
drop table if exists GL_CODE_TRANSFER_DEF; /*==============================================================*/ /* Table: GL_CODE_TRANSFER_DEF */ /*==============================================================*/ create table GL_CODE_TRANSFER_DEF ( SEQ_NO varchar(50) not null...
--liquibase formatted sql --changeset artemov_i:AuthShowRole.sql dbms:postgresql runOnChange:true splitStatements:false stripComments:false INSERT INTO s_mt.t_query (ck_id,cc_query,ck_provider,ck_user,ct_change,cr_type,cr_access,cv_description) VALUES ('AuthShowRole','/*AuthShowRole*/ select /*Pagination*/ count...
CREATE TABLE [dbo].[TeamScores] ( [TeamId] INT NOT NULL, [Value] INT NOT NULL CONSTRAINT [DF_dbo.TeamScores_Value] DEFAULT 0, CONSTRAINT [PK_dbo.TeamScores] PRIMARY KEY CLUSTERED ([TeamId] ASC), CONSTRAINT [FK_dbo.TeamScores_dbo.Teams] FOREIGN KEY([TeamId]) REFERENCES [dbo].[Teams] ([Id]) ON DELETE CA...
USE [demosource] GO /****** Object: Table [dbo].[tblMetaDemo] Script Date: 8/29/2020 11:35:01 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[tblMetaDemo]( [UUID] [nchar](36) NOT NULL, [Id] [nchar](36) NOT NULL, [Version] [nchar](10) NOT NULL, [Type] [nchar](10) NOT NULL, [De...
<filename>src/test/resources/randexpr1.test_1370.sql<gh_stars>100-1000 -- randexpr1.test -- -- db eval {SELECT case when not exists(select 1 from t1 where t1.c not in (t1.d,17,t1.c | coalesce((select t1.f from t1 where t1.c*t1.c-t1.e not in (t1.e*(case when (f) not between c and +f then (a) else t1.e end)+17,13, -((t1...
-- file:groupingsets.sql ln:276 expect:true select array_agg(v order by v) from gstest4 group by grouping sets ((id,unsortable_col),(id))
/* Listar todos los datos de los países cuya independencia haya ocurrido a partir de la segunda mitad del siglo XIX y su forma de gobierno sea una monarquía constitucional. (Se esperan 15 columnas y 20 registros). */ SELECT * FROM world.country WHERE (country.IndepYear >= 1850 AND country.Governm...
SELECT CURRENT_TIME; SELECT CURRENT_TIME(2);
<gh_stars>10-100 USE master GO /* Drop the database containing our sprocs */ IF DB_ID('ASPState') IS NOT NULL BEGIN DROP DATABASE ASPState END GO /* Drop temporary tables */ IF OBJECT_ID('tempdb..ASPStateTempSessions','U') IS NOT NULL BEGIN DROP TABLE tempdb..ASPStateTempSessions END GO IF OBJ...
<filename>docker/dev/iotus-populate-user.cql /** * Populate user table with two users: <EMAIL> and <EMAIL> * This will overwrite user records if they already exist. To run: cqlsh localhost -k {keyspace} < db/iotus-populate-user.cql or cqlsh IP_ADDRESS -k {keyspace} < db/iotus-populate-user.cql */ -- --------...
DROP PROCEDURE IF EXISTS guests.create_order; DELIMITER $$ CREATE PROCEDURE guests.create_order ( IN in_session_id BINARY(16) , IN in_delivery_cost_id TINYINT ) BEGIN DECLARE var_order_total_price DECIMAL(13,2); DECLARE var_order_total_vat DECIMAL(13,2); DECLARE var_order_delivery_cost DECIMAL(9,2); DECLARE var_...
<reponame>Ed-Fi-Alliance-OSS/Ed-Fi-MigrationUtility -- SPDX-License-Identifier: Apache-2.0 -- Licensed to the Ed-Fi Alliance under one or more agreements. -- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. -- See the LICENSE and NOTICES files in the project root for more information....
CREATE DATABASE IF NOT EXISTS test; DROP TABLE IF EXISTS test.defaults; CREATE TABLE IF NOT EXISTS test.defaults ( param1 Float64, param2 Float64, target Float64, predict1 Float64, predict2 Float64 ) ENGINE = Memory; insert into test.defaults values (-3.273, -1.452, 4.267, 20.0, 40.0), (0.121, -0.61...
<gh_stars>0 DROP TABLE `tbl_todos`;
<gh_stars>0 CREATE TABLE strategies ( created_at timestamp default now(), name varchar(255) PRIMARY KEY NOT NULL, description text ); CREATE TABLE features ( created_at timestamp default now(), name varchar(255) PRIMARY KEY NOT NULL, enabled integer default 0, strategy_name varchar(255), parameters jso...
-- ====================================================== -- Stored Procedure: OPM.BatchMainframeImportInsert -- -- Description: this store procedure will perform batch main frame import insert operation. -- -- IN parameters : -- @pRecordString - the record string. -- @pImportDate - the import date. -- @pACHFlag - th...
-- phpMyAdmin SQL Dump -- version 4.1.6 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 04, 2014 at 10:36 AM -- Server version: 5.6.16 -- PHP Version: 5.5.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
insert into product_ref(name, price, description) VALUES ( 'Phone XL', 799, 'A large phone with one of the best screens'), ('Phone Mini', 699, 'A great phone with one of the best cameras'), ('Phone Standard', 299, '' );
ALTER TABLE named_secret ADD COLUMN version_created_at BIGINT(20); UPDATE named_secret SET version_created_at = updated_at; ALTER TABLE named_secret MODIFY COLUMN version_created_at BIGINT(20) NOT NULL; ALTER TABLE named_certificate_authority ADD COLUMN version_created_at BIGINT(20); UPDATE named_certificate_au...
<reponame>arbullzhang/zero-admin<gh_stars>100-1000 create table ums_member_statistics_info ( id bigint auto_increment primary key, member_id bigint null, consume_amount decimal(10, 2) null comment '累计消费金额', order_count int null c...
INSERT INTO `user` VALUES ('1', '4', 'admin', '<PASSWORD>', 'c1d69267a3fd2e207408b68f8662cf27', '管理员', '<EMAIL>', '123456789', '1', 'sa', '2015-01-05 17:38:50', '2015-01-05 17:38:50'), ('5', '23', 'test', 'c2b57a2b72ec4f289c8daa68aa<PASSWORD>6', '<PASSWORD>', 'tester', '<EMAIL>', '12343423423', '1',...
-- Generic extended statistics support -- We will be checking execution plans without/with statistics, so -- let's make sure we get simple non-parallel plans. Also set the -- work_mem low so that we can use small amounts of data. SET max_parallel_workers = 0; SET max_parallel_workers_per_gather = 0; SET work_mem = '12...
/* SQLyog Ultimate v11.5 (64 bit) MySQL - 5.6.38 : Database - game ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@F...
--replace into a table with no primary key or unique index. --trigger: 1) before insert 2) after insert CREATE TABLE with_trigger(a int, b char(10), c int); INSERT INTO with_trigger VALUES (1, 'AAA', 1), (2, 'BBB', 2), (3, 'CCC', 3); SELECT * FROM with_trigger order by a; CREATE TABLE trigger_actions(a int auto_incr...
CREATE TABLE list (id VARCHAR(2) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "list" ("id", "value") VALUES (E'AF', E'Afeganistão'); INSERT INTO "list" ("id", "value") VALUES (E'ZA', E'África do Sul'); INSERT INTO "list" ("id", "value") VALUES (E'AL', E'Albânia'); INSERT INTO "list" ("id", "valu...
<reponame>Joskef/OnlineStore2 -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: onlinestore -- ------------------------------------------------------ -- Server version 5.5.5-10.1.30-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHAR...
use MGP; go insert into dbo.Users values ('Peter', '447878869', '44787852'), ('Vasiliy', '65487456', '44788746'), ('Jason', '74874875', '216457889'), ('Maria', '456824235', '24123577'); go select * from dbo.Users; insert into dbo.SessionMedievalBattles values (1), (0); go select * from dbo.SessionMedievalBattles; go i...
<filename>db/src/sample_data/data.sql set search_path = data, public; -- This file is generated by the DataFiller free software. -- This software comes without any warranty whatsoever. -- Use at your own risk. Beware, this script may destroy your data! -- License is GPLv3, see http://www.gnu.org/copyleft/gpl.html -- G...
<reponame>liviumuraru/newspaper-coreASP-webAPI insert into dbo.article (id, title, author, summary, publicationdate, body, views, ispublished, categoryid) values ('415f9ada-284b-468c-9c3c-9a2f685792f7', 'Final Cut, The', '<NAME>', 0, '5/15/2018', 'Nondisp oblique fx shaft of humerus, right arm, sequela', 74175, 0, 61);...
<gh_stars>0 grant connect, resource to &username identified by &password / alter user &username default tablespace USERS temporary tablespace TEMP / grant alter session to &username; grant create synonym to &username; REM grant select REM on sys.v_$mystat REM to &dbuser REM / REM grant select REM on sys.v_$ins...
<filename>dxbtours_new.sql -- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Oct 16, 2020 at 03:15 PM -- Server version: 10.4.10-MariaDB -- PHP Version: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zon...
-- ============================================= -- Author: Buzzell, Corey -- Create date: 4/8/2016 -- Description: Get a golfer's rounds for a specific season + aggregated totals for all seasons -- ============================================= CREATE PROCEDURE [dbo].[GetGolferTotals] @Golfer nvarchar(50)--, --@Se...
<gh_stars>1-10 /* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50714 Source Host : localhost:3306 Source Database : liku Target Server Type : MYSQL Target Server Version : 50714 File Encoding : 65001 Date: 2018-02-09 18:01:31 */ SET FOREIGN_KE...
 CREATE PROCEDURE [dbo].[RemoveStudentFromTeacher] @id int, @teacher int AS BEGIN update student set teacher=NULL where id=@id and teacher=@teacher if @@ROWCOUNT=0 RAISERROR('Remove failed - system could not locate this student.',11,1,'RemoveStudentFromTeacher') END
<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 27, 2018 at 08:12 AM -- 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"; /*...
<reponame>asdfgeoff/airflow-operators WITH duplicates AS ( SELECT {% set comma = joiner(", ") -%} {%- for column in cols -%} {{ comma() }}{{ column }} {%- endfor -%} , COUNT(*) AS num_rows FROM {{ schema }}.{{ table }} WHERE {%- set and = joiner("AND ") %} {%- for column in cols %} ...
CREATE TABLE subdivision_AT (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "subdivision_AT" ("id", "name", "level") VALUES ('AT-1', 'Burgenland', 'state'); INSERT INTO "subdivision_AT" ("id", "name", "level") VALUES ('AT-2', 'Carintia', 'state'); INSERT INTO "subd...
-- file:alter_table.sql ln:1664 expect:true ALTER TYPE test_type ADD ATTRIBUTE b text
<gh_stars>100-1000 DROP TABLE api_keys;
/* Author: <NAME> Original link: https://skreebydba.com/2016/07/18/identifying-in-memory-objects-when-querying-the-transaction-log/ */ SELECT f.[Current LSN], f.Operation, f.Context, f.[Transaction ID], f.operation_desc, f.tx_end_timestamp, f.total_size, OBJECT_NAME(m.object_id) AS ObjectName, f.newro...
DROP DATABASE IF EXISTS employee_db; CREATE DATABASE employee_db; USE employee_db; CREATE TABLE department ( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(30) ); CREATE TABLE role ( id INT PRIMARY KEY AUTO_INCREMENT, title VARCHAR(30), salary DECIMAL, department_id INT ); CREATE...
SELECT * FROM [MAPhotos] WHERE [LocaleCd] = @LocaleCd AND [PhotoCd] = @PhotoCd AND ([DeleteFlag] = 0 OR @IgnoreDeleteFlag = 1)
{%- macro as_constant(column_str=none) -%} {{- adapter.dispatch('as_constant', 'dbtvault')(column_str=column_str) -}} {%- endmacro %} {%- macro default__as_constant(column_str) -%} {%- if column_str is not none and column_str is string and column_str -%} {%- if column_str | first == "!" -%} ...
SELECT concept_hierarchy.concept_id AS "conceptId", isNull(concept_hierarchy.level3_concept_name, 'NA') + '||' + isNull(concept_hierarchy.level2_concept_name, 'NA') + '||' + isNull(concept_hierarchy.level1_concept_name, 'NA') + '||' + isNull(concept_hierarchy.concept_name, 'NA') AS "c...
CREATE DATABASE IF NOT EXISTS `flink_sql_platform` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `flink_sql_platform`; CREATE TABLE IF NOT EXISTS `define_group` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(50) NOT NULL, `type` enum('REALTIME','SCHEDULED') NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB ...
-- Database: db2 -- Change Parameter: newColumnName=full_name -- Change Parameter: oldColumnName=name -- Change Parameter: tableName=person ALTER TABLE person RENAME COLUMN name TO full_name;
-- Tests exercising different behaviour of the WITH RECURSIVE implementation in GPDB -- GPDB's distributed nature requires thorough testing of many use cases in order to ensure correctness -- Setup create schema recursive_cte; set search_path=recursive_cte; create table recursive_table_1(id int); insert into recursiv...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 27, 2021 at 07:43 AM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 17 Mar 2022 pada 02.10 -- Versi server: 10.4.18-MariaDB -- Versi PHP: 8.0.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
USE [ContosoRetailDW] GO CREATE VIEW [dbo].[vDimProduct] AS SELECT [ProductKey] = [ProductKey] +0 , p.[ProductLabel] , p.[ProductName] , p.[ProductDescription] , p.[Manufacturer] , p.[BrandName] , p.[ClassID] , p.[ClassName] , p.[StyleID] , p.[StyleName] , p...
CREATE TABLE mantis.dives ( id SERIAL PRIMARY KEY NOT NULL, name VARCHAR(255) NOT NULL, date TIMESTAMP, location_id SERIAL REFERENCES mantis.locations (id) ); INSERT INTO mantis.dives (name, date, location_id) VALUES ('Kerstduik', '2016-12-25 12:00:00', 1), ('Oudejaarsduik', '2...
rem default SQL*Plus settings set serveroutput on size unlimited format wrapped set trimspool on set verify off set define on set lines 4000 set feedback off rem Package name define g_package_name="PLU_STACK" rem SQL name compatible version string define g_sql_version = "000100" rem full semver version string...
DROP TABLE IF EXISTS user; DROP TABLE IF EXISTS post; CREATE TABLE user ( id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT UNIQUE NOT NULL, password TEXT NOT NULL ); CREATE TABLE post ( id INTEGER PRIMARY KEY AUTOINCREMENT, author_id INTEGER NOT NULL, created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAM...
#user base info use herograve; drop table if exists user; create table user ( user_id int(32) primary key, user_name varchar(16) not null, user_level_id int(2) not null default 3, #notice that only number and english words. input length:6-16 user_pwd varchar(24) not null, user_question varchar(...
<filename>closedaydata/OLD/IAT1802200935.sql INSERT INTO pos_itemtemp VALUES("IATT200005413","193067","191001","192003","7000","1","7000","0","7000","1","1","1","IAT1802200935","NHO2018000007","PAID","","193067"), ("IATT200005414","193052","191002","192010","20000","1","20000","0","20000","1","1","1","IAT1802200935","N...
SELECT * FROM customers, orders, addresses WHERE customers.cid = orders.cid AND customers.cid = addresses.cid AND orders.order_date = '2001-02-03' AND addresses.state = 'MA'
CREATE TABLE IF NOT EXISTS imageinfo ( id INTEGER PRIMARY KEY NOT NULL, user TEXT NOT NULL, imageIdentifier TEXT NOT NULL, size INTEGER NOT NULL, extension TEXT NOT NULL, mime TEXT NOT NULL, added INTEGER NOT NULL, updated INTEGER NOT NULL, width INTEGER NOT NULL, height INTEGER NOT NULL, checksum TEXT NOT NULL, origin...
<gh_stars>1-10 DELIMITER // CREATE OR REPLACE PROCEDURE pr_UpdateDebtAccountNameForUser(IN $debtAccountId VARCHAR(36), IN $userId VARCHAR(36), IN $name VARCHAR(255)) BEGIN UPDATE tb_DebtAccount ...
<gh_stars>1-10 Use DrillingInfo if not exists (select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = N'dbo' and TABLE_NAME = N'WellOrigins') begin create table WellOrigins ( WellOriginID int primary key identity, [UID] int null unique, GovernmentID varchar(10) null, County varchar(63) null, ...
<filename>src/test/resources/sql/set/2d42a1e9.sql -- file:xml.sql ln:264 expect:true SET xmloption TO DOCUMENT