sql
stringlengths
6
1.05M
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED SET NUMERIC_ROUNDABORT OFF SET ARITHABORT ON ;WITH potential_columns AS ( SELECT -- in case we do encounter the old columns: is_auto_create_stats_incremental_on = CONVERT (bit, NULL), is_query_store_on = CONVERT (bit, NULL), containment_desc = CONVERT (nv...
<gh_stars>1-10 SELECT M.[FirstName] + ' ' + M.[LastName] AS Mechanic, J.Status, J.IssueDate FROM Mechanics AS M JOIN Jobs AS J ON J.MechanicId = M.MechanicId ORDER BY M.MechanicId, J.IssueDate,J.JobId
CREATE TABLE employee ( empId varchar primary key, fname varchar, lname varchar, gender varchar, dob date, emailId varchar not null, phno varchar not null, city varchar, zipcode integer, datejoined date CHECK (datejoined > dob), salary integer CHECK (salary >0), role varchar, qualification var...
<filename>prisma/migrations/20211112211508_hash_length_prop/migration.sql<gh_stars>1-10 -- AlterTable ALTER TABLE `clips` ADD COLUMN `hashLength` INTEGER NOT NULL DEFAULT 5;
<gh_stars>10-100 COPY acs2007_3yr.tmp_geoheader FROM '/mnt/tmp/acs2007_3yr/g20073ak.txt' WITH ENCODING 'latin1'; COPY acs2007_3yr.tmp_geoheader FROM '/mnt/tmp/acs2007_3yr/g20073al.txt' WITH ENCODING 'latin1'; COPY acs2007_3yr.tmp_geoheader FROM '/mnt/tmp/acs2007_3yr/g20073ar.txt' WITH ENCODING 'latin1'; COPY acs2007_3y...
<filename>3]. Competitive Programming/09]. HackerRank/1]. Practice/05]. SQL/12). HackerRank [SQL-Problem (Alternative_Queries)]/__53-55_Alternative_Queries.sql<gh_stars>1000+ -- 53rd Solution SELECT REPEAT('* ', @NUMBER := @NUMBER - 1) FROM INFORMATION_SCHEMA.TABLES, (SELECT @NUMBER := 21) T LIMIT 20 -- 54th Solu...
<filename>backend/de.metas.handlingunits.base/src/main/sql/postgresql/system/5568250_sys_gh9982_addMShipperTrackingURL.sql<gh_stars>1000+ -- 2020-09-21T14:50:59.661Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID...
CREATE TABLE IF NOT EXISTS userses ( id VARCHAR UNIQUE, name VARCHAR(50), login VARCHAR(50) NOT NULL, password VARCHAR(50) NOT NULL, role VARCHAR(10), email VARCHAR(50), created DATE);
<reponame>Earth-Online/poc_test -- 主表 CREATE TABLE `$basic_tablename` ( `uid` INT(10) unsigned NOT NULL, UNIQUE `uid` (`uid`) ) ENGINE=MyISAM DEFAULT CHARSET=gbk; CREATE TABLE `$att_tablename`( `uid` INT(10) unsigned NOT NULL, UNIQUE `uid` (`uid`) ) ENGINE=MyISAM DEFAULT CHARSET=gbk;
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * Author: <NAME> * Created: 21.05.2018 */ CREATE TABLE USER ( id int auto_INCREMENT PRIMARY KEY, firstname_id int, ...
-- SPARK-23179: SQL ANSI 2011 states that in case of overflow during arithmetic operations, -- an exception should be thrown instead of returning NULL. -- This is what most of the SQL DBs do (eg. SQLServer, DB2). -- tests for decimals handling in operations create table decimals_test(id int, a decimal(38,18), b decima...
-- 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. col bhobjects_owner head OWNER for a30 col bhobjects_object_name head OBJECT_NAME for a30 col bhobjects_subobject_name head SUBOBJECT_NAME for a30...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 06, 2022 at 10:17 PM -- Server version: 10.4.19-MariaDB -- PHP Version: 8.0.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
CREATE DATABASE psychomorph; USE psychomorph; \. /var/www/html/webmorph/resources/mysql/db.sql \. /var/www/html/webmorph/resources/mysql/tems.sql -- CREATE TABLE `user` ( -- `id` int(8) unsigned NOT NULL AUTO_INCREMENT, -- `email` varchar(255) NOT NULL, -- `password` varchar(255) NOT NULL, -- `organisation` va...
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 1192.168.3.11 -- Generation Time: May 31, 2020 at 07:58 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET ...
select * from estados e, cidades c where e.id = c.estado_id; select e.nome as Estado, c.nome as Cidade, regiao as Região from estados e, cidades c where e.id = c.estado_id; select c.nome as Cidade, e.nome as Estado, regiao as Região from estados e inner join cidades c on e.id = c.estado_id;
-- -------------------------------------------------------- -- Hôte : localhost -- Version du serveur: 5.7.24 - MySQL Community Server (GPL) -- SE du serveur: Win64 -- HeidiSQL Version: 9.5.0.5332 -- -------------------------------------------------------- /*...
SELECT NAME FROM CITY WHERE COUNTRYCODE = "USA" AND POPULATION > 120000;
CREATE USER tuition IDENTIFIED BY reimbursement DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp QUOTA 10M ON users; GRANT connect to tuition; GRANT resource to tuition; GRANT create session TO tuition; GRANT create table TO tuition; GRANT create view TO tuition; conn tuition/reimbursement CREATE TABLE AUTHENTICAT...
USE flyway_test_db; DELIMITER $$ CREATE PROCEDURE list_users_v1() BEGIN select u.name, u.surname, a.city, a.street from user u join address a on u.address_id = a.id; END $$
<filename>DB/DB-Cocineros-Unidos.sql -- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 10-12-2018 a las 13:41:12 -- Versión del servidor: 10.1.36-MariaDB -- Versión de PHP: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = ...
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Oct 28, 2019 at 01:14 PM -- Server version: 5.7.27-0ubuntu0.18.04.1 -- PHP Version: 7.2.19-0ubuntu0.18.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
-- -- --AUTHOR: <NAME> --DATE: 06/03/2021 -- -- ---------------------------------------------------------- /*CREAMOS EL USUARIO*/ CREATE USER empleado_airbnb IDENTIFIED BY empair123; -- ----------------------------------------------------------
<filename>5.2.3/Database/Constraints/AFW_25_THEME_FK1.sql SET DEFINE OFF; ALTER TABLE AFW_25_THEME ADD ( CONSTRAINT AFW_25_THEME_FK1 FOREIGN KEY (REF_GROUP_PUBLC) REFERENCES AFW_25_GROUP_PUBLC (SEQNC) ON DELETE CASCADE ENABLE VALIDATE) /
-- 修改字段默认值 ALTER TABLE `ss_node` CHANGE COLUMN `is_subscribe` `is_subscribe` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '是否允许用户订阅该节点:0-否、1-是' AFTER `monitor_url`, CHANGE COLUMN `compatible` `compatible` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '兼容SS' AFTER `is_tcp_check`, CHANGE COLUMN `single` `single` TINYINT(4) NOT N...
 IF NOT EXISTS (SELECT NAME FROM sys.objects WHERE TYPE = 'P' AND NAME = 'RethrowError') BEGIN EXEC('CREATE PROCEDURE [dbo].RethrowError AS RETURN') END GO ALTER PROCEDURE RethrowError AS /* Return if there is no error information to retrieve. */ IF ERROR_NUMBER() IS NULL RETURN; DECLARE ...
<gh_stars>10-100 -- file:tstypes.sql ln:213 expect:true SELECT ts_delete('base hidden rebel spaceship strike'::tsvector, ARRAY['spaceship','leya','rebel','rebel'])
<reponame>tstenner1/SQL-challenge<gh_stars>0 --Use the information you have and create a table schema for each of the six CSV files. Remember to specify data types, primary keys, foreign keys, and other constraints. --For the primary keys check if the column is unique, otherwise create a composite key. Which takes to ...
delete from SR_RETURN_ANSWER where answer_id in (79800,80750,80751); -- Query OK, 3 rows affected (0.01 sec) delete from SR_ANSWER where id in (79800,80750,80751); -- Query OK, 3 rows affected (0.01 sec) update SR_RETURN set applicable_period = '2016-17' where id in(480,481,975); -- remove all survey returns for org...
<filename>Api/resources/database/scripts/backup210420.sql<gh_stars>0 -- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64) -- -- Host: localhost Database: pandorabox -- ------------------------------------------------------ -- Server version 8.0.19 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
create table pmprofile ( md5 char(32) ) inherits (pmodel) without oids; create unique index pmprofile_pmodel_id_idx on pmprofile(pmodel_id); create unique index pmprofile_md5_idx on pmprofile(md5); create index pmprofile_name_idx on pmprofile(name); create table pfprofile ( pmodel_id integer references pmprofi...
{% snapshot snap_orders_check %} {{ config( target_schema='snapshots', strategy='check', unique_key='order_id', check_cols=['status_orders'], ) }} select * from {{ref('stg_orders_table')}} {% endsnapshot %}
select * from table01; select * from table02;
CREATE TABLE [tracked_deletes_samplestudenttranscript].[InstitutionControlDescriptor] ( InstitutionControlDescriptorId [INT] NOT NULL, Id uniqueidentifier NOT NULL, ChangeVersion bigint NOT NULL, CONSTRAINT PK_InstitutionControlDescriptor PRIMARY KEY CLUSTERED (ChangeVersion) ) CREATE TABLE ...
<filename>src/main/resources/reports/invoices_balance_daily/report_invoices_balance_daily.ddl create table report_invoices_balance_daily as select * from v_report_invoices_balance_daily limit 0; drop procedure if exists refresh_report_invoices_balance_daily; DELIMITER // CREATE PROCEDURE refresh_report_invoices_balanc...
<gh_stars>1-10 -- Database: cone -- DROP DATABASE cone; CREATE DATABASE cone WITH OWNER = inge_rw ENCODING = 'UTF8' LC_COLLATE = 'de_DE.UTF-8' LC_CTYPE = 'de_DE.UTF-8' TABLESPACE = pg_default CONNECTION LIMIT = -1; GRANT TEMPORARY, CONNECT ON DATABASE cone TO PUBLIC; GRANT ALL ON DA...
<reponame>sambitesh/gpdb BEGIN; REINDEX INDEX cr_co_reindex_bitmap_idx1; COMMIT;
<reponame>maurizioabba/rose<gh_stars>100-1000 -- Computes statistics about false negatives in a database populated with two or more specimens compiled in different ways. drop table if exists fr_results; drop table if exists fr_results_precision_recall; drop table if exists fr_false_positives; drop table if exists fr_f...
DROP DATABASE IF EXISTS burgers_db; CREATE DATABASE burgers_db; USE burgers_db; CREATE TABLE addaBurger ( id int AUTO_INCREMENT NOT NULL, burger_name varchar(50) NOT NULL, devoured boolean, PRIMARY KEY(id) );
UPDATE invites SET consumed_at = NOW() WHERE id = $1;
-- AlterTable ALTER TABLE `Task` ADD COLUMN `userId` VARCHAR(191) NULL; -- AddForeignKey ALTER TABLE `Task` ADD CONSTRAINT `Task_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `User`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : mer. 23 mars 2022 à 17:49 -- Version du serveur : 10.4.22-MariaDB -- Version de PHP : 8.0.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost -- Généré le : sam. 27 mars 2021 à 18:45 -- Version du serveur : 10.4.11-MariaDB -- Version de PHP : 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SE...
-- +goose Up -- +goose StatementBegin CREATE OR REPLACE FUNCTION import_timekeeping() RETURNS trigger LANGUAGE plpgsql AS $BODY$ BEGIN IF NOT EXISTS(SELECT 1 FROM busycore.timekeeping WHERE mite_record_id = NEW.mite_record_id) THEN INSERT INTO busycore.timekeeping (mite_record_id, date_at, note, mite_id, minutes...
ALTER TABLE inntekt_v1_arena_mapping DROP CONSTRAINT inntekt_v1_arena_mapping_inntektid_fkey, ADD CONSTRAINT inntekt_v1_arena_mapping_inntektid_fkey FOREIGN KEY (inntektid) REFERENCES inntekt_v1 (id) ON DELETE CASCADE;
-- MySQL Script generated by MySQL Workbench -- Fr 29 Mär 2019 12:40:40 CET -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=...
SELECT DISTINCT(S.sname) FROM Student S, Enrolled E WHERE S.snum <> E.snum
<filename>Basic SQL/LIKE.sql 1.All the companies whose names start with 'C'. 2.All companies whose names contain the string 'one' somewhere in the name. 3.All companies whose names end with 's'. 1.select name from accounts where name like 'C%'; 2.select name from accounts where name like '%one%'; 3.select name from ac...
<reponame>navikt/veilarbfilter UPDATE EnhetFilter SET valgte_filter = replace(valgte_filter::TEXT,'"kjonn": []','"kjonn": null')::jsonb;
<filename>monday.sql -- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 20, 2020 at 09:54 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"...
-- DROP TABLE accountdetailtype_aud; CREATE TABLE accountdetailtype_aud ( id bigint NOT NULL, rev integer NOT NULL, name character varying(50) NOT NULL, description character varying(50) NOT NULL, tablename character varying(50), columnname character varying(50), attributename character varying(50) NOT N...
CREATE TABLE watchlist ( id VARCHAR(50) NOT NULL, user_id VARCHAR(50) NOT NULL, title VARCHAR(50) NOT NULL, category VARCHAR(50) NOT NULL, season INT NOT NULL, episode INT NOT NULL, created_at TIMESTAMP, updated_at TIMESTAMP, PRIMARY KEY (id), CONSTRAINT fk_users FOREIGN K...
<reponame>Shuttl-Tech/antlr_psql -- file:rules.sql ln:1069 expect:true CREATE TABLE hat_data ( hat_name char(10), hat_color char(10) )
<reponame>dram/metasfresh -- 2018-11-20T10:59:51.813 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=554385 ; -- 2018-11-20T11:00:11.631 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsSelectionColumn='N', IsUpd...
<filename>tests/partial_datacopy.test/t12.sql create table t { schema { int a int b int c int d } keys { datacopy(b, c) "a" = a } };$$ insert into t with recursive r(n) as (select 1 union all select n + 4 from r where n < 97) select n, n + 1, n + 2, n + 3 from r;...
DROP TABLE USER_SESSION; DROP TABLE CODE_NAME; DROP TABLE CODE_PATTERN;
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Aug 10, 2018 at 10:46 AM -- Server version: 5.7.21 -- PHP Version: 5.6.35 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
<gh_stars>100-1000 SELECT * FROM LIKE_COMMENTS WHERE DELETE_FLAG = 0 ORDER BY INSERT_DATETIME %s LIMIT ? OFFSET ?;
DROP TABLE connection_container_connection;
<gh_stars>1000+ ALTER TABLE "selfservice_registration_requests" ADD COLUMN "messages" TEXT;
<gh_stars>0 -- Verify forum:forums on pg BEGIN; SELECT id, name, description, parent_forum, category_id, created_at, updated_at FROM forums WHERE FALSE; ROLLBACK;
CREATE TABLE subject_templates ( id SERIAL PRIMARY KEY, image text NOT NULL );
<filename>baza.sql -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Czas generowania: 04 Kwi 2018, 23:07 -- Wersja serwera: 10.1.16-MariaDB -- Wersja PHP: 7.0.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
/* Warnings: - The migration will remove the values [ADMIN] on the enum `Role`. If these variants are still used in the database, the migration will fail. */ -- AlterEnum BEGIN; CREATE TYPE "Role_new" AS ENUM ('USER', 'PRO', 'SYSADMIN'); ALTER TYPE "Role" RENAME TO "Role_old"; ALTER TYPE "Role_new" RENAME TO "Rol...
-- CreateTable CREATE TABLE `users` ( `id` VARCHAR(191) NOT NULL, `name` VARCHAR(191) NOT NULL, `avatar_url` VARCHAR(191) NOT NULL, `email` VARCHAR(191) NOT NULL, `phone_number` VARCHAR(191) NOT NULL, `github_username` VARCHAR(191) NOT NULL, `title` VARCHAR(191) NOT NULL, `about` VARCHAR...
<filename>carnvial-purchase/sql/micro_order.sql /* SQLyog Ultimate v11.24 (32 bit) MySQL - 5.7.13 : Database - micro_order ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0...
<gh_stars>1-10 -- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64) -- -- Host: localhost Database: toubkal_unit_tests -- ------------------------------------------------------ -- Server version 5.7.13-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@...
-- +migrate Up CREATE TABLE dockmon_liveness_target ( service_name VARCHAR(150) PRIMARY KEY, liveness_url VARCHAR(250), liveness_interval INT, should_restart BOOLEAN, fail_after INT, is_healty BOOLEAN, number_of_restarts INT, consecutive_failed_health_checks INT, last_restarted TIMESTAMP, last_healt...
<filename>subprojects/athena-data/queries/ytd-gross-breakage-by-merchant-by-business-model.sql -- Get breakages for a merchant by business model -- Description: For a given merchant, get breakages by business model, e.g Open Loop, Closed Loop etc. -- Verified: OK select business_model, sum(breakage) as merchant_break...
SELECT nd.Problem, nd.Instance, nd.SolverId, nd.Solved as "New-Solved", od.Solved as "Old-Solved", nd.Solved != od.Solved as "Different-Solved", nd.Optimally as "New-Optimally", od.Optimally as "Old-Optimally", nd.Optimally != od.Optimally as "Different-Optimally", nd.ElapsedSecs as "New-Elapsed", od.Elapse...
<reponame>aliostad/deep-learning-lang-detection -- USER table, replace userid, password hash is for 'invenio' -- insert into invenio_user (userid, password) values ('invenio','<PASSWORD>'); -- VOL_DUMP -- insert into VOL_DUMP values (1,'AC-SUG-1', 1,100, 5, 'Y', 50, 'AA-101', '','','2020-01-01'); insert into VOL_DUMP...
--set num_comments for all posts update tpost p set num_comments = (select count(1) from ttest where path <@ text2ltree(p.post_id::text)); --list num_comments for all posts select p.post_id, p.title, (select count(1) from ttest where path <@ text2ltree(p.post_id::text)) num_comments from tpost ...
SELECT REPLACE(trim(LOWER("Romance_2"."location"),' \\t\ \\x0b\\f\\r'),',','') AS "Calculation_813462698272518145" FROM "Romance_2" WHERE (("Romance_2"."lat" >= cast('40.466670000000001' as double)) AND ("Romance_2"."lat" <= cast('41' as double)) AND ("Romance_2"."lng" >= cast('-74.25' as double)) AND ("Romance_2"."lng...
RAISERROR('Create function: [dbo].[ufn_formatPlatformSpecificPath]', 10, 1) WITH NOWAIT GO IF EXISTS (SELECT * FROM sysobjects WHERE [id] = OBJECT_ID(N'[dbo].[ufn_formatPlatformSpecificPath]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT')) DROP FUNCTION [dbo].[ufn_formatPlatformSpecificPath] GO CREATE FUNCTION [dbo...
<filename>S4 High Availability/Monitoring/verify_data_synchronization.sql /* Other potential fodder: perf counters: https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/sql-server-database-mirroring-object (i should be able to grab those on 'named instances' by simply grabbing...
# Drop old index to allow creating new one. DROP INDEX ix_tv_episodes_videos_id ON tv_episodes; # Change firstaired colum to be date only. date time was intended for videos table only ALTER TABLE tv_episodes MODIFY firstaired DATE; # Correct the index to include firstaired or by date episodes will only allow for the ...
<reponame>davymartinez/base-de-datos-master<gh_stars>0 /* Listar los códigos, los nombres locales y la región a la que pertenecen aquellos países donde se hable español. (Se esperan 3 columnas y 28 registros) */ SELECT country.code, country.localname, country.region FROM world.country INNER JOIN ...
 CREATE PROCEDURE [calendar].[GetCorpCalendarUpdates] @UserID int = 0, @IsInAppOwnerList bit=0 AS BEGIN SET NOCOUNT ON; BEGIN TRY DECLARE @UserMinistryID TABLE ( MinistryId UNIQUEIDENTIFIER ) INSERT INTO @UserMinistryID SELECT MinistryId FROM SystemUserMinistry WHERE SystemUserId=@Use...
-- 05/12/2019 - Option to show/hide product component on frontend ALTER TABLE `products` ADD `show_components_on_frontend` TINYINT(1) NOT NULL DEFAULT '0' AFTER `not_deliver`;
create table resource ( id serial primary key, name varchar(255), comment text, url varchar(255), created_at timestamptz default LOCALTIMESTAMP not null, updated_at timestamptz default LOCALTIMESTAMP not null, author_id integer );
PROMPT Does not invoke aftereach procedure when aftereach procedure name for a test is null --Arrange declare simple_test ut_test := ut_test( a_after_each_proc_name => null ,a_object_name => 'ut_example_tests' ,a_name => 'ut_passing_test' ); listener ut_event_listener := ut_event_listener(ut_reporter...
# change log_events schema # --- !Ups ALTER TABLE log_events DROP COLUMN event; ALTER TABLE log_events DROP COLUMN code; ALTER TABLE log_events ADD COLUMN exiting BOOLEAN NOT NULL DEFAULT FALSE; # --- !Downs ALTER TABLE log_events ADD COLUMN event CHARACTER VARYING(100); ALTER TABLE log_events ADD COLUMN code CHARAC...
<filename>baidunews/127_0_0_1.sql -- phpMyAdmin SQL Dump -- version 4.4.15.5 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1:8889 -- Generation Time: Apr 22, 2017 at 05:16 AM -- Server version: 5.6.34-log -- PHP Version: 7.0.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
-- begin transaction BEGIN; DROP TRIGGER IF EXISTS cvterm_generate_dbxref ON data_commons.cvterm; DROP TRIGGER IF EXISTS cvterm_insert_trigger ON data_commons.cvterm; CREATE TRIGGER cvterm_generate_dbxref BEFORE INSERT ON data_commons.cvterm FOR EACH ROW EXECUTE PROCEDURE data_commons.cvterm_generate_dbxref('facebas...
<filename>DMS5/V_Predefined_Analysis_Dataset_Info.sql /****** Object: View [dbo].[V_Predefined_Analysis_Dataset_Info] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE VIEW [dbo].[V_Predefined_Analysis_Dataset_Info] AS SELECT C.Campaign_Num AS Campaign, E.Experiment_Num AS Experiment, ...
<gh_stars>10-100 create schema warehouse; set schema 'warehouse'; create table employee_dimension( emp_key int generated always as identity not null primary key, empno int not null, ename varchar(128) not null, dname varchar(128) not null, job varchar(128) not null, unique(empno) ); create tab...
<reponame>emcleod/OG-Platform START TRANSACTION; -- update the version UPDATE rsk_schema_version SET version_value='46' WHERE version_key='schema_patch'; CREATE SEQUENCE rsk_hibernate_sequence START WITH 1 INCREMENT BY 1; CREATE FUNCTION copy_sequence_value (from_name text, to_name text) RETURNS bigint A...
DROP INDEX IF EXISTS address_balance_idx; CREATE INDEX address_balance_idx ON address (balance);
CREATE TABLE `em_user_real_audit` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `uid` int(10) NOT NULL DEFAULT '0' COMMENT '用户id', `audit_uid` int(10) DEFAULT '0' COMMENT '审核人员id', `audit_username` varchar(50) DEFAULT NULL COMMENT '审核人员', `attach_ids` varchar(255) DEFAULT NULL COMMENT '附件id逗号拼...
<reponame>Zhaojia2019/cubrid-testcases -- [er] create vclass using Constraints not null and default create vclass t1 ( c1 int not null DEFAULT 9 ); drop t1;
<gh_stars>0 CREATE TABLE [dbo].[AspNetUserLogins] ( [LoginProvider] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [ProviderKey] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [UserId] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ) ON [PRIMARY] GO ALTER TABLE [...
DROP TABLE IF EXISTS users CASCADE; CREATE TABLE users ( id serial PRIMARY KEY, email varchar NOT NULL UNIQUE CHECK(TRIM(email) <> ''), name varchar NOT NULL UNIQUE CHECK (TRIM(name) <> ''), student_number varchar UNIQUE CHECK (TRIM(student_number) <> ''), admin boolean NOT NULL DEFAULT false, mentor boolea...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Mar 15, 2017 at 09:36 AM -- Server version: 10.1.21-MariaDB -- PHP Version: 7.0.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@...
<reponame>MOSHTAQABDUH/event_system<filename>public/insert.sql /* INSERT QUERY NO: 1 */ INSERT INTO `users`(`id`, `first_name`, `phone`) VALUES ( 1, 'أ / علي محمد الرويلي', 0555447790 ); /* INSERT QUERY NO: 4 */ INSERT INTO `users`(`id`, `first_name`, `phone`) VALUES ( 2, 'م/ محمد علي السلاطين', 533742222 ); /* IN...
<reponame>coingraham/codefights /* You've been promoted and assigned to a new project. The problem is, you don't know who you are working with and your predecessor has vanished without a trace! Luckily, each project in your company keeps its own activity database, which you are going to use to find out the names of you...
CREATE TABLE "users" ( "username" varchar(50) PRIMARY KEY, "email" varchar(50) UNIQUE NOT NULL, "password" varchar(100) NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "deleted_at" timestamp NOT NULL ); CREATE TABLE "role" ( "name" varchar(50) PRIMARY KEY, "description" varc...
<reponame>Dontmovedad/dbProjRepo<filename>create_db.sql Drop table if exists Champ_Type, Item_Type, Item, Pos, recom, Champion, Champ_Pos, Area, Country...
<reponame>bigokro/gruff-server -- Requires there to be a user with id 1 INSERT INTO "claims" ("created_by_id","truth","description","title") VALUES ('1','0.5','This is a debate about the legacy of the recently-deceased Fidel Castro. Should he be praised or demonized for what he did in his 50 years as dictator of Cuba?...
CREATE PROC [dbo].[h3giSmsRecipientRemoval] @phoneNumber AS NVARCHAR(50) AS BEGIN UPDATE h3giSMSPhoneNumbers SET valid ='N' WHERE phoneNumber = @phoneNumber END GRANT EXECUTE ON h3giSmsRecipientRemoval TO b4nuser GO
-- Find the country that start with Y SELECT name FROM world WHERE name LIKE 'Y%' -- Find the countries that end with y SELECT name FROM world WHERE name LIKE '%y' -- Find the countries that contain the letter x SELECT name FROM world WHERE name LIKE '%x%' -- Find the countries that end with land SELE...