sql
stringlengths
6
1.05M
-- Drops the day_planner_db if it already exists -- DROP DATABASE IF EXISTS ee_tracker_db; -- Create the database day_planner_db and specified it for use. CREATE DATABASE ee_tracker_db; USE ee_tracker_db; -- Create the table plans. CREATE TABLE department ( id int NOT NULL AUTO_INCREMENT, name VARCHAR(30) NOT NU...
create or replace FUNCTION "FNGETFRINGE" (AS_PROPOSAL_NUMBER OSP$EPS_PROPOSAL.PROPOSAL_NUMBER%TYPE, AI_VERSION_NUMBER osp$budget.version_number%type) return NUMBER is li_fringe number; BEGIN li_fringe := 0; select DECODE(sum(ROUND(osp$budget_details_cal_amts.calculated_cost )),NULL,0, ...
select DISTINCT COALESCE(j1.c_varchar || j2.c_varchar || j3.c_varchar || j4.c_varchar, 'EMPTY') as concatentated_string from j1 LEFT OUTER JOIN j2 ON (j1.c_bigint = j2.c_bigint) LEFT OUTER JOIN j3 ON (j1.c_bigint = j3.c_bigint) LEFT OUTER JOIN j4 ON (j1.c_bigint = j4.c_bigint) where j1.c_big...
select fn_db_add_column('vds_dynamic', 'glusterfs_cli_version', 'varchar(4000)');
create schema sp1; create table sp1.subreddits ( id serial primary key, reddit_id varchar(6) not null unique, title text not null, author text not null, subreddit text not null, body text not null, num_comments integer not null, score integer not null, created timestamp not null ); create table sp1...
select id , datetime_columns , timestamp_columns , nil_datetime_columns FROM goma_date_types
ALTER TABLE users ALTER COLUMN external_id DROP DEFAULT; SELECT fn_db_change_column_type('users', 'external_id', 'bytea', 'text'); ALTER TABLE users ALTER COLUMN external_id SET NOT NULL; ALTER TABLE ad_groups ALTER COLUMN external_id DROP DEFAULT; SELECT fn_db_change_column_type('ad_groups', 'external_id', 'bytea', 't...
<filename>beihu-boot-samples/beihu-boot-mybatis-sample/test.sql /* Navicat Premium Data Transfer Source Server : Haina-Dev-Mysql Source Server Type : MySQL Source Server Version : 80017 Source Host : 192.168.2.44:3307 Source Schema : test Target Server Type : MySQL Target Serve...
DROP SEQUENCE idstest CASCADE;
CREATE TABLE "session" ( "id" VARCHAR(20) PRIMARY KEY, "user_id" VARCHAR(20) NOT NULL, "metadata" JSONB NOT NULL, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), "last_seen_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), "expired_at" TIMESTAMP WITH...
<filename>sql/stored_procs/pGetGeneralStats.sql CREATE OR REPLACE FUNCTION dbo.pGetGeneralStats() RETURNS TABLE( "LastArticleTitle" VARCHAR(255), "PopularArticleTitle" VARCHAR(255), "PublishedArticleCount" INTEGER, "DraftArticleCount" INTEGER, "LockedArticleCount" INTEGER, ...
<filename>sql/_16_index_enhancement/_03_index_keylimit/cases/_009_keylimit_zero.sql CREATE TABLE t1 ( a INT NOT NULL, b VARCHAR(40) NOT NULL, c CHAR(3) ); CREATE UNIQUE INDEX idx_t1_ac ON t1(a,c); CREATE INDEX idx_t1_abc ON t1(a,b,c); insert into t1 values (1, 'Adalius', '086'); insert into t1 values (2,...
-- @testpoint: opengauss关键字national(非保留),作为同义词对象名,部分测试点合理报错 --前置条件 drop table if exists explain_test; create table explain_test(id int,name varchar(10)); --关键字不带引号-成功 drop synonym if exists national; create synonym national for explain_test; insert into national values (1,'ada'),(2, 'bob'); update national set natio...
-- @testpoint:opengauss关键字more(非保留),作为外部数据源名 --关键字不带引号-成功 drop data source if exists more; create data source more; drop data source more; --关键字带双引号-成功 drop data source if exists "more"; create data source "more"; drop data source "more"; --关键字带单引号-合理报错 drop data source if exists 'more'; create data source 'more'; ...
set current_schema='shipping_schema'; ---------------current_user/getpgusername shipping case1----------------- ---case1 shipping--- explain (num_costs off) select current_user, getpgusername(), sum(t4.a) from t4, t5 where t4.b = t5.a; ---case2 shipping--- explain (num_costs off) select sum(t4.a) from t4, t5 where t...
<filename>migration/01.sql<gh_stars>0 CREATE TABLE nato ( alpha VARCHAR(8), bravo VARCHAR(8), second_id INT, PRIMARY KEY (alpha, bravo, second_id) ); CREATE TABLE second_table ( id INT NOT NULL, charlie VARCHAR(8), third_id INT, PRIMARY KEY (id) ); INSERT INTO second_table (id, charlie, third_id) VALUES (1, '...
<filename>Ylperj-database/demand.sql USE YlperJ; CREATE TABLE Demands ( Id BIGINT NOT NULL AUTO_INCREMENT, UserId BIGINT NOT NULL, DesiredPickupLocation POINT NOT NULL, DesiredStartDateTime DATETIME NOT NULL, DesiredDropLocation POINT NOT NULL, DesiredDropDateTime DATETIME NOT NULL, PRIMAR...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jul 14, 2021 at 08:29 AM -- Server version: 10.4.18-MariaDB -- PHP Version: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
<gh_stars>0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -------------------------------------------------------- -- Table structure for table images -- -------------------------------------------------------- CREATE TABLE IF NOT EXISTS images ( id_img char(5) NOT NULL, time_upld timestamp...
<reponame>huangxy7/shop -- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- 主机: 127.0.0.1:3306 -- 生成日期: 2019-05-22 18:21:26 -- 服务器版本: 5.7.24 -- PHP 版本: 7.2.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_...
with recursive graph as ( select 1 id, 2 parent_id union all select 1 id, 3 parent_id union all select 4 id, 3 parent_id union all select 5 id, 4 parent_id union all select 6 id, 5 parent_id union all select 7 id, 6 parent_id union all select 8 id, 7 parent_id union ...
<filename>db.sql -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: mysql_container:3306 -- Generation Time: Nov 22, 2020 at 12:10 AM -- Server version: 8.0.21 -- PHP Version: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
UPDATE `zt_block` SET `grid` = 8 WHERE `block` IN ('statistic', 'flowchart', 'welcome'); UPDATE `zt_block` SET `grid` = 4 WHERE `block` = 'overview';
<reponame>cliftonr/GraphQLServer -- DDL generated by Postico 1.4.4 -- Not all database features are supported. Do not use for backup. -- Table Definition ---------------------------------------------- CREATE TABLE study_sets ( set_id SERIAL PRIMARY KEY, title character varying(100) NOT NULL, description c...
<reponame>Player1os/plsql-utility -- Assuming we have a generic table, similar to this one: /* CREATE TABLE "table" NOLOGGING COMPRESS ( "key_1" NUMBER(38), "key_2" NUMBER(38), -- ... "key_n" NUMBER(38), "x_1" VARCHAR(256), "x_2" VARCHAR(256), -- ... "x_m" VARCHAR(256) ); */ -- With a constraint similar to ...
--checked INSERT INTO ROOT.ADDRESS (ID,CHRISTIANNAME,NAME,STREET,ZIPCODE,CITY,PHONE) VALUES(1,'Peter','Dillinger','Hollertszug 4','85454','Albital','07866673'), (2,'Hildegard','Walburger','Am Kassau 33','24445','Nachigental','054544'); --checked INSERT INTO ROOT.ROOMS (ID,CATEGORY,CODE,NAME) ...
<reponame>getwasim/egov-smartcity-suites-test<filename>egov/egov-ptis/src/main/resources/db/migration/sample/V20161213180220__ptis_vacancyremission_wfmatrix.sql --------------deleting existing wf matrix---------------------------- delete from eg_wf_matrix where objecttype='VacancyRemission'; delete from eg_wf_matrix ...
--liquibase formatted sql --changeset artemov_i:AuthShowAction.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 ('AuthShowAction','/*AuthShowAction*/ select /*Pagination*/ ...
<filename>distribution.sql use distribution go SET NOCOUNT ON GO IF ((SELECT COUNT(*) FROM tempdb.sys.tables WHERE name = '##CE') > 0) DROP TABLE ##CE GO CREATE TABLE ##CE ([DESCRIPTION] VARCHAR(100) NOT NULL, [VALUE] VARCHAR(100) NOT NULL) GO INSERT INTO ##CE VALUES('Continue', 1) GO DECLARE @CONSOL...
-- file:name.sql ln:21 expect:true ')
<gh_stars>10-100 CREATE INDEX mto_shipments_requested_pickup_date_idx ON mto_shipments (requested_pickup_date);
-- -------------------------------------------------------- -- 主机: 172.16.31.10 -- 服务器版本: 5.5.19-log - Source distribution -- 服务器操作系统: Linux -- HeidiSQL 版本: 11.0.0.5919 -- -------------------------------------------------------- /*!...
INSERT INTO burgers (burger_name) Values("Impossible Burger"); INSERT INTO burgers (burger_name) Values("Beyond Burger"); INSERT INTO burgers (burger_name) Values("California Burger");
SET FOREIGN_KEY_CHECKS=0; drop table if exists Locations; drop table if exists UserPosts; drop table if exists Users; drop table if exists UserReplies; drop table if exists PostCategories; drop table if exists Categories; SET FOREIGN_KEY_CHECKS=1; create table Locations ( locId int auto_increment, lat decimal(25,2...
<reponame>lvzhenchao/tp6_auth<filename>message.sql -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- 主机: localhost -- 生成日期: 2020-04-30 09:19:10 -- 服务器版本: 5.7.26 -- PHP 版本: 7.3.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!4010...
<reponame>viswaratha12/dbwarden /****** Object: View [dbo].[V_Assigned_Storage_Report] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE VIEW [dbo].[V_Assigned_Storage_Report] AS SELECT T_Instrument_Name.IN_name AS Instrument, Storage.SP_vol_name_client + Storage.SP_path AS [Storage Path...
<gh_stars>1-10 ALTER TABLE domain ADD allow_manage INTEGER DEFAULT 1; ALTER TABLE domain ADD CONSTRAINT domain_allow_manage_ck CHECK (allow_manage IN (0, 1)); UPDATE domain SET allow_manage = 1; ALTER TABLE domain MODIFY (allow_manage INTEGER CONSTRAINT domain_allow_manage_nn NOT NULL); COMMIT; QUIT;
CREATE TABLE `search_result_counts` ( `id` int(11) NOT NULL AUTO_INCREMENT, `occurrence` int(11) DEFAULT NULL, `timestamp` int(11) DEFAULT NULL, `search_term` varchar(256) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; ALTER TABLE `page_views` ADD COLUMN `registry_object_id` int(11)...
-- Start transaction and plan tests begin; select plan(10); -- Declare some variables \set user1ID '00000000-0000-0000-0000-000000000001' \set repo1ID '00000000-0000-0000-0000-000000000001' \set package1ID '00000000-0000-0000-0000-000000000001' \set image1ID '00000000-0000-0000-0000-000000000001' \set maintainer1ID '0...
set grammar to oracle; set datestyle='ISO,YMD'; select to_timestamp('20150102','yyyymmdd') from dual; select to_timestamp('18000202 12:23:59','yyyymmdd hh:mi:ss') from dual; select to_timestamp('20150102 12:23:59','yyyymmdd hh24:mi:ss') from dual; select to_timestamp('2015,01,02','yyyy,mm,dd') from dual; select to_time...
SET client_min_messages TO 'warning'; INSERT INTO editor (id, name, privs, password, ha1) VALUES (1, 'normal_editor', 0, '{CLEARTEXT}password', '<PASSWORD>'), (2, 'autoeditor', 1, '{CLEARTEXT}password', '<PASSWORD>'), (3, 'bot', 2, '{CLEARTEXT}password', '<PASSWORD>'), -- Reminder:...
<reponame>SKalt/pg_sql_parser_tests<gh_stars>0 ALTER PUBLICATION mypublication ADD TABLE users, departments;
<reponame>opengauss-mirror/Yat<filename>openGaussBase/testcase/KEYWORDS/temporary/Opengauss_Function_Keyword_Temporary_Case0018.sql -- @testpoint:opengauss关键字temporary(非保留),作为数据库名 --关键字不带引号-成功 drop database if exists temporary; create database temporary; drop database temporary; --关键字带双引号-成功 drop database if exists ...
<gh_stars>0 select * from Emploee where id = @bind{id}
<reponame>andreashauschild/jstateio<gh_stars>0 create table PROCESS_INSTANCES ( id uuid not null, CREATED timestamp not null, CREATED_BY varchar(255) not null, LAST_MODIFIED timestamp not null, MODIFIED_BY varchar(255) not null, RESERVATION_ID varchar(255), RE...
<gh_stars>0 INSERT INTO Track (TrackId, Name, AlbumId, MediaTypeId, GenreId, Composer, Milliseconds, Bytes, UnitPrice) VALUES (10000000, 'New Song', 237, 1, 1, '<NAME>', 264568, 8623572, 0.99); INSERT INTO EMPLOYEE (EMPLOYEEID, LASTNAME, FIRSTNAME, TITLE, CITY) SELECT 9, CUSTOMER.LASTNAME, CUSTOMER.FIRSTNAME, 'Hel...
<reponame>carnic96/tweet -- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 07, 2017 at 01:42 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"; /*!40101 SET @OLD_CHARACTER_...
<gh_stars>0 USE enodb; CREATE TABLE users ( id int NOT NULL AUTO_INCREMENT, name char(64), password char(64), status varchar(255), bonus int NOT NULL, admin boolean, PRIMARY KEY (id), INDEX (id), UNIQUE INDEX (name) ); CREATE TABLE orders ( ...
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Aug 01, 2019 at 03:46 PM -- Server version: 5.7.25-0ubuntu0.18.04.2 -- PHP Version: 7.2.15-0ubuntu0.18.04.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
<reponame>SimeonHristov99/SQLEveryDay select p.id, p.name, count(*) as toy_count from people p join toys t on p.id = t.people_id group by p.id, p.name
-- MySQL dump 10.13 Distrib 5.1.73, for redhat-linux-gnu (x86_64) -- -- Host: localhost Database: activist -- ------------------------------------------------------ -- Server version 5.1.73 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES...
<filename>Select/3-Combined/03-SoftUni.sql<gh_stars>0 --SoftUni-- --1 SELECT TOP (5) FirstName, LastName FROM Employees ORDER BY Salary DESC; --2 SELECT FirstName, LastName FROM Employees WHERE NOT (DepartmentID = 4) --3 SELECT * FROM Employees ORDER BY Salary DESC, FirstName ASC, LastName DESC, MiddleName ASC --4...
<filename>db/seed.sql use employee_record_db; INSERT INTO department(name) VALUES('Engineering'); INSERT INTO department(name) VALUES('Legal'); INSERT INTO department(name) VALUES('Finance'); INSERT INTO department(name) VALUES('Sales'); INSERT INTO role(title, salary, department_id) VALUES('Engineering',180000,1)...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th4 14, 2022 lúc 06:21 AM -- Phiên bản máy phục vụ: 10.4.22-MariaDB -- Phiên bản PHP: 7.4.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
<gh_stars>1-10 --Update [PN] --set PNTypeID = ( --select [TYPE].TYPEID --from [TYPE] --Where [TYPE].TYPEType = [PN].PNType --)
<gh_stars>1-10 CREATE TABLE github_issues ( id integer NOT NULL CONSTRAINT github_issues_pk PRIMARY KEY, repo_id integer NOT NULL, number integer NOT NULL, state varchar NOT NULL, locked boolean ...
<reponame>WuNein/borm-pg CREATE SEQUENCE test_id_seq INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1; CREATE TABLE IF NOT EXISTS test ( id integer NOT NULL DEFAULT nextval('test_id_seq'::regclass), name character varying(255) NOT NULL, age integer NOT NULL, ctime timestamp NOT NULL DEFAULT C...
-- phpMyAdmin SQL Dump -- version 4.0.5 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Aug 15, 2013 at 10:55 PM -- Server version: 5.5.32-MariaDB-log -- PHP Version: 5.4.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET...
------------------- -- Add missing token account association ------------------- -- create a temporary table to hold the last transaction consensus timestamp when the migration is run create table if not exists last_transaction ( consensus_timestamp bigint ); insert into last_transaction (consensus_timestamp) selec...
CREATE TABLE [nomenclatures].[State] ( [StateId] INT NOT NULL PRIMARY KEY IDENTITY, [CountryId] INT NOT NULL, [Name] NVARCHAR(50) NOT NULL, [Code] NVARCHAR(2) NOT NULL, CONSTRAINT [FK_State_Country] FOREIGN KEY ([CountryId]) REFERENCES [nomenclatures].[Country]([CountryId]) )
CREATE DATABASE IF NOT EXISTS `issuetracker` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `issuetracker`; -- MySQL dump 10.13 Distrib 5.6.17, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: issuetracker -- ------------------------------------------------------ -- Server version 5.6.22-log /*!40101 SET @OLD_CHAR...
<gh_stars>0 CREATE OR REPLACE PROCEDURE CMS_PROD.TESTFEE (p_input IN VARCHAR2, p_out OUT VARCHAR2, p_out2 OUT VARCHAR2) IS BEGIN p_out := 'ok1'; p_out2 := 'ok2'; END;
<filename>aws/redshift/views/quarterly_workshop_attendance_view.sql DROP VIEW IF EXISTS quarterly_workshop_attendance_view CASCADE; CREATE OR REPLACE VIEW analysis.quarterly_workshop_attendance_view AS SELECT u.studio_person_id, pdw.course, sy.school_year, MAX(CASE WHEN pdw.subject IN ( ...
<reponame>opengauss-mirror/Yat<gh_stars>0 -- @testpoint:opengauss关键字trusted(非保留),作为表空间名 --关键字不带引号,创建成功 drop tablespace if exists trusted; CREATE TABLESPACE trusted RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1'; drop tablespace trusted; --关键字带双引号,创建成功 drop tablespace if exists "trusted"; CREATE TABLESPACE "...
insert into cursos values ('1', 'HTML', 'Curso de HTML5', '40', '37', '2012'), ('2', 'Algoritmos', 'Lógica de Programação', '20', '15', '2014'), ('3', 'PhotoShop', 'Dicas de PhotoShop CC', '10', '8', '2014'), ('4', 'PGP', 'Curso de PHP para iniciantes', '40', '20', '2010'), ('5', 'Jarva', 'INtrodução a Linguagem Java',...
-- phpMyAdmin SQL Dump -- version 4.5.5.1 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Ven 25 Octobre 2019 à 17:11 -- Version du serveur : 5.7.11 -- Version de PHP : 7.0.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_...
SELECT invoices.date, invoices.total, invoices.inv_num, invoices.currency, invoices.pay_deadline, invoices.discount, c.name as byername, c.pib as byerpib, c2.name as sellername, c2.pib sellerpib FROM invoices INNER JOIN companies c ON c.name = invoices.byer INNER JOIN companies c2 ON c2.name = invoices.seller where inv...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 07, 2022 at 12:50 PM -- Server version: 10.4.22-MariaDB -- PHP Version: 7.4.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
<reponame>jkvetina/Quiz-Engine<filename>tables/plan_certifications.sql --DROP TABLE plan_certifications; CREATE TABLE plan_certifications ( cert_id VARCHAR2(20) NOT NULL, cert_name VARCHAR2(100) NOT NULL, path_id VARCHAR2(30), -- exam_page_link VARCHAR2(25...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 17, 2019 at 03:28 PM -- Server version: 10.1.21-MariaDB -- PHP Version: 7.1.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
CREATE TABLE BOARD ( seq INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY title VARCHAR(255) NOT NULL, content VARCHAR(1000) NOT NULL, writer VARCHAR(10) NOT NULL, password INT NOT NULL, regDate TIMESTAMP NOT NULL, cnt INT NOT NULL );
<reponame>robert0714/PostgreSQL-10-High-Performance<filename>Chapter09/09_02.sql<gh_stars>10-100 SELECT pg_sleep(1); \pset x on SELECT * FROM table_stats WHERE relname='t'; SELECT pg_stat_reset(); \pset x off
BEGIN; CREATE TABLE "north_app_reader" ( "id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL ); CREATE TABLE "north_app_book_readers" ( "id" serial NOT NULL PRIMARY KEY, "book_id" integer NOT NULL, "reader_id" integer NOT NULL, UNIQUE ("book_id", "...
<gh_stars>100-1000 -- shared_err.test -- -- execsql {INSERT INTO t1 SELECT a+1, b FROM t1;} INSERT INTO t1 SELECT a+1, b FROM t1;
<filename>Backend codes/cmpe313-odas-server/scripts/init_db.sql create table "users" ( "user_id" bigserial primary key, "name" varchar not null, "surname" varchar not null, "email" varchar not null unique, "username" varchar not null, "gender" ...
<reponame>biosan-gxl/gxl-1st drop table if exists shujuzu.mid1_cusitem_person_newstate; create temporary table shujuzu.mid1_cusitem_person_newstate as select case when cohr = '杭州贝生' then '杭州贝生' else '博圣' end as cohr1 ,finnal_ccuscode as cuscode ,finnal_ccusname as cusname from pdm.invoice_order where ye...
SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; SET client_min_messages = warning; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Ow...
<reponame>VoDangVinh2000/Efruit-Web-Internship -- 26/11/2017 - More order status ALTER TABLE `orders` CHANGE `status` `status` ENUM('Pending', 'Wait for Staff Confirm', 'In Process', 'Wait for Shipping', 'Process Completed', 'Shipping', 'Completed', 'On Hold','Failed') NOT NULL DEFAULT 'Pending'; UPDATE `orders` SET `s...
ALTER TYPE hook.eventtype ADD VALUE 'INVOICE_PAYMENT_CASH_FLOW_CHANGED';
<gh_stars>1-10 create table edition ( id VARCHAR(64) NOT NULL, dv_name varchar(255) not null, revision bigint not null, dv_export bytea, description varchar(4096), created_at timestamp, PRIMARY KEY (id), UNIQUE (dv_name, revision), FOREIGN KEY (dv_name) REFERENCES data_virtuali...
CREATE PROCEDURE SP392(OUT MYCOUNT INTEGER) SPECIFIC SP392_88001 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE468;SELECT COUNT(*)INTO MYCOUNT FROM TABLE418;SELECT COUNT(*)INTO MYCOUNT FROM TABLE178;SELECT COUNT(*)INTO MYCOUNT FROM...
INSERT INTO `ko`.`ko_storage_provisioner_dic`(`id`, `name`, `version`, `architecture`, `vars`, `created_at`, `updated_at`) VALUES ( UUID(), 'cinder', 'v1.20.0', 'amd64', '{\"cinder_csi_attacher_version\":\"v3.1.0\", \"cinder_csi_provisioner_version\":\"v2.1.1\", \"cinder_csi_snapshotter_version\":\"v2.1.3\", \"cind...
-- start_ignore SET gp_create_table_random_default_distribution=off; -- end_ignore CREATE INDEX pg2_heap_gist_idx1_b0 ON pg2_heap_table_gist_index_b0 USING GiST (property);
-- @testpoint:opengauss关键字message_octet_length(非保留),作为表空间名 --关键字不带引号,创建成功 drop tablespace if exists message_octet_length; CREATE TABLESPACE message_octet_length RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1'; drop tablespace message_octet_length; --关键字带双引号,创建成功 drop tablespace if exists "message_octet_lengt...
<filename>tasks.sql -- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 21, 2021 at 10:06 AM -- Server version: 10.4.19-MariaDB -- PHP Version: 8.0.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Dec 23, 2019 at 02:27 AM -- Server version: 5.7.26 -- PHP Version: 7.2.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
<reponame>DIBASSI/ZEUS IF EXISTS (SELECT 1 FROM sys.databases WHERE name = $(db)) BEGIN ALTER DATABASE [$(database)] SET SINGLE_USER WITH ROLLBACK IMMEDIATE; DROP DATABASE [$(database)] END GO begin --Create DB with collation case sensative CREATE DATABASE [$(database)] COLLATE SQL_Latin1_General_CP1_CS_AS END GO...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 30, 2021 at 09:44 AM -- Server version: 10.4.20-MariaDB -- PHP Version: 7.4.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
<reponame>eshamster/go-sqlla<filename>_example/sqlite3.sql -- generated by github.com/mackee/go-genddl. DO NOT EDIT!!! DROP TABLE IF EXISTS "user"; CREATE TABLE "user" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "name" TEXT NOT NULL, "age" INTEGER NULL, "rate" REAL NOT NULL DEFAULT 0, "crea...
<reponame>christophanneser/Bao-for-Presto SELECT t1.name, count(*) FROM site as s, so_user as u1, question as q1, answer as a1, tag as t1, tag_question as tq1 WHERE q1.owner_user_id = u1.id AND a1.question_id = q1.id AND a1.owner_user_id = u1.id AND s.site_id = q1.site_id AND s.site_id = a1.site_id AND s.site_id = u1.s...
create table socks( id bigserial primary key, color varchar(30) not null, cotton_part integer not null check ( cotton_part >= 0 and cotton_part <= 100 ), quantity bigint not null check ( quantity >= 0 ), constraint color_cottonPart_unique UNIQUE(color, cotton_part) );
CREATE TABLE IF NOT EXISTS events ( `id` INT, `title` VARCHAR(47) CHARACTER SET utf8, `description` VARCHAR(4227) CHARACTER SET utf8, `organizer_id` INT, `start` DATETIME, `end` DATETIME, `address` VARCHAR(24) CHARACTER SET utf8, `city_id` INT, `url` VARCHAR(16) CHARACTER SET utf8, ...
SELECT trA.id as trA_id, trB.id as trB_id, trA.problem_id, ts.project_id, ts.bug_id, ts.buggy_frame, tp.target_frame, tp.sloc, trA.green_test_count as trA_passing_tests, trA.red_test_count as trA_failing_tests, trB.green_test_count as trB_passing_tests, trB.red_test_count as trB_failing_tests, LEAST(...
<gh_stars>10-100 create or replace procedure getCustomerInfo(custKey int) AS c1 sys_refcursor; BEGIN open c1 for select c_salutation, c_first_name, c_last_name, c_birth_year, c_email_address, ca_street_number, ca_street_name, ca_suite_number, ca_city, ca_county, ca_country from customer, customer_addr...
CREATE TABLE product_feed_upload_error_sample ( id String, retailer_id Nullable(String), row_number Nullable(Int64) ) ENGINE = Log
<filename>database/suratbpprd.sql -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 19 Mar 2021 pada 02.09 -- Versi server: 10.4.13-MariaDB -- Versi PHP: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 ...
<filename>database/data/ref.mata_pelajaran_kurikulum06.sql INSERT INTO ref.mata_pelajaran_kurikulum VALUES (227, 401110200, 11, 0, 2, 0, 0, 6, 'P', NULL, '2016-04-08 22:30:00', '2017-10-03 15:00:00', NULL, '1901-01-01 00:00:00'); INSERT INTO ref.mata_pelajaran_kurikulum VALUES (228, 401110200, 11, 0, 2, 0, 0, 6, 'P', N...
--query to set the register limit from grade distribution. already done -- with t as -- (select course_offering_uuid, section_number, (COALESCE(gd.a_count,0) + COALESCE(gd.ab_count,0) + COALESCE(gd.b_count,0) + COALESCE(gd.bc_count,0) + COALESCE(gd.c_count,0) + COALESCE(gd.d_count,0) + COALESCE(gd.f_count,0) + COALESCE...
call run('try drop user cs_test_user_cp@localhost; catch pass;'); call duplicate_grantee('cs_test_user@localhost', 'cs_test_user_cp@localhost'); select Routine_name = 'help' AND db = 'common_schema' AND Proc_priv = 'Execute,Alter Routine' from mysql.procs_priv where user = 'cs_test_user_cp' and host = '...
-- initial SQL data for Ian's AUV PlanIt insert into altitudemode(name) values('absolute'); insert into altitudemode(name) values('relativeToGround'); insert into altitudemode(name) values('relativeToSeaFloor'); insert into altitudemode(name) values('clampToSeaFloor'); insert into altitudemode(name) values('clampToGro...