sql
stringlengths
6
1.05M
<gh_stars>1-10  CREATE TABLE [dbo].[Resumes]( [ResumeId] [INT] NOT NULL PRIMARY KEY IDENTITY(1,1), [PhotoId] INT NULL, [FullName] [varchar](100) NOT NULL, [PhoneNumber][varchar](100) NOT NULL, [EmailAddress][varchar](100) NOT NULL, [LinkedIn] VARCHAR(100) NULL, [Education] VARCHAR(200) NULL, [Jobs] VARCHA...
--- ADD CONSTRINT-------- ALTER TABLE egbpa_occupancy ADD CONSTRAINT fk_eg_occupancy_mdfdby FOREIGN KEY (lastmodifiedby) REFERENCES state.eg_user(id); ALTER TABLE egbpa_occupancy ADD CONSTRAINT fk_eg_occupancy_crtby FOREIGN KEY (createdby) REFERENCES state.eg_user(id); ALTER TABLE egbpa_sub_occupancy ADD CONSTRAINT fk_...
WITH source AS ( SELECT * FROM {{ source('sheetload','kpi_status') }} ), final AS ( SELECT NULLIF(kpi_grouping, '')::VARCHAR AS kpi_grouping, NULLIF(kpi_sub_grouping, '')::VARCHAR AS kpi_sub_grouping, NULLIF(kpi, '')::VARCHAR AS kpi_name, ...
<filename>SprockitDb/Sprockit.Tests/_TestClasses/sprockit__internal_UpdateMetrics.sql CREATE SCHEMA sprockit__internal_UpdateMetrics AUTHORIZATION [dbo]; GO EXECUTE sp_addextendedproperty @name = N'tSQLt.TestClass', @value = 1, @level0type = N'SCHEMA', @level0name = N'sprockit__internal_UpdateMetrics';
<filename>addons/includes/database/install/(db_name)/v.0.1.0_invoices.sql CREATE TABLE `invoices` ( `id` int(10) UNSIGNED NOT NULL, `date` datetime NOT NULL, `user_id_seller` int(10) UNSIGNED DEFAULT NULL, `user_id` int(10) UNSIGNED NOT NULL, `temp` bit(1) DEFAULT NULL, `title` varchar(500) NOT NULL, `tot...
CREATE TABLE Models( ModelID INT PRIMARY KEY IDENTITY(101, 1), [Name] VARCHAR(30) NOT NULL, ManufacturerID INT NOT NULL ); CREATE TABLE Manufacturers( ManufacturerID INT PRIMARY KEY IDENTITY, [Name] VARCHAR(30) NOT NULL, EstablishedOn DATETIME2 ); ALTER TABLE Models ADD CONSTRAINT FK_Models_Manufacturers FOREIG...
INSERT INTO `lh_chat_config` (`identifier`, `value`, `type`, `explain`, `hidden`) VALUES ('autologin_data', 'a:3:{i:0;b:0;s:11:\"secret_hash\";s:16:\"please_change_me\";s:7:\"enabled\";i:0;}', 0, 'Autologin configuration data', 1);
<reponame>imfantuan/bytebase -- Create migration_history table CREATE TABLE bytebase_migration_history ( id INTEGER PRIMARY KEY AUTOINCREMENT, created_by TEXT NOT NULL, created_ts INTEGER NOT NULL, updated_by TEXT NOT NULL, updated_ts INTEGER NOT NULL, -- Record the client version creating this ...
SELECT creationDay AS 'date:DATE' FROM creationDayNumMessages ORDER BY md5(creationDay)
<reponame>openddal/openddal DROP TABLE IF EXISTS customers,address,order_items,order_status,orders,product,product_category,customer_login_log; CREATE TABLE IF NOT EXISTS `customers` ( `id` BIGINT NOT NULL, `rand_id` BIGINT DEFAULT NULL, `name` varchar(20) DEFAULT NULL, `customer_info` varchar(100) DEFAULT NU...
<gh_stars>1-10 /* Schema */ create table if not exists testdata ( code varchar(100) primary key ,description varchar(100) ,sequence int ,obsolete int not null ); /* Data */ MERGE INTO testdata KEY(code) VALUES ('c1','test',1,0); MERGE INTO testdata KEY(code) VALUES ('c2','test des',2,0); MERGE I...
library "EmptyContext" version '1.0.0' using "FHIR" version '4.0.0' define "Procedures": [Procedure]
DROP TABLE network_size_estimates;
-- MySQL dump 10.13 Distrib 5.6.50, for Linux (x86_64) -- -- Host: localhost Database: x1_zfcms_90ckm_c -- ------------------------------------------------------ -- Server version 5.6.50-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RE...
<reponame>kb10uy/kebisafe CREATE TABLE IF NOT EXISTS media ( hash_id VARCHAR(128) NOT NULL PRIMARY KEY, extension VARCHAR(16) NOT NULL, has_thumbnail BOOLEAN NOT NULL, width INTEGER NOT NULL, height INTEGER NOT NULL, comment TEXT NULL, uploaded TIMESTAMPTZ NOT NULL );
<filename>bootiful-sqltemplate/src/test/resources/sql/deleteByArgs.sql DELETE FROM emp WHERE deptno = ? AND job = ?
SELECT -number % -9223372036854775808 FROM system.numbers; -- { serverError 153 }
CREATE OR REPLACE VIEW line_session_type_vw AS SELECT line_vw.name AS line ,COUNT(IF(strcmp(session_vw.cv,'fly_olympiad_aggression'),NULL,1)) AS fly_olympiad_aggression ,COUNT(IF(strcmp(session_vw.cv,'fly_olympiad_box'),NULL,1)) AS fly_olympiad_box ,COUNT(IF(strcmp(session_vw.cv,'fly_olympiad_ga...
<gh_stars>0 CREATE DATABASE zinger; USE zinger; # DROP TABLE seller_archive; # DROP TABLE users_invite; # DROP TABLE users_place; # DROP TABLE users_shop; # DROP TABLE orders_item; # DROP TABLE rating; # DROP TABLE configurations; # # DROP TABLE transactions; # DROP TABLE orders; # DROP TABLE item; # DROP TABLE users;...
SELECT db1.restaurant.menu_item.menu_item_name FROM db1.restaurant.menu_item A WHERE db1.restaurant.menu_item.menu_item_no<10
SELECT `e1`.`first_name`, `e1`.`last_name`, `e1`.`department_id` FROM `employees` AS `e1` JOIN (SELECT `e2`.`department_id`, AVG(`e2`.`salary`) AS `salary` FROM `employees` AS `e2` GROUP BY `e2`.`department_id`) AS `dep_average` ON `e1`.`department_id` = `dep_average`.`depa...
CREATE PROCEDURE usp_two_results AS BEGIN SELECT * FROM TestStudent SELECT * FROM TestStudent END GO
CREATE TABLE pentaho_proxy_bundle_db ( id SERIAL NOT NULL, release character varying(255), host character varying(255) NOT NULL, port integer DEFAULT 8080, username character varying(255) NOT NULL, password character varying(255) NOT NULL, initialization_vector character varying(255), PRI...
<filename>sql_migration/001.sql -- Table: "user" DROP TABLE IF EXISTS "user"; CREATE TABLE "user" ( id uuid NOT NULL, name character varying(100) NOT NULL, pass character(60) NOT NULL, CONSTRAINT pk PRIMARY KEY (id), CONSTRAINT unique_name UNIQUE (name) ) WITH ( OIDS=FALSE ); ALTER TABLE "user" OWNER TO...
if object_id('[Valid].[LearnerDenorm]','V') is not null begin drop VIEW [Valid].[LearnerDenorm] end GO create view Valid.LearnerDenorm as select l.[LearnRefNumber], l.[PrevLearnRefNumber], l.[PrevUKPRN], l.[PMUKPRN], l.[ULN], l.[FamilyName], l.[GivenNames], l.[DateOfBirth], l.[Ethnicity], l.[Sex]...
<gh_stars>0 --------------------------------------------------------------- -- view: vw_holds_fulfilment_external --------------------------------------------------------------- -- drop view vw_holds_fulfilment_external; create or replace view vw_holds_fulfilment_external as select pickup_authority, to_char...
create table if not exists subscription ( id integer primary key autoincrement not null, url text not null, label text, last_build_date text, created_at timestamp default current_timestamp not null, unique(url) ); create table if not exists podcast ( id integer primary key autoincrement no...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 24, 2019 at 09:36 PM -- Server version: 10.1.13-MariaDB -- PHP Version: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
ALTER TABLE vedtak ADD COLUMN saksbehandler_ident VARCHAR DEFAULT NULL; ALTER TABLE vedtak ADD COLUMN beslutter_ident VARCHAR DEFAULT NULL;
/*enter, trainer*/ INSERT INTO users (username, password_digest) VALUES ('bob', <PASSWORD>'), ('gary', <PASSWORD>'); INSERT INTO habits (habit, weekly_track, daily_track, user_id) VALUES ('drink water', 7, 5, 1), ('drink water', 7, 5, 2), ('exercise', 4, 1, 2); INSERT INTO daytrack (habit_id, user...
<gh_stars>1-10 SELECT LEAST(from_id,to_id) person1 ,GREATEST(from_id,to_id) person2 ,COUNT(*) call_count ,SUM(duration) total_duration FROM Calls GROUP BY 1 ,2
-- 1. How many stops are in the database SELECT COUNT(id) FROM stops; -- 2. Find the id value for the stop 'Craiglockhart' SELECT id FROM stops WHERE name = 'Craiglockhart'; -- 3. Give the id and the name for the stops on the '4' 'LRT' service SELECT id, name FROM stops JOIN route ON stop = id WHERE company = 'LRT' A...
WITH ens1 AS (SELECT date_trunc ('week', tx.block_time) date, SUM (tx.value/1e18) eth_spent FROM ethereumnameservice."ENSRegistry_evt_NewOwner" r LEFT JOIN ethereum.transactions tx ON tx.hash = r.evt_tx_hash GROUP BY 1), price1 AS (SELECT date_trunc ('...
<filename>Beginning-PHP-PostgreSQL-E-Commerce/Chapter 02/Database/chapter02.sql CREATE USER hatshopadmin PASSWORD '<PASSWORD>' SUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE VALID UNTIL 'infinity'; CREATE DATABASE hatshop WITH OWNER = hatshopadmin ENCODING = 'UTF8';
<gh_stars>1-10 CREATE DATABASE IF NOT EXISTS `mydb` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `mydb`; -- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64) -- -- Host: localhost Database: mydb -- ----------------------------------------------...
CREATE TABLE [dbo].[SyndicationSource] ( [Id] INT NOT NULL IDENTITY (1, 1), [IsActive] BIT NOT NULL DEFAULT (1), [IntervalSeconds] INT NOT NULL DEFAULT (1800), [Title] NVARCHAR (128) NOT NULL, [BaseUri] VARCHA...
<filename>src/test/resources/sql/alter_role/9346fa69.sql -- file:password.sql ln:39 expect:true ALTER ROLE regress_passwd2_new RENAME TO regress_passwd2
<gh_stars>10-100 -- -- PostgreSQL database dump -- -- Dumped from database version 12.3 (Debian 12.3-1.pgdg100+1) -- Dumped by pg_dump version 12.3 (Debian 12.3-1.pgdg100+1) SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET stand...
-- Simplifying the entity data value (#557) UPDATE ENTITY_DATA SET JSON_VALUE = VALUE::JSONB WHERE VALUE IS NOT NULL AND JSON_VALUE IS NULL; ALTER TABLE ENTITY_DATA DROP COLUMN VALUE;
SELECT COUNT(age) AS people_count, age FROM people GROUP BY age;
--Postgres CREATE TABLE rewrite ( id serial primary key, original_url character varying(500) not null unique, short_slug character varying(20) ); --Mysql --CREATE TABLE rewrite ( -- id int(10) primary key auto_increment, -- original_url varchar(500) not null unique, -- short_slug varchar(20) --);
-- C_DocType.EntityType update AD_Column set EntityType='D' where AD_Column_ID=547289 and EntityType<>'D'; -- 2017-10-02T16:31:16.049 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('c_rfq','ALTER TABLE public.C_RfQ ADD COLUMN DocAction CHAR(2) DEFAULT ''CO'' NO...
<reponame>ytyaru/Sqlite3.Function.Core.abs.20190912075234<gh_stars>0 .echo on select abs(-5); select abs(5); select abs(5.2); select abs(-5.2);
<reponame>bhutchinson/rice<filename>db/sql/src/main/resources/org/kuali/rice/rice-sql/initial-sql/2.3.0/oracle/server/demo/KRIM_DEMO.sql -- -- Copyright 2005-2015 The Kuali Foundation -- -- Licensed under the Educational Community License, Version 2.0 (the "License"); -- you may not use this file except in compliance w...
<filename>intranet/cgi-bin/installer/data/mysql/it-IT/necessari/sample_creator_data.sql /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; LOCK TABLES `creator_layouts` WRITE; INSERT INTO `creator_layouts` (`layout_id...
<filename>db/seeds.sql INSERT INTO department (name) VALUES ("sales"), ("engineering"), ("finance"), ("legal"); INSERT INTO role (title, salary, department_id) VALUES ("sales lead", 35000, 001), ("salesperson", 32500, 001), ("lead engineer", 30000, 002), ("software eng...
<filename>hms.sql /* SQLyog Community v8.32 MySQL - 5.5.23 : Database - hms ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@S...
-- -- The system tables of MySQL Server -- set sql_mode=''; set storage_engine=myisam; CREATE TABLE IF NOT EXISTS db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, I...
# ############# # GroupModel # ############# GroupModel.addNew = INSERT INTO jforum_groups (group_id, group_name, group_description, parent_id) VALUES (jforum_groups_seq.nextval, ?, ?, ?) # ############# # CategoryModel # ############# CategoryModel.addNew = INSERT INTO jforum_categories (categories_id, title, display...
--TEST: test with tables with list partition create table min_p_list( col1 char(20), col2 varchar(100), col3 nchar(10), col4 nchar varying, col5 string, col6 varchar ) partition by list (col2) ( partition p1 values in ('This is a dog.'), partition p2 values in ('This is a rabbit.'), partition p3 values in ('T...
<gh_stars>1-10 \o erosita_superset_agn_create_indexes.out create index on catalogdb.erosita_superset_agn(q3c_ang2ipix(opt_ra,opt_dec)); create index on catalogdb.erosita_superset_agn(q3c_ang2ipix(ero_ra,ero_dec)); create index on catalogdb.erosita_superset_agn(ero_version); create index on catalogdb.erosita_superset_ag...
CREATE DATABASE sortabletable; CREATE USER sortabletable@localhost IDENTIFIED BY ''; GRANT SELECT ON sortabletable.datatables_demo TO sortabletable@localhost;
<filename>sql/_13_issues/_16_1h/cases/CBRD-20031.sql drop table if exists t; create table t(c char(30)); insert into t value ('3'); insert into t value (chr(255)); insert into t value (concat(chr(255), chr(255))); prepare st from 'select count(*) from t where c like ?'; execute st using '%'; prepare st from 'select * ...
alter table `reports` add column `false` int(11) after `url_refute`; alter table `reports` add column `dont_false` int(11) after `false`;
<filename>bp2/predavanja/pred13_q3_insert_productreview.sql USE TestDB GO SELECT * FROM Production.ProductReview GO INSERT INTO Production.ProductReview (ProductID, ReviewerName, ReviewDate, EmailAddress, Rating, Comments, ModifiedDate) VALUES (937, 'Jasmin', GETDATE(), '<EMAIL>', 4, 'This is same cool TSQL b...
<gh_stars>0 SELECT FIRST 28 "MulheresMil_1"."nome da sit matricula (situacao detalhada)" AS "nome da sit matricula (situacao detalhada)" FROM "MulheresMil_1" GROUP BY 1;
<filename>src/Database/ESFA.DC.ILR.DataStore.Database/dbo/Tables/FileDetails.sql CREATE TABLE [dbo].[FileDetails] ( [ID] BIGINT IDENTITY (1, 1) NOT NULL, [UKPRN] INT NOT NULL, [Filename] NVARCHAR (50) NULL, [Fil...
CREATE OR REPLACE VIEW Select_Zone_Comsumptions AS SELECT Zones.designation AS Zone, Comsumptions.comsumption_cod FROM Zone_Comsumptions INNER JOIN Zones ON Zones.zone_cod = Zone_Comsumptions.zone_cod INNER JOIN Comsumptions ON Comsumptions.comsumption_cod = Zone_Co...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: mysql:3306 -- Generation Time: Apr 09, 2019 at 04:11 AM -- Server version: 5.7.25 -- PHP Version: 7.2.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARAC...
<reponame>JoeyFrancisTribbiani/minerp CREATE TABLE `erp_finance_sku_fee`( id int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL, `create_by` int(11) unsigned DEFAULT NULL,...
SELECT * FROM balance_sheet WHERE balance <> 0 ;
set head on set feedback on set line 1000 set pagesize 10000 set echo on set trimspool on set numformat 99999999999999999999.99 set colsep ";" set long 100000 spool c:\acc_entry _det.spl select * from acvw_all_ac_entries where trn_ref_no='050MGLD123320001' ; select * from acvw_all_ac_entries where ac_no=...
CREATE NONCLUSTERED INDEX [IX_uCommerce_CategoryProperty_CategoryId] ON [dbo].[uCommerce_CategoryProperty] (CategoryId) include ([CategoryPropertyId], [Value], [DefinitionFieldId], [CultureCode])
begin; select plan(11); SELECT view_owner_is( 'api', 'assignments', 'api', 'api.assignments view should be owned by the api role' ); SELECT table_privs_are( 'api', 'assignments', 'student', ARRAY['SELECT'], 'student should only be granted SELECT on view "api.assignments"' ); SELECT table_privs_are( ...
<reponame>FiatAccompli/Civ6Mods<gh_stars>1-10 -- ============================= -- -- Copyright 2018 FiatAccompli -- -- ============================= -- -- Replaces Magnus' initial Groundbreaker promotion (+50% harvest yields) with the supply chain management promotion -- (+1 production to industrial zone regional bui...
-- file:pg_lsn.sql ln:9 expect:true INSERT INTO PG_LSN_TBL VALUES ('FFFFFFFF/FFFFFFFF')
-- file:foreign_key.sql ln:156 expect:true UPDATE PKTABLE SET ptest1=1 WHERE ptest1=2
-- file:rowsecurity.sql ln:989 expect:true EXPLAIN (COSTS OFF) SELECT * FROM rls_sbv WHERE (a = 1)
<gh_stars>100-1000 create or replace function trigger_update_updated_at() returns trigger as $$ begin new.updated_at = now(); return new; end; $$ language plpgsql; create table if not exists roles ( role_id uuid default gen_random_uuid(), role text not null, allow jsonb...
<gh_stars>1000+ -- 15.03.2016 12:22 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2016-03-15 12:22:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=554231 ; -- 15.03.2016 12:22 -- I forgot to set the DICTIONARY_ID_COMMENTS Syst...
-- term -- -- contents: -- id -- name -- start, end date -- due date -- visible to students -- editable (can set availability) --ATTENTION: To use the create table code for term first the command CREATE EXTENSION citext; -- Must be used before DROP TABLE IF EXISTS term; CREATE TABLE term ( term_id serial, t...
<filename>db/init/02-password.sql<gh_stars>0 /*Connect to database*/ \connect mobydq /*Create table password*/ CREATE TABLE base.password ( id SERIAL PRIMARY KEY , "password" TEXT NOT NULL , user_id INTEGER NOT NULL UNIQUE REFERENCES base.user(id) , created_date TIMESTAMP DEFAULT CURRENT_TIMESTAM...
-- #! mysql -- #{ poggit.libasynql.example -- # { players -- # { init CREATE TABLE players ( name VARCHAR(100), registerTime TIMESTAMP, loginTime TIMESTAMP, lastIp VARCHAR(100) ); -- # } -- # { bump -- # :name string -- # :registerTime timestamp -- # ...
/* * Copyright 2021 Adobe. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
CREATE PROCEDURE [dbo].[Board_Archive] @boardId int AS UPDATE Boards SET archived=1 WHERE boardId=@boardId
<gh_stars>100-1000 -- Revert delivery:upsert_notification_config from pg BEGIN; DROP FUNCTION IF EXISTS upsert_notification_config( p_notification_type notification_config.notification_type%TYPE, p_name notification_config.name%TYPE, p_settings notification_config.settings%TYPE, p_enabled notification...
set linesize 200 set trims on set tab off set pagesize 1000 column plan_table_output format a100 SELECT * FROM table(DBMS_XPLAN.DISPLAY_CURSOR(FORMAT=>'TYPICAL'));
SET ECHO OFF; SET FEEDBACK OFF; SET LINESIZE 1000; SET PAGESIZE 1000; col location format a8 col gen_tag format a15 col run_type format a15 col config_tag format a15 col mon_ver format a15 ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'; SELECT ri.run_num, mi.subrun_num, d.num_chan, ld.location, rt.gen_tag,...
<filename>script/big-whale.sql -- -------------------------------------------------------- -- big-whale: v1.3 -- Copyright (c): © Meetyou. Big data group technical support. -- -------------------------------------------------------- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT...
-- Copyright (c) YugaByte, Inc. -- These should match the metadata in devops: opscli/ybops/data/aws-metadata.yml -- These should also be in sync with the UI data in YW: ui/src/components/config/PublicCloud/views/AWSProviderInitView.js -- AWS update region r set yb_image = 'ami-65e0e305' from provider p where p.uuid =...
SELECT v.table_name AS name FROM information_schema.views AS v WHERE v.table_schema = 'public' GROUP BY v.table_name;
-- @testpoint: opengauss关键字sqlcode(非保留),作为函数名,部分测试点合理报错 --关键字不带引号-成功 drop function if exists sqlcode; create function sqlcode(i integer) returns integer as $$ begin return i+1; end; $$ language plpgsql; / drop function if exists sqlcode; --关键字带双引号-成功 drop function if exists "sqlcode"; create function "sqlcode"(i i...
<filename>openGaussBase/testcase/KEYWORDS/server/Opengauss_Function_Keyword_Server_Case0022.sql -- @testpoint:opengauss关键字server(非保留),作为用户组名 --关键字不带引号-成功 drop group if exists server; create group server with password '<PASSWORD>'; drop group server; --关键字带双引号-成功 drop group if exists "server"; create group "server" ...
<reponame>adambirse/innovation-funding-service -- eu grant registration tables CREATE TABLE eu_organisation ( id BIGINT(20) PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255) NOT NULL, companies_house_number VARCHAR(255), organisation_type ENUM('BUSINESS', 'RESEARCH', 'RTO', 'PUBLIC_SECTOR_OR_CHARITY') NOT NULL ); ...
<gh_stars>0 /* Warnings: - Changed the type of `assistido` on the `Streamer` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required. */ -- AlterTable ALTER TABLE "Streamer" DROP COLUMN "assistido", ADD COLUMN "assistido" BOOLEAN NO...
<gh_stars>0 CREATE FUNCTION [dbo].[CheckClassActive] ( @ClassId INT) RETURNS INT AS BEGIN -- Issue error if trying to access disabled class DECLARE @ClassEnabled INT = ( SELECT TOP 1 [Enabled] FROM [ClassMain] WHERE [Id] = @ClassId); RETURN ISNULL(@ClassEnabled, 0); END
DROP TABLE IF EXISTS characters; CREATE TABLE characters( id SERIAL PRIMARY KEY, name VARCHAR(255), house VARCHAR(255), patronus VARCHAR(255), is_alive boolean NOT NULL DEFAULT true, created_by VARCHAR(255) );
<filename>06. Indices-and-Data-Aggregation/06. Indices-and-Data-Aggregation-Exercises/Solutions/15. Employees Average Salaries.sql --USE [SoftUni] SELECT * INTO [EmployeesWithSalaryHigherThan30000] FROM [Employees] WHERE [Salary] > 30000 --SELECT * FROM [EmployeesWithSalaryHigherThan30000] DELETE FROM [Empl...
<filename>umb-cs637-2015s/src/sql/hw01/hw01q03.sql -- -- CS637: Database Backed Websites -- Copyright 2015 <NAME> <<EMAIL>> -- More info: https://github.com/ghorbanzade/beacon -- CREATE TABLE IF NOT EXISTS t1 ( id INT NOT NULL PRIMARY KEY, message VARCHAR(40) ); INSERT INTO t1 (id, message) VALUES (1, 'First Row')...
<gh_stars>1-10 DROP DATABASE IF EXISTS pizzas_db; CREATE DATABASE pizzas_db; USE pizzas_db; CREATE TABLE pizza ( id INTEGER(3) AUTO_INCREMENT NOT NULL, pizza_name VARCHAR(50) NOT NULL, devoured BOOLEAN DEFAULT false, PRIMARY KEY (id) );
create database tenant_dam; -- SELECT * FROM pg_database where datname = 'tenant_dam';
<filename>src/test/resources/insert3.test_8.sql -- insert3.test -- -- execsql { -- CREATE TABLE t2( -- a INTEGER PRIMARY KEY, -- b DEFAULT 'b', -- c DEFAULT 'c' -- ); -- CREATE TABLE t2dup(a,b,c); -- CREATE TRIGGER t2r1 BEFORE INSERT ON t2 BEGIN -- INSERT INTO t2dup(a,b,c) VALUE...
-- file:create_index.sql ln:840 expect:true CREATE TABLE oid_table (a INT) WITH OIDS
<reponame>vsilgalis/sqlwatch CREATE FUNCTION [dbo].[ufn_sqlwatch_parse_client_app_name] ( @client_app_name varchar(255) ) RETURNS varchar(255) with schemabinding AS BEGIN return 'Not Implemented' --case --check if the passed string contains what we need. if it does, then filter out the binary string and re...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 12, 2021 at 04:56 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_CHARACTER_SET_CLIEN...
alter table CM_COURSE_SET_CANON_ASSOC_T drop foreign key FKBFCBD9AE7F976CD6; alter table CM_COURSE_SET_CANON_ASSOC_T drop foreign key FKBFCBD9AE2D306E01; alter table CM_COURSE_SET_OFFERING_ASSOC_T drop foreign key FK5B9A5CFD26827043; alter table CM_COURSE_SET_OFFERING_ASSOC_T drop foreign key FK5B9A5CFD2D306E01; alter ...
<gh_stars>0 INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (11327, 'spell_rog_vanish_buff');
<reponame>titibrown/DWWM-2005 use GC; INSERT INTO `products` (product_price,product_name,product_stock,product_origin, product_weight) VALUES ('69.00','Coco','5','Made in Spain','3g'), ('69.00','Blisse','5','Made in Spain','3g')
<gh_stars>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='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Sche...
CREATE TABLE public.varchar_tc ( id bigint NOT NULL, real_name varchar(128), CONSTRAINT varchar_tc_pkey PRIMARY KEY (id) ); CREATE TABLE public.varchar_tc_0 ( id bigint NOT NULL, real_name varchar(128), CONSTRAINT varchar_tc_0_pkey PRIMARY KEY (id) ); CREATE TABLE public.varchar_tc_1 ( id...