sql
stringlengths
6
1.05M
<gh_stars>0 ALTER TABLE domain_actions alter column main_table set not null; ALTER TABLE domain_actions alter column main_table_id set not null;
-- create a class as subclass and retrieve info from db_class create class DDL_0001 ( int_col integer, var_col varchar(20), set_col set (int, varchar(10)) ); insert into DDL_0001 values (1,'test1', {1,'test1'}); insert into DDL_0001 values (2,'test1', {1,'test1'}); insert into DDL_0001 values (3,'test2', {1,'test2...
-- @testpoint:opengauss关键字fixed(非保留),作为角色名 --关键字不带引号-成功 drop role if exists fixed; create role fixed with password '<PASSWORD>' valid until '2020-12-31'; drop role fixed; --关键字带双引号-成功 drop role if exists "fixed"; create role "fixed" with password '<PASSWORD>' valid until '2020-12-31'; drop role "fixed"; --关键字带单引号-...
-- @testpoint:opengauss关键字exchange(非保留),作为视图名 --关键字exchange作为视图名,不带引号,创建成功 CREATE or replace VIEW exchange AS SELECT * FROM pg_tablespace WHERE spcname = 'pg_default'; drop view exchange; --关键字exchange作为视图名,加双引号,创建成功 CREATE or replace VIEW "exchange" AS SELECT * FROM pg_tablespace WHERE spcname = 'pg_default'; dro...
/* Warnings: - A unique constraint covering the columns `[authToken]` on the table `Auth` will be added. If there are existing duplicate values, this will fail. - A unique constraint covering the columns `[refreshToken]` on the table `Auth` will be added. If there are existing duplicate values, this will fail. ...
<reponame>teamkaliyona/Basics-of-SQL<gh_stars>0 UPDATE CUSTOMER SET PHONE_NUMBER = 753951 WHERE CUSTOMER_NAME = 'Ramya'; UPDATE CUSTOMER SET CUSTOMER_NAME = '<NAME>' WHERE CUSTOMER_ID = 8; UPDATE CUSTOMER SET AGE = 16, BILL_AMOUNT = 1300 WHERE CUSTOMER_ID = 4; commit
-- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 16, 2016 at 08:24 PM -- Server version: 5.6.24 -- PHP Version: 5.5.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
-- View: addressbase_plus.addresses_postal -- DROP VIEW addressbase_plus.addresses_postal; CREATE OR REPLACE VIEW addressbase_plus.addresses_postal AS SELECT formatted_address.ogc_fid, formatted_address.wkb_geometry, formatted_address.uprn, formatted_address.rm_udprn, ((((ltrim(formatted_address.saon || formatted_...
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- 主机: localhost -- 生成日期: 2013 年 09 月 14 日 15:01 -- 服务器版本: 5.6.12-log -- PHP 版本: 5.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACT...
DROP DATABASE IF EXISTS product_db; DROP DATABASE IF EXISTS product_query_db; DROP DATABASE IF EXISTS cart_query_db; DROP DATABASE IF EXISTS cart_db; DROP DATABASE IF EXISTS shipping_db; DROP DATABASE IF EXISTS currency_db; DROP DATABASE IF EXISTS notifier_db; DROP DATABASE IF EXISTS checkout_db; DROP DATABASE IF EXIST...
<reponame>dram/metasfresh<gh_stars>1000+ -- 2020-06-25T06:43:44.558Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsSelectionColumn='Y', SelectionColumnSeqNo=20,Updated=TO_TIMESTAMP('2020-06-25 08:43:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=548299 ; -- 202...
CREATE TABLE IF NOT EXISTS CLIENTS ( 'id' int AUTO_INCREMENT NOT NULL, 'first_name' varchar(100) NOT NULL, 'last_name' varchar(100) NOT NULL, PRIMARY KEY ('id') ); CREATE TABLE IF NOT EXISTS ITEMS ( 'id' int AUTO_INCREMENT NOT NULL, 'title' varchar(100) NOT N...
<filename>DataBase/MySQL/Table/0001_TB_user.sql SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for user -- 用户基础信息表 -- by Tommy -- ---------------------------- -- DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` bigint NOT NULL COMMENT '用户id', `gmt_create` datetime NOT NULL COM...
SET @sql = (SELECT IF( (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema=DATABASE() AND table_name='InstitutionRegistrationPrefix' AND column_name='uuid' ) > 0, "SELECT 0", "ALTER TABLE InstitutionRegistrationPrefix ADD uuid char(36) not null def...
-- 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. column lt_type heading "TYPE" format a4 column lt_name heading "LOCK_NAME" format a30 column lt_id1_tag heading "ID1_MEANING" format a25 word_...
<filename>test/TestData/Test_Expected_SQLite.sql DROP TABLE IF EXISTS "categories"; DROP TABLE IF EXISTS "customercustomerdemo"; DROP TABLE IF EXISTS "customerdemographics"; DROP TABLE IF EXISTS "customers"; DROP TABLE IF EXISTS "employeeterritories"; DROP TABLE IF EXISTS "employees"; DROP TABLE IF EXISTS "orderd...
CREATE TRIGGER dbo.trg_Autor_Audit ON dbo.Author AFTER INSERT, UPDATE, DELETE AS BEGIN SET NOCOUNT ON; -- -- CHECK IF OPREATION IS INSERT, UPDATE OR DELETE --- DECLARE @operation AS CHAR(3); DECLARE @audit_session uniqueidentifier = NEWID(); SET @operation = N'INS'; IF EXISTS(SELECT * F...
<filename>04. Data Aggregation/Exercises/11. Average Interest/Average Interest.sql SELECT DepositGroup, IsDepositExpired, AVG(DepositInterest) AS AverageInterest FROM WizzardDeposits WHERE DepositStartDate > '01/01/1985' GROUP BY DepositGroup, IsDepositExpired ORDER BY DepositGroup DE...
-- MariaDB dump 10.18 Distrib 10.5.8-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: mlem -- ------------------------------------------------------ -- Server version 10.5.8-MariaDB-1:10.5.8+maria~focal /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARAC...
<reponame>nickyrucker1979/EAB_SSC_Scripts<gh_stars>0 SELECT INSTITUTION , ACAD_GROUP , EFFDT , EFF_STATUS , DESCR , DESCRSHORT , STDNT_SPEC_PERM , AUTO_ENRL_WAITLIST FROM PS_ACAD_GROUP_TBL WHERE 1=1 AND INSTITUTION = '' ORDER BY ACAD_GROUP, EFFDT
-- This SQL file is copyright for the EECS graduate program application -- -- Latest MySQL working version for this file: 5.7.21 -- ---- Committee Reviewed Applications (15) ---- -- Accepted by University, Accepted by Student INSERT INTO `application` (`student_Id`, `app_Session`, `LName`, `FName`, `Email`, `Gender`...
CREATE TABLE channels ( id integer PRIMARY KEY NOT NULL, name text NOT NULL, options text NOT NULL, preset_id integer NOT NULL ); INSERT INTO channels (name, options, preset_id) VALUES ( 'kick', '{"frequency":105,"oscAmpAttack":0,"oscAmpDecay":0.630,"oscPitchAttack":0,"oscPitchDecay":0.380,"noiseLevel":0,"...
<reponame>Genato/mentor<filename>src/main/resources/db/migration/V4_1__TEST_Keywords_in_courses_and_lectures.sql UPDATE public.courses SET course_keywords = '{"alternating current",AC,"electric current","electric charge"}' WHERE course_id = 'f0aabc82-a475-11e6-aedd-4485006d0fd8'::uuid; UPDATE public.lectures SET lectur...
-- Adminer 4.3.1 MySQL dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; DROP TABLE IF EXISTS `tb_kasir`; CREATE TABLE `tb_kasir` ( `id_kasir` varchar(11) NOT NULL, `nama` varchar(50) NOT NULL, `password` varchar(50) NOT NULL, `level` varchar(20...
<reponame>graindb/graindb-demonstration<filename>third_party/ldbc/queries/sf30/q10.sql /* interactive-complex-3 */ select p_personid, p_firstname, p_lastname, ct1, ct2, total from ( select k_person2id from knows where k_person1id = 21990232558393 union select k2.k_person2id from knows k1, knows k2 ...
drop table c_date; drop table c_sib; drop table context;
<filename>db/migrations/user.sql<gh_stars>0 CREATE TABLE IF NOT EXISTS users ( user_id SERIAL PRIMARY KEY, email TEXT, name TEXT, github_id INTEGER UNIQUE NOT NULL, github_login TEXT, github_avatar_url TEXT, github_html_url TEXT, github_access_token TEXT, github_scope TEXT ); -- CREATE OR REPLACE FU...
<reponame>askandirov/mambet555 -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1 -- Время создания: Апр 30 2019 г., 13:17 -- Версия сервера: 10.1.38-MariaDB -- Версия PHP: 7.3.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+0...
CREATE TABLE IF NOT EXISTS CAR ( UUID VARCHAR PRIMARY KEY, VENDOR VARCHAR, COLOR VARCHAR(255), CAR_TYPE VARCHAR );
<filename>src/Resonance.Data.Storage.SQLite/Scripts/PlayQueue_Delete.sql DELETE FROM [PlayQueue] WHERE UserId = @UserId;
CREATE MATERIALIZED VIEW matview_test AS SELECT * FROM events WHERE events ==> 'beer wine cheese'; CREATE INDEX idxmatview_test ON matview_test USING zombodb ((matview_test)); SELECT count(*) FROM matview_test WHERE matview_test ==> 'beer'; REFRESH MATERIALIZED VIEW matview_test; SELECT count(*) FROM matview_test WHERE...
<filename>conf/evolutions/default/47.sql<gh_stars>1-10 # --- !Ups INSERT INTO ab_test_attributes(name, created_at, updated_at) VALUES("form1_load_rule", NOW(), NOW()); INSERT INTO ab_test_attributes(name, created_at, updated_at) VALUES("form13_submit_rule", NOW(), NOW()); # --- !Downs DELETE FROM ab_test_attributes ...
ALTER TABLE business_case ADD COLUMN preferred_security_is_approved bool; ALTER TABLE business_case ADD COLUMN preferred_security_is_being_reviewed text; ALTER TABLE business_case ADD COLUMN alternative_a_security_is_approved bool; ALTER TABLE business_case ADD COLUMN alternative_a_security_is_being_reviewed text; AL...
ALTER TABLE "selfservice_settings_requests" ADD COLUMN "state" VARCHAR (255) NOT NULL DEFAULT 'show_form';COMMIT TRANSACTION;BEGIN TRANSACTION; ALTER TABLE "selfservice_settings_requests" DROP COLUMN "update_successful";COMMIT TRANSACTION;BEGIN TRANSACTION;
/* -- Query: SELECT * FROM `lava_demo`.`udshachinski` -- Date: 2012-01-25 20:48 */ INSERT INTO `udshachinski` (InstrID,ABRUPT,STEPWISE,SOMATIC,EMOT,HXHYPER,HXSTROKE,FOCLSYM,FOCLSIGN,HACHIN,CVDCOG,STROKCOG,CVDIMAG,CVDIMAG1,CVDIMAG2,CVDIMAG3,CVDIMAG4,CVDIMAGX) VALUES (53358,0,0,0,0,0,0,0,0,0,-8,-8,-8,-8,-8,-8,-8,'-8'); I...
-- @testpoint:opengauss关键字timezone_hour(非保留),作为表空间名 --关键字不带引号,创建成功 drop tablespace if exists timezone_hour; CREATE TABLESPACE timezone_hour RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1'; drop tablespace timezone_hour; --关键字带双引号,创建成功 drop tablespace if exists "timezone_hour"; CREATE TABLESPACE "timezone_hou...
-- @testpoint:opengauss关键字datetime_interval_precision(非保留),作为用户名 --关键字datetime_interval_precision作为用户名不带引号,创建成功 drop user if exists datetime_interval_precision; CREATE USER datetime_interval_precision PASSWORD '<PASSWORD>'; drop user datetime_interval_precision; --关键字datetime_interval_precision作为用户名加双引号,创建成功 drop us...
-- phpMyAdmin SQL Dump -- version 4.1.12 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 18 Mei 2015 pada 11.45 -- Versi Server: 5.6.16 -- PHP Version: 5.5.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!...
------------------------------------------------------------------------------------------------- IF OBJECT_ID( '[dbo].[CodegenTestStoredProcLoadTest]' ) IS NOT NULL DROP PROCEDURE [dbo].CodegenTestStoredProcLoadTest GO -------------------------------------------------------------------------------------------...
SELECT player_id, MIN(event_date) AS first_login FROM activity GROUP BY player_id;
<reponame>zonafets/TSQL-Utils<filename>src/sp__util_auto_growth.sql<gh_stars>0 /* leave this l:see LICENSE file g:utility k:monitor,database,performance,auto,grouth v:130227\s.zaglio: identifying how often an auto-growth event has occurred c: from https://www.simple-talk.com/sql/da...
CREATE PROCEDURE [dbo].[sql_commands_sel]( @user_id INT=null ,@sort_index INT=1 ,@sort_order INT=0 ,@rpp INT=25 ,@pno INT=1 ) AS BEGIN SET NOCOUNT ON DECLARE @stmt NVARCHAR(MAX) DECLARE @order NVARCHAR(20) = ' ASC' DECLARE @stmt2 NVARCHAR(MAX) DECLARE @count INT = 0 ...
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50724 Source Host : localhost:3306 Source Schema : toko-buku-c10-7 Target Server Type : MySQL Target Server Version : 50724 File Encoding : 65001 Date: 02/12...
use Products; CREATE TABLE `__EFMigrationsHistory` ( `MigrationId` varchar(150) NOT NULL, `ProductVersion` varchar(32) NOT NULL, PRIMARY KEY (`MigrationId`) ); CREATE TABLE `Products` ( `Id` int NOT NULL, `Minute` datetime NOT NULL, `Purchases` bigint NOT NULL, `Revenue` decimal(18, 2) NOT...
/* Getting covariates and drug etc will be in other scripts DO: 1. Random pick lyme control from long format longitudinal FactIcd table 2. Get first case and unique memberID Getting covariates and drug etc in different scripts 101719 */ /* 1.1. Random cases */ /* Get uniqueCtIcd for all members */ SELE...
<gh_stars>1-10 SET DEFINE OFF; ALTER TABLE AFW_23_RESLT_RECHR ADD ( CONSTRAINT AFW_23_RESLT_RECHR_PK PRIMARY KEY (SEQNC) ENABLE VALIDATE) /
DROP TABLE if exists `NServiceBusPoCdb`.`ClubRecords`; CREATE TABLE `NServiceBusPoCdb`.`ClubRecords` ( `ParentId` INT(11) NOT NULL, `CoachId` INT(11) NOT NULL, `ChildId` INT(11) NOT NULL, `ClubId` INT(11) NOT NULL, `SportId` INT(4) NOT NULL, `RecordCreated` DATETIME NULL, PRIMARY KEY (`ParentId`, `ChildId`,`CoachId`, ...
<filename>urionlinejudge/2740.sql SELECT 'Podium: '||team FROM league UNION ALL ((SELECT id, 'Demoted: '||team FROM league ORDER BY id DESC LIMIT 2) ORDER BY id ASC)
<reponame>iloveloveyou/sql-diaries<gh_stars>1-10 -- -- Average REDO log applied for GAP analysis -- -- @tested on: 10g -- set line 200 set PAGESIZE 9999 col day format a15 SELECT A.*, Round(A.Count#*B.AVG#/1024/1024) Daily_Avg_Mb FROM (SELECT To_Char(First_Time,'YYYY-MM-DD') DAY, Count(1) Count#, Min(RECID) Min#...
<gh_stars>10-100 CREATE TABLE IF NOT EXISTS `cars` ( `id` varchar(36) NOT NULL, `modelname` varchar(45) NOT NULL, `cartype` tinyint(1) NOT NULL, `createdon` datetime NOT NULL, `modifiedon` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
<reponame>jphacks/B_2121 DROP TABLE IF EXISTS `invite_tokens`;
CREATE PROCEDURE [dbo].[usp_TaskGet] @TaskId int AS -- Specifying "TOP 1" makes the generated return value a single instance instead of an IEnumerable<T>. SELECT TOP 1 t.Name, t.[Description], ts.Name as [Status], t.Created, t.CreatedBy, t.Updated, t.UpdatedBy FROM Tasks t JOIN TaskStatus ts ON t.T...
CREATE TABLE STAFF_LOCATION_ROLES -- A Staff Member holding an Agency Location specific role & position. ( CAL_AGY_LOC_ID VARCHAR2(6 CHAR) NOT NULL, SAC_STAFF_ID NUMBER(10) NOT NULL, FROM_DATE DATE ...
<filename>2015_Summer/CSCI-585/Assignments/Assignment1/assignment1_sql/dropdb.sql DROP DATABASE IF EXISTS golf_db;
\out %%file_name%% \d %%table_name%% \out
<filename>Examples/Todos/Revo.Examples.Todos/Sql/todos_baseline_1_mssql.sql -- Revo.Examples.Todos SQL baseline schema -- MSSQL version -- description: simple example app with tasks and task lists CREATE TABLE TODOS_TODO_LIST_READ_MODEL ( TODOS_TLI_TodoListReadModelId uniqueidentifier PRIMARY KEY, TODOS_TLI_Version...
<filename>Scripts/SXP_collection_Part2.sql PRINT N'Altering ShardKey columns as not null'; PRINT N'Altering [xdb_collection].[ContactFacets]adding not null constraint to shardkey...'; GO IF EXISTS ( SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'[xdb_collection].[ContactFacets]') AN...
<reponame>jbeecham/ovirt-engine INSERT INTO roles_groups(role_id,action_group_id) select 'DEF00007-0000-0000-0000-DEF000000007', -- VMPoolAdmin 1 -- CREATE_VM ActionGroup where not exists ( select * from roles_groups wher...
<filename>fullstop-violation/fullstop-violation-persister-jpa/src/main/resources/db/migration/V8__create_rule.sql CREATE TABLE IF NOT EXISTS fullstop_data.rule ( id BIGSERIAL NOT NULL PRIMARY KEY, account_id TEXT, region TEXT, application_id TEXT, ...
<filename>migrations/2020-05-18-152538_create_products/up.sql CREATE TABLE "Products" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, "name" TEXT NOT NULL, "description" TEXT NOT NULL, "image" TEXT NOT NULL DEFAULT 'placeholder.png', "quantity" INTEGER NOT NULL DEFAULT 0, "price" REAL NOT NULL DEFAULT 0...
<filename>src/CleanInt.sql /****************************************************************************** ### CleanInt ### Returns the input text as an integer if possible, otherwise null. __Parameters:__ - `text` i - Text that you would like as an integer. __Returns:__ `integer` **********************************...
-- MySQL dump 10.13 Distrib 5.7.26, for osx10.10 (x86_64) -- -- Host: 127.0.0.1 Database: laraclassified -- ------------------------------------------------------ -- Server version 5.7.26 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL...
<filename>sql/Customers.sql INSERT INTO `Customers` (`id`, `user_id`, `name`, `email`, `phone`, `image`, `address`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES (3, 9, 'Ripto', '<EMAIL>', '2894284298', 'zhOWsCcp8j73Ql9X2c9UUrrncbxPa2cpEVXa1Vyw.png', 'Semarng cuk', 'active', '2022-01-22 14:00:16', '2022-01...
select bills_kns_bill."BillID" "מזהה ייחודי להצעות חוק", bills_kns_bill."Number" "המספר של הצעת החוק הממשלתית", -- knesset_kns_status."StatusID", knesset_kns_status."Desc" "סטטוס הצעת החוק הממשלתית", bills_kns_bill."KnessetNum" "מספר הכנסת", bills_kns_bill."IsContinuationBill" "האם הוחל על הצעת החוק דין רציפות", bills_...
CREATE DATABASE IF NOT EXISTS `ocai` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */; USE `ocai`; -- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64) -- -- Host: 10.1.236.82 Database: ocai -- ------------------------------------------------------ -- Server version 5.5.44-MariaDB /*!40101 SE...
<reponame>mjmjmj4603/db5-Stanford-SQL-Course -- SQL Social Network Query Exercises -- https://lagunita.stanford.edu/courses/DB/SQL/SelfPaced/courseware/ch-sql/seq-exercise-sql_social_query_core/ -- Question 1: -- Find the names of all students who are friends with someone named Gabriel. select name from Highschooler w...
DROP DATABASE IF EXISTS testdb; CREATE DATABASE testdb; USE testdb; CREATE USER 'testuser'@'%' IDENTIFIED BY 'testuser'; GRANT ALL PRIVILEGES ON *.* TO 'testuser'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES;
<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Hostiteľ: localhost:3306 -- Čas generovania: Št 23.Júl 2020, 19:06 -- Verzia serveru: 5.7.30-33-log -- Verzia PHP: 7.3.14-1~deb10u1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = ...
<filename>hibernate-scripts-database/hibernate-tutorial/sql-scripts-table/alter-table.sql -- modify id = PK to start from 3000 ALTER TABLE hb_student_tracker.student AUTO_INCREMENT=3000
<filename>src/test/resources/sql/explain/870059c6.sql -- file:select_parallel.sql ln:24 expect:true explain (verbose, costs off) select parallel_restricted(unique1) from tenk1 where stringu1 = 'GRAAAA' order by 1
-- file:timestamp.sql ln:228 expect:true SELECT '' AS to_char_11, to_char(d1, 'FMIYYY FMIYY FMIY FMI FMIW FMIDDD FMID') FROM TIMESTAMP_TBL
<filename>routines/script/_cleanup_script_tables.sql -- -- -- delimiter // drop procedure if exists _cleanup_script_tables// create procedure _cleanup_script_tables() comment '...' language SQL deterministic modifies sql data sql security invoker main_body: begin if not (@query_script_skip_cleanup is true) then ...
<reponame>awenko/jSignature create or replace package jsignature_pkg as -- Globals gc_chunk_separator varchar2(1) := '_'; gc_minus varchar2(1) := 'Z'; gc_plus varchar2(1) := 'Y'; gc_current_debug_level number := 0; gc_debug_basic ...
INSERT INTO `ferry`.`user` (id, username,nickname, password, email, role, create_time) VALUES ('0', 'admin','管理员', '$2a$10$ysekK7V5CZAZSg01125ngux3dGxfRG/n3m/Ap4erQ0Fu5OnwVNe3O', '<EMAIL>', 'admin', DEFAULT);
{{ config( tags=['unit-test', 'bigquery', 'snowflake', 'postgres'] ) }} {% call dbt_unit_testing.test('samplesnapshot', 'sample test') %} {% call dbt_unit_testing.mock_source('dbt_unit_testing','sample_source_without_columns_declared') %} select 0 as existing_source_a, 'a' as existing_source_b ...
INSERT IGNORE INTO `site` (`setting`, `value`) VALUES ('releasethreads','1'); INSERT IGNORE INTO `tmux` (`setting`, `value`) VALUES ('RELEASES_THREADED','FALSE'); UPDATE `site` set `value` = '9' where `setting` = 'sqlpatch';
<gh_stars>0 -- MySQL dump 10.13 Distrib 5.7.18, for Linux (x86_64) -- -- Host: localhost Database: testdb -- ------------------------------------------------------ -- Server version 5.7.18-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@C...
<filename>framework/resources/Functional/window_functions/negative/q4.sql select a2, count(distinct b2) over() from t2;
/* This file defines the new udfs for Firebird. */ set sql dialect 3; /* drop external function bbudf_xmlreader_open; drop external function bbudf_xmlreader_close; drop external function bbudf_xmlreader_read; drop external function bbudf_xmlreader_name; drop external function bbudf_xmlreader_value; drop external func...
<gh_stars>1-10 -- db_patches INSERT INTO `db_patches` (issue, created) VALUES ('POCOR-2915', NOW()); -- code here ALTER TABLE `institution_class_students` ADD INDEX `student_id` (`student_id`); ALTER TABLE `institution_class_students` ADD INDEX `institution_class_id` (`institution_class_id`); ALTER TABLE `institution...
-- ### Creating Table: life_stage_code ### -- CREATE TABLE life_stage_code (); ALTER TABLE life_stage_code ADD COLUMN life_stage_code_id SERIAL PRIMARY KEY; ALTER TABLE life_stage_code ADD COLUMN life_stage_code VARCHAR(10) NOT NULL UNIQUE; ALTER TABLE life_stage_code ADD COLUMN description VARCHAR(100) NULL;...
<gh_stars>1-10 -- DATABASE conversion script. This script converts data in the existing tables to the new table structure -- -- NOTE THAT THIS SCRIPT OVERWRITES *ALL* DATA IN THE DJANGO MODELS FOR PGD_CORE!! -- use caution when running this. -- create mapping table for aa DROP TABLE IF EXISTS aa_codes; CREATE TABLE `...
/** Write a SQL query to find all duplicate emails in a table named Person. +----+---------+ | Id | Email | +----+---------+ | 1 | <EMAIL> | | 2 | <EMAIL> | | 3 | <EMAIL> | +----+---------+ For example, your query should return the following for the above table: +---------+ | Email | +---------+ | <EMAIL> | +-...
<reponame>nenadnoveljic/tpt-oracle -- 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. SELECT * FROM ( select rownum r from all_users where username like 'S%' order by r desc ) WHERE r NOT IN (s...
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 09, 2016 at 01:54 PM -- Server version: 5.7.12-0ubuntu1 -- PHP Version: 7.0.7-4+deb.sury.org~xenial+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
/* Retrieve canonical SMILES strings and 5-HT2A activities for Stage 2. */ WITH target_ids AS ( SELECT tid FROM target_dictionary WHERE pref_name IN ( 'Serotonin 2a (5-HT2a) receptor', '5-hydroxytryptamine receptor 2A' ) ), assay_ids AS ( SELECT assay_id FROM assays WHERE tid IN t...
<filename>sql/_24_aprium_qa/_01_i18n/issue_8700_enum/cases/collation_002.sql --addition in late binding using enum type --+ holdcas on; set names iso88591; drop table if exists t1; create table t1 (e1 enum('a','b') collate utf8_en_cs); show full columns from t1; create table t2 (s varchar(255) collate utf8_en_ci); sh...
<reponame>Dxcde/yextend -- Creating a table CREATE TABLE fyi_links (id INTEGER PRIMARY KEY, url VARCHAR(16) NOT NULL, notes VARCHAR(16), counts INTEGER, created TIMESTAMP DEFAULT CURRENT_TIMESTAMP()); -- Inserting a row INSERT INTO fyi_links VALUES (101, 'dev.fyicenter.com', NULL, 0, '2006-04-30...
DROP LANGUAGE java CASCADE; DROP LANGUAGE javaU CASCADE; -- DROP SCHEMA sqlj CASCADE;
SELECT UPPER(CONCAT(author_fname,' ', author_lname)) AS author_fullName FROM books; SELECT title, CHAR_LENGTH(title) as characterLength FROM books; SELECT author_fname, REVERSE(author_fname) FROM books; SELECT REPLACE(title, ' ', '->') AS title FROM books; SELECT CONCAT(title ,'...
/* Warnings: - You are about to drop the column `photo` on the `lookbook` table. All the data in the column will be lost. - You are about to drop the column `urlReserva` on the `lookbook` table. All the data in the column will be lost. - Added the required column `capa` to the `lookbook` table without a defaul...
<filename>Database/dbo/User Defined Types/NewStreamMessages.sql CREATE TYPE [dbo].[NewStreamMessages] AS TABLE ( [StreamVersion] INT IDENTITY (0, 1) NOT NULL, [Id] UNIQUEIDENTIFIER NOT NULL, [Created] DATETIME DEFAULT (getutcdate()) NOT NULL, [Type] NVARCH...
CREATE TABLE userSkills( userId int NOT NULL, skillId int NOT NULL, FOREIGN KEY (userId) REFERENCES user(id), FOREIGN KEY (skillId) REFERENCES skills(id) )
BEGIN; ALTER TABLE tblUsers ADD COLUMN `homefolder` INTEGER DEFAULT NULL REFERENCES `tblFolders` (`id`); UPDATE tblVersion set major=5, minor=0, subminor=0; COMMIT;
<reponame>Haritest/sunbird-cb-devops<filename>db_scripts/Drop/drop_pg.sql /* NOTIFICATION TABLES - DROP QUERIES*/ DROP TABLE IF EXISTS wingspan.tbl_tenant_mode; DROP TABLE IF EXISTS wingspan.smtp_config; DROP TABLE IF EXISTS wingspan.tenant_mode_language; DROP TABLE IF EXISTS wingspan.tenant_event_notification; DR...
<filename>Products.Database/Procedure.RetrieveProductOptionsByProductId.sql CREATE PROCEDURE [dbo].[RetrieveProductOptionsByProductId] @ProductId UNIQUEIDENTIFIER AS BEGIN SELECT * FROM [dbo].[ProductOption] WHERE [ProductId] = @ProductId RETURN 0 END GO
drop database if exists RabbitsDB go Create database RabbitsDB go use RabbitsDB go drop table if exists Rabbits create table Rabbits ( RabbitID INT NOT NULL IDENTITY PRIMARY KEY, RabbitName VARCHAR(30) NULL, RabbitAge INT NULL ) go --insert into Rabbits values ('Honey', 2) --insert into Rabbits values ('Midnight', ...
CREATE TABLE IF NOT EXISTS offers ( 'idKey', 'TduCompanyName', 'RepCompany', 'Product', 'kwh500' INTEGER, 'kwh1000' INTEGER, 'kwh2000' INTEGER, 'FeesCredits', 'PrePaid', 'TimeOfUse', 'Fixed', 'RateType', 'Renewable' INTEGER, 'TermValue' INTEGER, 'CancelFee', ...
-- +goose Up -- SQL in this section is executed when the migration is applied. alter table ONLY am.web_snapshots add column requested_port int not null default 0; create table am.event_notification_types ( type_id int primary key not null, notify_description text not null default '' ); insert into am.eve...
<filename>sensearch.sql<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : ven. 28 août 2020 à 17:48 -- Version du serveur : 10.4.10-MariaDB -- Version de PHP : 7.2.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTIO...