sql
stringlengths
6
1.05M
<filename>db/schema.sql -- Drops the departments_db -- DROP DATABASE IF EXISTS departments_db; CREATE DATABASE departments_db; -- Uses the departments_db database -- USE departments_db; -- creates a departments table with a department_id and department keys CREATE TABLE departments ( department_id INT NOT NULL AUTO_I...
<reponame>cyross/mysql_study<gh_stars>0 drop table if exists `view1`; create table `view1` ( `id` char(4) not null UNIQUE, `date` date not null ); insert into `view1` values ('0001', '2021-05-01'), ('0002', '2020-03-01'), ('0003', '2021-03-01'), ('0004', '2021-04-18'), ('0005', '2021-07-11...
<gh_stars>0 -- drop table t_l_pay_logs; -- drop table t_d_return_error; CREATE TABLE `t_l_pay_logs` ( `id` int(11) NOT NULL AUTO_INCREMENT, `req_content` text DEFAULT NULL COMMENT '请求内容', `res_result` text DEFAULT NULL COMMENT '返回结果', `res_code` VARCHAR(32) DEFAULT NULL COMMENT '响应code', `req_type` varchar(...
<filename>MySQL/academia_bd.sql USE academia; CREATE TABLE tipo_documento( codigo VARCHAR(3) PRIMARY KEY, descrpcion VARCHAR(100) NOT NULL )
insert into TODOS (id, task, completed) values (1, 'redux11', true); insert into TODOS (id, task, completed) values (2, 'redux22', true); insert into TODOS (id, task, completed) values (3, 'SpringBoot', true); insert into TODOS (id, task, completed) values (4, 'CRUD', false); insert into TODOS (id, task, completed) val...
<reponame>Imperium/Dis -- -- PostgreSQL database dump -- SET statement_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = off; SET check_function_bodies = false; SET client_min_messages = warning; SET escape_string_warning = off; SET search_path = dis, pg_catalog; -- -- Name: score; Type: T...
DROP TABLE objective8.stars;
-- phpMyAdmin SQL Dump -- version 3.2.2.1deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 11, 2009 at 02:29 PM -- Server version: 5.1.37 -- PHP Version: 5.2.10-2ubuntu6.1 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SE...
# 1 视频基本属性 CREATE TABLE Video_basic( BVID CHAR(12) PRIMARY KEY, title CHAR(200), videos INT, # 分p数 Tag_partition CHAR(20), duration INT ); # 2 视频热度属性 CREATE TABLE Video_popularity( BVID CHAR(12) PRIMARY KEY, view BIGINT, #观看数 barrages BIGINT, # 弹幕数 reply BIGINT, #评论数 f...
<reponame>dmmat/zstore ALTER TABLE `customers` ADD `createdon` Date , ADD `leadstatus` VARCHAR(255) NULL , ADD `leadsource` VARCHAR(255) NULL ; ALTER VIEW `customers_view` AS select `customers`.`customer_id` AS `customer_id`, `customers`.`customer_name` AS `customer_name`, `customers`.`detail`...
ALTER TABLE isu ADD CONSTRAINT `isu_user_id` FOREIGN KEY (jia_user_id) REFERENCES user(jia_user_id); -- ALTER TABLE isu_condition ADD CONSTRAINT `isu_condition_isu_uuid` FOREIGN KEY (jia_isu_uuid) REFERENCES isu(jia_isu_uuid); ALTER TABLE isu_condition ADD INDEX jia_isu_uuid_timestamp(jia_isu_uuid, timestamp desc);
<gh_stars>10-100 SET NAMES 'utf8'; DROP TABLE IF EXISTS `geodb_locations`; CREATE TABLE `geodb_locations` ( `loc_id` int(11) NOT NULL DEFAULT '0', `loc_type` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`loc_id`), KEY `loc_type_idx` (`loc_type`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='static content' ;
-- GENERATED from build/build.sh DO NOT modify this file directly as all changes will be overwritten upon next build -- Automated listing for packages prompt @../packages/assert.pks @../packages/assert.pks prompt @../packages/eba_stds.pks @../packages/eba_stds.pks prompt @../packages/eba_stds_data.pks @../packages/eba_...
<filename>sql2_persediaan/daftar_barang_sql/daftar_barang_kp2tpm.sql DROP VIEW IF EXISTS view_daftar_barang_kp2tpm; CREATE VIEW view_daftar_barang_kp2tpm AS SELECT * FROM view_daftar_barang_kabupaten WHERE 1 = 1; GRANT ALL PRIVILEGES ON view_daftar_barang_kp2tpm TO lap_kp2tpm; REVOKE INSERT, UPDATE, DELETE ON vi...
<reponame>loujine/musicbrainz-server<gh_stars>100-1000 -- Automatically generated, do not edit. \unset ON_ERROR_STOP SET search_path = 'event_art_archive'; DROP TRIGGER update_event_art ON event_art_archive.event_art; DROP TRIGGER resquence_event_art ON event_art_archive.event_art;
-- In case you are using an old blog table style ALTER TABLE io_threads ADD category varchar(128) DEFAULT 'uncategorized'; ALTER TABLE io_threads ADD instance varchar(128) DEFAULT 'default'; RENAME TABLE io_threads TO blog_threads, io_messages TO blog_messages; CREATE TABLE IF NOT EXISTS `blog_threads` ( `id` int(5...
SELECT * FROM WideWorldImporters.sys.tables WITH(NOWAIT) WHERE name in ('PeopleBackup','CountriesBackup')
BEGIN; SELECT PLAN(4); SELECT col_is_pk('dummy_landable', 'access_tokens', 'access_token_id', 'access tokens have PK'); SELECT col_is_fk('dummy_landable', 'access_tokens', 'author_id', 'author_id is FK'); SELECT col_not_null('dummy_landable', 'access_tokens', 'author_id', 'author_id not null'); SELECT col_...
<reponame>imajaydwivedi/Problem-Task---SQL-Server-Slowness $SourceServer = 'SourceServer' $DestinationServer = 'TargetServer' $Database = 'SrcDb' $TableName = 'dbo.facebook' $DbaDatabase = 'sandbox' # Create Copy in Sandbox on Destination Copy-DbaDbTableData -SqlInstance $SourceServer ` -Destinatio...
<reponame>Koopakiller/Archive CREATE TABLE [dbo].[HumanGroupEntries] ( [GroupId] INT NOT NULL , [HumanId] INT NOT NULL, PRIMARY KEY ([GroupId], [HumanId]), CONSTRAINT [FK_HumanGroupEntries_HumanGroups] FOREIGN KEY ([GroupId]) REFERENCES [HumanGroups]([Id]), CONSTRAINT [FK_HumanGroupEntries_Humans]...
insert into type_whiskey( id , description) values (1, 'Malt'); insert into type_whiskey( id , description) values (2, 'Blend'); insert into type_whiskey( id , description) values (3, 'Grain'); insert into type_whiskey( id , description) values (4, 'Bourbon'); insert into type_whiskey( id , description) values (5, 'Ble...
-- MySQL Script generated by MySQL Workbench -- Thu Dec 16 04:11:05 2021 -- 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='ON...
<filename>sql/all_jobs.sql @@show_jobs ALL
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 11, 2022 at 05:36 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 08 Mei 2017 pada 12.27 -- Versi Server: 10.1.13-MariaDB -- PHP Version: 7.0.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER...
<filename>MySQL/update.sql #show table select * from cursos; #inserting entries with typos insert into cursos values ('1', 'pythonh', 'curso de programação', '20', '20', '2021'), ('2', 'latex', 'curso de escrita com latex', '24', '10', '2020'), ('3', 'gastronomica', 'aprendindo fazer cumida', '24', '10', '2025')...
<filename>res/queries.sql -- using 1472396759 as a seed to the RNG BEGIN; select l_returnflag, l_linestatus, sum(l_quantity) as sum_qty, sum(l_extendedprice) as sum_base_price, sum(l_extendedprice * (1 - l_discount)) as sum_disc_price, sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge, avg(l...
<reponame>renskiy/ugly-scheduler -- +migrate Up CREATE TABLE events ( id SERIAL PRIMARY KEY, "when" TIMESTAMPTZ NOT NULL, message VARCHAR(1024) NOT NULL, done BOOL DEFAULT FALSE NOT NULL ); CREATE INDEX events_when_idx ON events ("when") WHERE NOT done; -- +migrate Down DROP T...
<gh_stars>0 SELECT DISTINCT(name) FROM people JOIN stars ON people.id = stars.person_id WHERE movie_id IN (SELECT movie_id FROM stars JOIN people ON stars.person_id = people.id WHERE name = "<NAME>" and birth = 1958) AND name != "<NAME>";
<reponame>stoyanovmiroslav/CSharp-DB-Fundamentals-SoftUni SELECT c.Name, COUNT(*) AS ReportsNumber FROM Reports AS r JOIN Categories AS c ON c.Id = r.CategoryId GROUP BY c.Name ORDER BY ReportsNumber DESC, c.Name
<gh_stars>1-10 --FOR LOOP DECLARE COUNTER NUMBER(2):=10; BEGIN FOR COUNTER IN 10..20 LOOP DBMS_OUTPUT.PUT_LINE('COUNTER - '||COUNTER); END LOOP; END; --FOR LOOP REVERSE DECLARE COUNTER NUMBER(2):=10; BEGIN FOR COUNTER IN REVERSE 20..10 LOOP DBMS_OUTPUT....
CREATE TABLE func_import_project_delta( change_uuid VARCHAR(40) NOT NULL, project_uuid VARCHAR(40) NOT NULL, parent_uuid VARCHAR(40), project_status_uuid VARCHAR(40), hub_uuid VARCHAR(40), name VARCHAR(40), title VARCHAR(1024) ); CREATE TRIGGER func_import_project_delta_bi_1 BEFORE INS...
-- postgres -- single line SELECT name /* inline */ FROM book /* multiple lines */ -------------------------------------------------- -- mysql -- a white space after the second dash is neccesary /* multiple lines */ # from this char till the end of line
<reponame>BearerPipelineTest/sqlc<gh_stars>1000+ CREATE TABLE foo (id text not null); CREATE TABLE bar (id text not null); -- name: IdenticalTable :many SELECT * FROM foo;
--*-- Local-Table: mydata alter table @mydata@ add column data2 text;
CREATE TABLE term ( term_id SERIAL PRIMARY KEY, reqs_id int REFERENCES sem_req(id), semester TEXT CHECK (semester = 'Summer' OR semester = 'Spring' OR semester = 'Fall'), year int CHECK (year > 2013 AND year < 3000), is_current BOOLEAN CHECK (is_current = true OR is_current = null), CONSTRAINT u...
DROP DATABASE IF EXISTS Faber; CREATE DATABASE Faber DEFAULT CHARACTER SET utf8 ; USE Faber; DROP TABLE IF EXISTS Airport; CREATE TABLE Airport ( id int(11) NOT NULL AUTO_INCREMENT, name VARCHAR(250) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS Flight; ...
\c megauni_db SELECT pg_catalog.format_type(t.oid, NULL) AS "name" FROM pg_catalog.pg_type t LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace WHERE (t.typrelid = 0 OR (SELECT c.relkind = 'c' FROM pg_catalog.pg_class c WHERE c.oid = t.typrelid)) AND NOT EXISTS(SELECT 1 FROM pg_catalog.pg_type el WHERE el....
-- This file should undo anything in `up.sql` DROP TABLE gallery_posts; DROP TABLE gallery_item_posts;
BACKUP DATABASE [contsoSQLInventory] TO DISK = N'G:\MSSQLData\SQL2016_Backup\contsoSQLInventory\FULL\contsoSQLInventory_FULL_20190206_225446.bak' WITH NO_CHECKSUM, COMPRESSION; RESTORE DATABASE [contsoSQLInventory_Ajay] FROM DISK = N'G:\MSSQLData\SQL2016_Backup\contsoSQLInventory\FULL\contsoSQLInventory_FULL_201...
SELECT employees.ename, department.dept FROM department RIGHT JOIN employees USING(eid); SELECT employees.ename, department.dept FROM employees LEFT JOIN department USING(eid);
<filename>04MicrosoftSQLServer/Exams/Exam-16-Apr-2019/10PSP.sql --10. PSP SELECT pl.[Name], pl.Seats, Count(t.PassengerId) AS [Passengers Count] FROM Planes AS pl LEFT JOIN Flights AS fl ON pl.Id = fl.PlaneId LEFT JOIN Tickets AS t ON fl.Id = t.FlightId GROUP BY pl.[Name], pl.Seats ORDER BY [Passengers Count] DESC...
/* SQLyog Ultimate v8.55 MySQL - 5.6.21-log : Database - voucherpool ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KE...
UPDATE ps_event_types SET time_updated=now WHERE event_type=%s CREATE TABLE ALUSAPRef ( id SERIAL PRIMARY KEY, deviceid int, name varchar(128), sapDescription varchar(512), sapIngressQosPolicyId int, sapEgressQosPolicyId int, begin_time timestamp, end_time timestamp, FOREIGN KEY (deviceid) references device(id) ON DELE...
-- file:numeric_big.sql ln:424 expect:true INSERT INTO num_exp_add VALUES (9,7,'-818934540016982261.6531497299449197724377671791525718697972839615905835264955913915642981756269895453132994072062009651997525654737960365436259849477921361006939911691298738400665602344352750144746468217344538530331526708604445524636127356...
/*手动添加删除建立的表的sql语句,和下边在菜单表中相关的数据*/ DELETE from `wz_menu` WHERE `menuid`=36; DELETE from `wz_menu` WHERE `menuid`=107; DELETE from `wz_menu` WHERE `menuid`=108; DELETE from `wz_menu` WHERE `menuid`=153; DELETE from `wz_menu` WHERE `menuid`=154; DELETE from `wz_menu` WHERE `menuid`=155; DELETE from `wz_menu` WHERE `menu...
<gh_stars>10-100 alter table Institution add column assetsURL varchar(2083);
<reponame>fracassi-marco/tdd-in-the-real-life CREATE DATABASE shop; \c shop CREATE TABLE products ( name varchar(128) PRIMARY KEY, description varchar(512), image varchar(1024) ); CREATE TABLE cart ( name varchar(128), price integer );
drop table sqlfilerollback; drop table sqlfilerollback2;
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA foo TO role_bar, role_baz; SELECT * FROM t WHERE a IS NOT DISTINCT FROM b;
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.1 -- Dumped by pg_dump version 9.5.1 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; ...
<filename>schema.sql -- Uncomment the line below if you need to delete the database before creating a new one -- -- DROP DATABASE IF EXISTS pets_db; -- -- Creates the pets database -- CREATE DATABASE pets_db;
<gh_stars>0 USE [Grasews2.0] GO INSERT INTO [dbo].[ServiceDescription] ([IdOwnerUser] ,[ServiceName] ,[Xml] ,[RegistrationDateTime]) VALUES (1 ,'MicroAffyNormService' ,'<?xml version="1.0" encoding="UTF-8"?> <wsdl2:description targetName...
<reponame>ilham-yale2/wisata_bali<filename>databaseProject/db_php.sql -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 11 Jan 2021 pada 08.54 -- Versi server: 10.4.14-MariaDB -- Versi PHP: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; ...
<gh_stars>0 CREATE TABLE IF NOT EXISTS `forums` ( `serverId` int(8) NOT NULL DEFAULT '0', `forum_id` int(8) NOT NULL DEFAULT '0', `forum_name` varchar(255) NOT NULL DEFAULT '', `forum_post` int(8) NOT NULL DEFAULT '0', `forum_type` int(8) NOT NULL DEFAULT '0', `forum_owner_id` int(8) NOT NULL DEFAULT '0', ...
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 21, 2019 at 04:12 PM -- Server version: 5.7.22-0ubuntu0.16.04.1 -- PHP Version: 7.0.30-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_C...
-- phpMyAdmin SQL Dump -- version 4.6.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 07, 2017 at 02:52 PM -- Server version: 5.7.16 -- PHP Version: 7.0.8-0ubuntu0.16.04.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER...
-- ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<PASSWORD>'; -- flush privileges; DROP DATABASE IF EXISTS trackerDB; CREATE database trackerDB; USE trackerDB; CREATE TABLE employee ( id INT AUTO_INCREMENT NOT NULL, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(30) NOT NULL, ...
<reponame>unaio/UNA<filename>modules/boonex/spaces/updates/13.0.0_13.0.1/install/sql/enable.sql<gh_stars>1-10 -- SETTINGS SET @iCategId = (SELECT `id` FROM `sys_options_categories` WHERE `name`='bx_spaces' LIMIT 1); DELETE FROM `sys_options` WHERE `name`='bx_spaces_enable_auto_approve'; INSERT INTO `sys_options` (...
insert into eg_role (id,name,code,description,createddate,createdby,lastmodifiedby,lastmodifieddate,version,tenantid)values (nextval('SEQ_EG_ROLE'),'Employee','EMPLOYEE','Default role for all employees',now(),1,1,now(),0,'testtenant.ulb1'); insert into eg_role (id,name,code,description,createddate,createdby,lastmodifie...
-- file:foreign_data.sql ln:546 expect:true CREATE TRIGGER trigtest_after_row AFTER INSERT OR UPDATE OR DELETE ON foreign_schema.foreign_table_1 FOR EACH ROW EXECUTE PROCEDURE dummy_trigger()
alter table "public"."location" add constraint "location_account_fkey" foreign key ("account") references "public"."user" ("account") on update restrict on delete restrict;
<reponame>dram/metasfresh -- 15.02.2017 08:14 -- URL zum Konzept INSERT INTO AD_Role (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Tree_Menu_ID,Allow_Info_Account,Allow_Info_Asset,Allow_Info_BPartner,Allow_Info_CashJournal,Allow_Info_CRP,Allow_Info_InOut,Allow_Info_Invoice,Allow_Info_MRP,Allow_Info_Order,Allow_Info_Payment,All...
select REPLICATE( 'ha', 5 )
CREATE TABLE `user_safe` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `userId` bigint(20) DEFAULT NULL, `security_key` varchar(32) DEFAULT NULL, `api_key` varchar(32) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SELECT min(c1),c3 FROM `union_01.parquet` group BY c3 UNION SELECT min(c1),c3 FROM `union_02.parquet` group BY c3;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; 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 ...
SELECT reinterpretAsFloat32(CAST(123456 AS UInt32)); SELECT reinterpretAsUInt32(CAST(1.23456 AS Float32)); SELECT reinterpretAsFloat32(CAST(123456 AS Int32)); SELECT reinterpretAsInt32(CAST(1.23456 AS Float32)); SELECT reinterpretAsFloat64(CAST(123456 AS UInt64)); SELECT reinterpretAsUInt64(CAST(1.23456 AS Float64)); S...
CREATE TABLE IF NOT EXISTS targeting_results ( id bigint NOT NULL auto_increment, targeting_session bigint NOT NULL comment 'Targeting session id', household_id bigint NOT NULL comment 'Household id', ranking int NOT NULL comment 'Ranking based PMT score. Can also be changed', status varchar(30) NOT NULL comment '...
drop table if exists t1; drop table if exists t2; drop table if exists t3; create table t1(i int) partition by range(i) (partition p0 values less than (100),partition p1 values less than(2147483650)); create table t1(i int) partition by range( i ) (partition p1 values less than(2147483650)); create table t1(i int) par...
INSERT INTO burgers (burger_name) VALUES ('Cheeseburger'); INSERT INTO burgers (burger_name) VALUES ('Double cheeseburger'); INSERT INTO burgers (burger_name, devoured) VALUES ('Baconator', true); INSERT INTO burgers (burger_name, devoured) VALUES ('Big Mac', true); INSERT INTO burgers (burger_name, devoured) VALUES ('...
<reponame>binderclip/code-snippets-mysql -- create table CREATE TABLE cool_table ( id INT(10) UNSIGNED NOT NULL auto_increment, a INT(10) UNSIGNED NOT NULL, b INT(10) UNSIGNED NOT NULL, PRIMARY KEY (`id`) ); -- insert data INSERT INTO cool_table (a, b) VALUES (1, 15), (2, 12), ...
Select Mogib1, Mogib2, IdentifyNumber, SocialNumber, SchoolCode , SeqNumber, Year, Grade, Term, Prize, Name, PrizeGrade, strDate , ConferAsso, Participan From PrizeHistory
START TRANSACTION; ALTER TABLE cluster ADD COLUMN color varchar(20) NOT NULL DEFAULT 'saddlebrown'; DROP VIEW IF EXISTS active_cluster__vw; CREATE VIEW active_cluster__vw AS SELECT c.* FROM cluster c WHERE c.deleted_on IS NULL ORDER BY c.name ASC ; COMMIT;
<gh_stars>1-10 <SQLBuilder_Common> DECLARE @SQL_Work VARCHAR(MAX) DECLARE @FileGroup VARCHAR(50) = '' --QUOTENAME(@SourceSchema + 'FG') DECLARE @CreateTable VARCHAR(200) = 'CREATE TABLE ' + QUOTENAME(@TargetSchema) + '.' + QUOTENAME(@SourceTable) + ' (' DECLARE @CreateTable_Work VARCHAR(200) = 'CREATE TABLE [work].' ...
USE final_final; -- ----------------------------------------------------------------------------------- -- View all GBM models CREATE VIEW gbm_all_mod_view AS SELECT gbm_hpara.* , models_metrics.rmse FROM models_metrics JOIN gbm_hpara ON models_metrics.model_name = gbm_hpara.model_id WHERE models_metrics.algo_id = '...
<filename>src/FirebirdDbComparer.Tests/Compare/ComparerTestsData/Changing/DomainDataTypeUsedInView_00.Source.sql create domain number as int; create view v as select cast(null as number) as n from rdb$database;
<filename>server/catgenome/src/main/resources/database/catgenome/postgres/v2016.12.12_14.35__project_created_by_index.sql CREATE INDEX project_created_by_idx ON CATGENOME.PROJECT(created_by);
<filename>src/test/resources/fts3fault.test_7.sql -- fts3fault.test -- -- execsql { COMMIT } COMMIT
<reponame>DeCecco/lab4 -- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Servidor: 1192.168.127.12 -- Tiempo de generación: 05-10-2015 a las 04:22:15 -- Versión del servidor: 5.6.24 -- Versión de PHP: 5.6.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
<gh_stars>0 Update creature SET spawntimesecs = 14000 WHERE map IN (603);
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64) -- -- Host: localhost Database: c9 -- ------------------------------------------------------ -- Server version 5.7.13-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *...
select di.SOPInstanc from DICOMImages as di inner join DICOMSeries as ds on di.SeriesInst = ds.SeriesInst where lower(ds.Modality)='rtstruct' and di.ImagePat not in ( select RadiomicPat from DICOMRadiomics where ImagePat=RadiomicPat);
DROP TABLE taskrunner_test3_test3 ;
CREATE TABLE IF NOT EXISTS "proxy_endpoints" ( "id" SERIAL PRIMARY KEY, "api_id" INTEGER NOT NULL, "endpoint_group_id" INTEGER, "environment_id" INTEGER NOT NULL, "name" TEXT NOT NULL, "description" TEXT, "active" BOOLEAN NOT NULL DEFAULT TRUE, "cors_enabled" BOOLEAN NOT NULL DEFAULT TRUE, "routes" JS...
<filename>test/integration/020_ephemeral_test/models-n/ephemeral_level_two.sql {{ config( materialized = "ephemeral", ) }} select * from {{ ref('source_table') }}
<reponame>chopeen/dataverse<filename>doc/sphinx-guides/source/_static/util/pg8-createsequence-prep.sql<gh_stars>1-10 -- handle absence of CREATE OR REPLACE LANGUAGE for postgresql 8.4 or older -- courtesy of the postgres wiki: https://wiki.postgresql.org/wiki/CREATE_OR_REPLACE_LANGUAGE CREATE OR REPLACE FUNCTION make_p...
<reponame>shilad/wikibrain DROP TABLE IF EXISTS RAW_PAGE
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Mar 23, 2020 at 10:04 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.0.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!4...
<gh_stars>0 -- @testpoint:opengauss关键字sysid(非保留),作为字段数据类型(合理报错) --前置条件 drop table if exists explain_test cascade; --关键字不带引号-合理报错 create table explain_test(id int,name sysid); --关键字带双引号-合理报错 create table explain_test(id int,name "sysid"); --关键字带单引号-合理报错 create table explain_test(id int,name 'sysid'); --关键字带反引号-合理报...
<gh_stars>0 CREATE TABLE admin( id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, nama TEXT, username TEXT, password TEXT ); CREATE TABLE kategori( id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, nama TEXT, deskripsi TEXT, url_gambar TEXT ); CREATE TABLE kriteria( id INT(11) NOT N...
DROP TRIGGER IF EXISTS trg3_sql_question_update_correct_trainer; delimiter // CREATE TRIGGER `trg3_sql_question_update_correct_trainer` BEFORE UPDATE ON sql_question FOR EACH ROW BEGIN DECLARE isTrainer BOOLEAN; SELECT is_trainer FROM user WHERE user_id = NEW.author_id INTO isTrainer; IF isTrainer = 0 THEN S...
<filename>sql/partiton.sql DROP TABLE product CASCADE CONSTRAINTS; create table PRODUCT ( id number(9) NOT NULL, customer_id number(9) NOT NULL, name varchar2(50) NOT NULL, infomation varchar2(200 CHAR), price number(9) NOT NULL, category_id number(9) NOT NULL,...
<reponame>farisisham/Web-Pendaftaran-Tk-An-Nur -- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 18, 2017 at 02:54 PM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!401...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 20, 2021 at 08:17 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.2.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!4...
CREATE TABLE [dbo].[CONFLICT_CONFLICTS] ( Id int identity(1,1) NOT NULL, ConflictListId int NOT NULL, ConflictTypeId int NOT NULL, ConflictDetails nvarchar(max) NULL, ConflictedChangeActionId bigint NULL, ChangeGroupId bigint NULL, ConflictedLinkChangeActionId bigint NULL, ConflictedLinkChangeGroupId bigint N...
<reponame>norton120/kimball_dbt ---------- SLOWLY CHANGING DIMENSION ENGINE {%- macro scd_engine(transformed_cte, kwargs) -%} {# ---- INTENT: Abstract the slowy changing dimension management from production models. ---- General workflow should be: ---- 1) complete all your transforms on new source data f...
<filename>src/test/resources/sql/begin/4eff40d3.sql -- file:plpgsql.sql ln:3503 expect:false begin perform raise_test()
<reponame>trussworks/mymove<filename>migrations/app/schema/20200218231559_create_insert_ghc_domestic_transit_times.up.sql -- Table Definition CREATE TABLE "public"."ghc_domestic_transit_times" ( "id" uuid NOT NULL, "max_days_transit_time" int4 NOT NULL, "weight_lbs_lower" int4 NOT NULL, "weight_lbs_uppe...
use master GO create database fudgeflix_v3; ALTER DATABASE fudgeflix_v3 SET RECOVERY SIMPLE;