sql
stringlengths
6
1.05M
CREATE TABLE "TestTable" ( "RecordId" INTEGER PRIMARY KEY NOT NULL, "Name" VARCHAR(255) NOT NULL, "IsNew" BOOLEAN NOT NULL, "Size" DOUBLE NOT NULL, "Price" DECIMAL NOT NULL, "Volume" BIGINT NOT NULL, "SomeTimestamp" TIMESTAMP NOT NULL, "SomeDateTime" DATETIME NOT NULL, "SomeDate" DATE NOT NUL...
<gh_stars>10-100 //// CHANGE name=change0 CREATE TABLE table464 ( id integer NOT NULL, field1 character varying(30), usertype0field usertype0, usertype8field usertype8, usertype5field usertype5 ); GO //// CHANGE name=change1 ALTER TABLE ONLY table464 ADD CONSTRAINT table464_pkey PRIMARY KEY ...
DROP TABLE IF EXISTS HELPDESK_FOLLOWUPS; CREATE TABLE HELPDESK_FOLLOWUPS (FOLLOWUP_ID INTEGER PRIMARY KEY AUTOINCREMENT, TICKET_ID INTEGER NOT NULL, STATUS_ID INTEGER NOT NULL DEFAULT 1, FOLLOWUP_TEXT VARCHAR(4000) NOT NU...
<filename>owasp-top10-2017-apps/a2/saidajaula-monster/db/init.sql CREATE TABLE tb_users( Id VARCHAR(36) NOT NULL, Login VARCHAR(20) NOT NULL, Hash_Senha VARCHAR(100) NOT NULL, Dt_Cookie DATE, Permissao INT NOT NULL, PRIMARY KEY(Id) ); INSERT INTO tb_users (Id, Login, Hash_Senha, Dt_Cookie, Perm...
<reponame>opengauss-mirror/Yat -- @testpoint:opengauss关键字max(非保留),自定义数据类型名为explain --关键字explain作为数据类型不带引号,创建成功 drop type if exists max; CREATE TYPE max AS (f1 int, f2 text); select typname from pg_type where typname ='max'; drop type max; --关键字explain作为数据类型加双引号,创建成功 drop type if exists "max"; CREATE TYPE "max" AS (f...
-- MySQL dump 10.13 Distrib 5.7.18, for Linux (x86_64) -- -- Host: localhost Database: notif -- ------------------------------------------------------ -- Server version 5.7.18-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_...
INSERT INTO directors(people_id,movie_id,contract) VALUES (735,0,NULL); INSERT INTO directors(people_id,movie_id,contract) VALUES (736,1,NULL); INSERT INTO directors(people_id,movie_id,contract) VALUES (736,2,NULL); INSERT INTO directors(people_id,movie_id,contract) VALUES (738,3,NULL); INSERT INTO directors(people_id,...
<reponame>Lspringer24/SQL-Challenge SELECT last_name, COUNT(last_name) FROM employees GROUP BY last_name ORDER BY COUNT DESC
<gh_stars>0 CREATE OR ALTER PROCEDURE SP_XML_APCreations @inAPsTable APsTable READONLY, @inCurrentDate DATE AS BEGIN SET NOCOUNT ON; DECLARE @PropertyNum INT; DECLARE @IdProperty INT; DECLARE @PaymentTerms INT; DECLARE @APDate DATE; DECLARE @APQuantity INT; DECLARE @E...
SELECT p.ProductName, P.UnitPrice, c.CategoryName FROM Products p FULL OUTER JOIN Categories c ON c.CategoryID = p.CategoryID WHERE p.UnitPrice = ( SELECT MAX(p1.UnitPrice) FROM Products p1 JOIN Products p2 ON c.CategoryID = p1.CategoryID ) ORDER BY p.UnitPrice
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 16, 2021 at 06:49 AM -- Server version: 10.4.21-MariaDB -- PHP Version: 7.4.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
<filename>honors.sql DROP DATABASE IF EXISTS honors; CREATE DATABASE honors; USE honors; CREATE TABLE users ( ID INT NOT NULL, last_name VARCHAR(20) NOT NULL, first_name VARCHAR(20) NOT NULL, username VARCHAR(25) NOT NULL, admitted VARCHAR(20), code INT NOT NULL, type VARCHAR(20) DEFAULT 'stu...
<filename>SCRIPT_DATABASE.sql -- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64) -- -- Host: localhost Database: testdb -- ------------------------------------------------------ -- Server version 8.0.26 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RES...
CREATE TABLE [Northwind].[EmployeeTerritories] ( [EmployeeID] INT NOT NULL, [TerritoryID] NVARCHAR (20) NOT NULL, CONSTRAINT [PK_EmployeeTerritories] PRIMARY KEY CLUSTERED ([EmployeeID] ASC, [TerritoryID] ASC), CONSTRAINT [FK_EmployeeTerritories_Employees] FOREIGN KEY ([EmployeeID]) REFERENC...
<filename>database-dump.sql<gh_stars>0 /* SQLyog Ultimate v11.11 (64 bit) MySQL - 5.5.5-10.1.29-MariaDB : Database - laravel_boilerplate ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQU...
-- MySQL dump 10.16 Distrib 10.1.26-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: db -- ------------------------------------------------------ -- Server version 10.1.26-MariaDB-0+deb9u1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULT...
use forensics; DROP TABLE IF EXISTS firefox_uninstall_files; CREATE TABLE firefox_uninstall_files ( id INT PRIMARY KEY NOT NULL AUTO_INCREMENT, filename VARCHAR(300) DEFAULT NULL, filepath VARCHAR(500) DEFAULT NULL, size BIGINT DEFAULT NULL, created DATETIME, modified DATETIME, accessed DATETI...
<filename>MSSQL/sql/SuspectPages.sql<gh_stars>1-10 use msdb; select count(*) from suspect_pages
DROP TABLE IF EXISTS employees; DROP TABLE IF EXISTS roles; DROP TABLE IF EXISTS departments; CREATE TABLE departments ( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(30) NOT NULL UNIQUE ); CREATE TABLE roles ( id INT PRIMARY KEY AUTO_INCREMENT, title VARCHAR(30) UNIQUE, salary DECIMAL (6,2), ...
<filename>src/test/resources/sql/explain/0dbb5cde.sql -- file:insert_conflict.sql ln:244 expect:true explain (costs off) insert into insertconflicttest as i values (23, 'Avocado') on conflict (key) do update set fruit = excluded.fruit where excluded.* is null
<gh_stars>10-100 select extract(year from created_at)::integer as year, extract(month from created_at)::integer as month, count(*) FILTER (WHERE kind = 'membership') as membership_count, count(*) FILTER (WHERE kind = 'fine') as fine_count, sum(-amount_cents) FILTER (WHERE kind = 'fine') as fine_total_c...
<reponame>TAUSBV/cef-data-marketplace create table price_configuration ( id int not null AUTO_INCREMENT primary key, availability_modifier_minimum_language_data_count_entries int unsigned not null, availability_modifier_minimum_word_count...
ALTER TABLE realmd_db_version CHANGE COLUMN required_2008_11_07_04_realmd_account required_6976_01_realmd_realmd_db_version bit;
insert into core.testing_texts(title, content, created_at) VALUES ('Juku sündmused', 'Juku tuli kooli', transaction_timestamp()); insert into text (id, content) values('84b679d2-81f6-4c7a-b5a5-4a310ae84cb2', 'Suvel ma lugesin läbi ajalehe &quot;.... &quot;, kus oli väga huvitav artikkel ühest koolist, väikesest alev...
create table src_host_ip ( src text NOT NULL, host text, ip inet, error text, ts timestamp NOT NULL default now() ) CREATE OR REPLACE FUNCTION src_bin(IN src text, host text, ip inet, OUT src_bin text) IMMUTABLE LANGUAGE PLPGSQL AS $_$ BEGIN SELECT INTO src_bin CASE WHEN src ~ '^65\.55\.' T...
--liquibase formatted sql --changeset huangligui:curdie-2 dbms:h2 CREATE TABLE T_CURDIE_USER ( ID VARCHAR2(32) NOT NULL, NAME VARCHAR2(32), SEX VARCHAR2(32), CREATE_TIME TIMESTAMP, CREATE_USER VARCHAR2(32), UPDATE_TIME ...
-- USERS CREATE TABLE "internal_docs"( "id" VARCHAR NOT NULL, "body" CLOB NOT NULL, "updated_on" TIMESTAMP NOT NULL ); ALTER TABLE "internal_docs" ADD CONSTRAINT "internal_docs_id" PRIMARY KEY("id");
CREATE TABLE comment ( id BIGINT AUTO_INCREMENT PRIMARY KEY, parent_id BIGINT NOT NULL, type INT NOT NULL, commentator INT NOT NULL, gmt_create BIGINT NOT NULL, gmt_modified BIGINT NOT NULL, like_count BIGINT DEFAULT 0 );
<reponame>jcorpus/activos<filename>BD/proyecto_activo.sql -- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 15, 2017 at 04:03 AM -- Server version: 5.5.58-0ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET...
{% macro dbt__wrap(sql, pre_hooks, post_hooks) -%} -- Compiled by DBT {% for hook in pre_hooks %} {{ hook }}; {% endfor %} {{ sql }} {% for hook in post_hooks -%} {{ hook }}; {% endfor %} {% endmacro %}
CREATE TABLE [dbo].[Users] ( [Id] int NOT NULL IDENTITY, [SubjectId] nvarchar(200) NOT NULL, [ProviderName] nvarchar(200) NOT NULL, [ComputedUserId] AS SubjectId + ':' + ProviderName, [FirstName] nvarchar(200) NULL, [MiddleName] nvarchar(200) NULL, [LastName] nvarchar(200) NULL, [Username] nvarchar(200) NOT NU...
<reponame>mw2q/dbt2 /* * This file is released under the terms of the Artistic License. Please see * the file LICENSE, included in this package, for details. * * Copyright (C) 2003-2008 <NAME> * 2003-2008 Open Source Development Labs, Inc. * 2015 2ndQuadrant, Ltd. */ \echo Use ...
BEGIN; DELETE FROM seguridad_rol_credenciales WHERE credencial_id IN ( SELECT id FROM seguridad_credencial WHERE nombre IN ( 'reg_establecimiento_autoridad_consulta', 'reg_establecimiento_autoridad_create', 'reg_establecimiento_autoridad_delete', 'reg_establecimiento_autoridad_e...
<gh_stars>0 DROP DATABASE IF EXISTS refri_track; CREATE DATABASE refri_track;
/* Warnings: - You are about to drop the `Challenge` table. If the table is not empty, all the data it contains will be lost. */ -- DropTable PRAGMA foreign_keys=off; DROP TABLE "Challenge"; PRAGMA foreign_keys=on; -- CreateTable CREATE TABLE "SharedChallenge" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMEN...
<filename>backend/sql_database_dump.sql INSERT INTO drink VALUES (1,'French Cafe au Lait Recipe','[{"name": "1 part hot strong coffee (French roast)", "color": "#44240C", "parts": 1}, {"name": "1 part steamed milk", "color": "#F3F4FC", "parts": 1}]'), (2,'Pour-Over Coffee','[{"name": "2/3 ounce/18 grams coffee (medium...
<gh_stars>0 SELECT count(*) AS _count FROM PIS_Goods WITH(NOLOCK) LEFT JOIN PIS_Brand WITH(NOLOCK) ON PIS_Goods.BrandSerNo = PIS_Brand.SerNo LEFT JOIN PIS_MiddleBrand WITH(NOLOCK) ON PIS_Goods.MiddleBrandSerNo = PIS_MiddleBrand.SerNo LEFT JOIN PIS_Unit WITH(NOLOCK) ON PIS_Goods.UnitSerNo = PIS_Unit.Ser...
-- ============================================= -- Author: dbo -- Create date: 2020-10-14 -- Description: return articles by user Id -- ============================================= CREATE PROCEDURE [dbo].[spArticles_FindArticlesByUsername_shown] @UserName nvarchar(128), @Show bit AS BEGIN SET NOCOUNT ON; ...
<filename>Minimalistic Balance Acken/Minimalistic Balance Acken/AI/Economy.sql<gh_stars>0 /*Economy stuff*/ UPDATE Defines Set Value=15 WHERE Name='AI_HOMELAND_GREAT_PERSON_TURNS_TO_WAIT'; /*10*/ UPDATE Defines Set Value=100 WHERE Name='AI_GOLD_PRIORITY_UPGRADE_PER_FLAVOR_POINT'; /*25*/ UPDATE Defines Set Value=300 WHE...
-- AlterTable ALTER TABLE "users" ADD COLUMN "timeFormat" INTEGER DEFAULT 12;
-- Adds access_token -- Up CREATE TABLE `access_token` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `token` varchar(128) NOT NULL, `type` varchar(100) NOT NULL, `data` json DEFAULT NULL, `created_at` datetime NOT NULL, `last_used_at` datetime DEFAULT NULL, PRIMARY...
-- 1.city tablosu ile country tablosunda bulunan şehir (city) ve ülke (country) isimlerini -- birlikte görebileceğimiz LEFT INNER JOIN sorgusunu yazınız. SELECT city.city, country.country FROM city LEFT JOIN country ON city.country_id = country.country_id; -- 2.customer tablosu ile payment tablosunda bulunan payment...
<reponame>o-hat/django-docker -- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64) -- -- Host: localhost Database: blog -- ------------------------------------------------------ -- Server version 5.7.27 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CH...
<reponame>wahyu0712/Uas -- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 15 Jul 2020 pada 03.09 -- Versi Server: 5.6.24 -- PHP Version: 5.6.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
<reponame>ibiangdian/meilichannel USE [NankaiDB] GO /****** Object: Table [dbo].[t_gt_MenuItm] Script Date: 07/19/2013 14:43:47 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[t_gt_MenuItm]') AND type in (N'U')) BEGIN CREATE ...
<filename>conf/evolutions/default/3.sql # Users schema # --- !Ups ALTER TABLE users RENAME COLUMN fullname TO full_name; ALTER TABLE users RENAME COLUMN isadmin TO is_admin; # --- !Downs ALTER TABLE users RENAME COLUMN full_name TO fullname; ALTER TABLE users RENAME COLUMN is_admin TO isadmin;
<gh_stars>1-10 CREATE TABLE [dbo].[TokenAccountTransaction] ( [Id] BIGINT IDENTITY (1, 1) NOT NULL, [UniqueId] UNIQUEIDENTIFIER NOT NULL, [AccountId] NVARCHAR (128) NOT NULL, [RewardTypeKey] NVARCHAR (128) NOT NULL, [Amount] ...
USE `rework`; CREATE TABLE `licenses` ( `type` varchar(60) NOT NULL, `label` varchar(60) NOT NULL, PRIMARY KEY (`type`) ); CREATE TABLE `user_licenses` ( `id` int(11) NOT NULL AUTO_INCREMENT, `type` varchar(60) NOT NULL, `owner` varchar(60) NOT NULL, PRIMARY KEY (`id`) );
delete from info where ident = :ident:;
create database Reto3_DA go use Reto3_DA go create table Alumnos ( matricula int identity(1,1), nombre varchar(max), semestre int, grupo varchar(2), curp varchar(max) ) create table config( id int, cantidad int ) insert into config(id,cantidad) values(1,10) SET ANSI_NULLS ON GO create procedure AgregarAlumno @Nom...
<gh_stars>10-100 create table connections ( id uuid not null primary key, issuer varchar, x509 bytea, redirect_url varchar );
CREATE TABLE shedlock( name VARCHAR(64) NOT NULL, lock_until TIMESTAMP NOT NULL, locked_at TIMESTAMP NOT NULL, locked_by VARCHAR(255) NOT NULL, PRIMARY KEY (name) );
<filename>backend/de.metas.swat/de.metas.swat.base/src/main/sql/postgresql/system/40-sw01_swat/5498090_sys_gh4416_M_Allergen_Trl_Table.sql -- 2018-07-26T15:28:32.856 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Table (AccessLevel,ACTriggerLength,AD_Client_ID,AD_Org_ID,AD_Table_ID,Cop...
<filename>sql/patch_85_86_e.sql -- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute -- Copyright [2016-2020] EMBL-European Bioinformatics Institute -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance ...
<filename>src/main/java/zsql/data/insertData_ver0210_member_bus_csdetail,MEM_FOLLOW,MEM_TRACK_BUS.sql -- =========各table假資料=====aim total 22 tables============== -- `tableName`, [這裡新增的table假資料筆數] -- -- `MEMBERS`, [15筆預設] -- `BUS`, [9筆預設] -- `CS_DETAIL`, [5筆預設] -- `MEM_FOLLOW`, [10筆預設] -- `MEM_TRACK_BUS`, [4筆預設] -- ===...
<filename>system_user/system_user_database/install_pgcrypto.sql CREATE EXTENSION pgcrypto;
<filename>source/ut_dbms_ouput_reporter.pks<gh_stars>1-10 create or replace package ut_dbms_output_reporter as procedure begin_suite (a_suite in ut_types.test_suite); procedure end_suite (a_suite in ut_types.test_suite, a_results in ut_types.test_suite_results); procedure begin_test(a_test in ut_types.singl...
<filename>importer/src/main/resources/scripts/release-type/release-type-delta-previous-snapshot-validation-definition.sql<gh_stars>1-10 /* * There must be actual changes made to previously published definitions in order for them to appear in the current delta. */ insert into qa_result (runid, assertionuuid, concept...
<reponame>traindb-project/traindb-benchmark copy "region" from 'E:\2021-PROJECT\ML-AQP-2021\DATASET\TPC-H\DATASET-TPCH\region.tbl' DELIMITER "|" CSV HEADER; copy "nation" from 'E:\2021-PROJECT\ML-AQP-2021\DATASET\TPC-H\DATASET-TPCH\nation.tbl' DELIMITER '|' CSV HEADER; copy "customer" from 'E:\...
INSERT INTO customers (id, first_name, last_name, middle_name, suffix) VALUES (1, 'John', 'Doe', 'Middle', ''); INSERT INTO customers (id, first_name, last_name, middle_name, suffix) VALUES (2, 'Jane', 'Doesf', 'Middleth', '');
CREATE TABLE apidb.PhylogeneticTree ( source_id varchar2(50), atv clob, con clob); GRANT SELECT ON apidb.PhylogeneticTree TO gus_r; GRANT INSERT, UPDATE, DELETE ON apidb.PhylogeneticTree TO gus_w; exit
<reponame>JONGWE1/projecta /* Navicat MySQL Data Transfer Source Server : 192.168.127.12 Source Server Version : 50721 Source Host : localhost:3306 Source Database : dboa Target Server Type : MYSQL Target Server Version : 50721 File Encoding : 65001 Date: 2018-03-19 09:46:02 */ SE...
<filename>test/concurrence_test.sql use concurrence_test; CREATE TABLE `tbltest` ( `test_id` int(11) NOT NULL, `test_string` varchar(1024) NOT NULL, `test_blob` longblob NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; GRANT ALL on concurrence_test.* to 'concurrence_test'@'localhost' identified by 'concurrence_...
<gh_stars>0 INSERT INTO `eo_users` (`id`, `groupid`, `username`, `password`, `email`, `firstname`, `lastname`, `photo`, `notifications`, `show_email`, `block`, `created`, `last_visit`, `activation`, `params`, `ts`, `deleted`) VALUES (1, 1, 'system', '<PASSWORD>:kEuXamI4LBOIR405xh5tvq5vBmsr8mNp', '<EMAIL>', 'Unit', 'Tes...
-- select service days DELETE FROM ttc_trips WHERE service_id <= 17459 OR -- start service_id IN ( 17486, 17487, 17488 ) OR -- gap period service_id >= 17644; --end -- start date is... SELECT (timestamp 'epoch' + 17460 * interval '1 day')::date; -- end date is... SELECT (timestamp 'epoch' + 17643 * interval '1 day...
<reponame>concosminx/sql-scripts SET SERVEROUTPUT ON; /* varrays - bounded type - index start from 1 - null by default */ DECLARE TYPE e_list IS VARRAY(5) OF VARCHAR2(50); employees e_list; BEGIN employees := e_list('Leonardo', 'Raphael', 'Donatello', 'Michelangelo', 'Splinter'); FOR i...
<reponame>ankitrajput0096/Spring_Boot_Oauth_2_Security<filename>secureapplication/secureapplication/src/main/resources/db/migration/V1/V1_01__initialize_the_db.sql CREATE TABLE IF NOT EXISTS oauth_client_details ( client_id VARCHAR(255) PRIMARY KEY, resource_ids VARCHAR(255), client_secret VARCHAR(255), scope V...
DROP TABLE heart_data; DROP TABLE heart_rest; DROP TABLE heart_zone; DROP TABLE user_token; DROP TABLE user;
create database pizzacliente; create table pizzacliente.cli_cliente( cli_id int not null auto_increment, cli_nome varchar(255) not null, cli_telefone varchar (10) not null, cli_endereco varchar (30) not null, primary key (cli_id)); create table pizzacliente.tipo_tipo( tipo_id int not null auto_increment,...
 CREATE procedure [dbo].[GetAgenda3]( @branch_id int = null, @location_it int = null, @date date = null ) ...
<reponame>John94php/phpprojects SELECT * FROM mails;
<gh_stars>0 ALTER TABLE parks DROP COLUMN weather_info; ALTER TABLE parks DROP COLUMN directions_info;
<filename>sql/CreateDatabase.sql CREATE DATABASE "GeoPortal" WITH OWNER = portal ENCODING = 'UTF8' TABLESPACE = pg_default LC_COLLATE = 'Russian_Russia.1251' LC_CTYPE = 'Russian_Russia.1251' CONNECTION LIMIT = -1; CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology; CRE...
set linesize 100 pagesize 0 feedback off spool disable_triggers.out select ' alter table '||owner||'.'||table_name||' disable all triggers;' from dba_triggers where owner in ('ESS','OEBS'); spool off
-- Up CREATE TABLE "area" ( idAreaAvaliacao INTEGER, idAreaConhecimento INTEGER, PRIMARY KEY (idAreaAvaliacao, idAreaConhecimento) ); -- Down DROP TABLE "area";
<gh_stars>0 /* display shared cursors count */ /* https://docs.oracle.com/database/121/TGSQL/tgsql_cursor.htm#TGSQL-GUID-7A37EEAC-1B50-4744-B4BC-A3052313A7E4 */ SELECT DISTINCT sql_id , COUNT(child_number) over (partition BY sql_id order by sql_id) child_count FROM v$sql_shared_cursor ORDER BY 2 desc;
<gh_stars>1-10 ------------------------------------------------------------------------------- -- -- Project: PostgreSQL-GeoPackage -- Authors: <NAME> <<EMAIL>> -- ------------------------------------------------------------------------------- -- Copyright (c) 2016 EOX IT Services GmbH -- -- Permission is hereby grante...
UPDATE public.word_pair SET active_status=0 WHERE id=1; UPDATE public.word_pair SET active_status=0 WHERE id=10; UPDATE public.word_pair SET active_status=0 WHERE id=25; UPDATE public.word_pair SET active_status=0 WHERE id=35; UPDATE public.word_pair SET active_status=0 WHERE id=83; UPDATE public.word_pair SET active_s...
<reponame>BAMGames/eu ALTER TABLE RELATION DROP FOREIGN KEY FK_RELATION_COUNTRY_1, DROP FOREIGN KEY FK_RELATION_COUNTRY_2, DROP FOREIGN KEY FK_RELATION_GAME; DROP TABLE RELATION;
SELECT COUNT(1) FROM pg_depend dep JOIN pg_class cl ON dep.classid=cl.oid AND relname='pg_rewrite' WHERE refobjid= {{tid}}::oid AND classid='pg_class'::regclass AND refobjsubid= {{clid|qtLiteral}};
<filename>src/test/resources/sql/drop_function/fac8992a.sql<gh_stars>10-100 -- file:create_function_3.sql ln:159 expect:true DROP FUNCTION functest_IS_1(int, int, text), functest_IS_2(int), functest_IS_3(int)
<reponame>Shuttl-Tech/antlr_psql -- file:event_trigger.sql ln:233 expect:true SELECT * FROM dropped_objects WHERE schema IS NULL OR schema <> 'pg_toast'
-- 22.02.2017 07:30 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_Side...
<reponame>dram/metasfresh DROP VIEW IF EXISTS report.RV_TaxDeclarationLine; CREATE OR REPLACE VIEW report.RV_TaxDeclarationLine AS SELECT td.C_TaxDeclaration_ID, tdl.Line, tdl.DateAcct, t.name as C_Tax_Name, cur.cursymbol as CurSymbol, tdl.DocumentNo, dt.name as C_DocType_Name, ev.Value as Acct_Value, ev.Name ...
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/RELEASE-SCRIPTS/KC-RELEASE-3_1_1-SCRIPT/mysql/dml/KC_DML_01_KCIRB-1448_B000.sql DELIMITER / INSERT INTO PROTOCOL_ACTION_TYPE (PROTOCOL_ACTION_TYPE_CODE, DESCRIPTION, TRIGGER_SUBMISSION, TRIGGER_CORRESPONDENCE, FINAL_ACTION_FOR_BATCH_CORRESP, ...
<reponame>paulpierre/pp_chartvisual DROP TABLE IF EXISTS `CADJPY_D1`; CREATE TABLE IF NOT EXISTS `CADJPY_D1`( `id` int(5) NOT NULL, `open` varchar(30) NOT NULL, `high` varchar(30) NOT NULL, `close` varchar(30) NOT NULL, `low` varchar(30) NOT NULL, `time` varchar(30) NOT NULL); ALTER TABLE `CADJPY_D1` ADD PRIMAR...
<gh_stars>10-100 # V0 # V1 # https://code.dennyzhang.com/customers-who-bought-all-products select customer_id from Customer group by customer_id having count(distinct product_key) = ( select count(1) from Product) # V2 # Time: O(n + k), n is number of customer, k is number of product # Space: O(n + k) SEL...
CREATE OR REPLACE FUNCTION increment( IN a integer, IN b integer DEFAULT 100500, IN x integer = -1000, OUT c integer ) RETURNS integer AS $$ BEGIN END; $$ LANGUAGE plpgsql;
DROP TABLE `deleted_records`; ALTER TABLE `z_4081_deleted_records` RENAME TO `deleted_records`; -- system_patches DELETE FROM `system_patches` WHERE `issue` = 'POCOR-4081';
INSERT INTO STUDENT("ID", "AGE", "NAME") VALUES (1, 5,'Penny') INSERT INTO STUDENT("ID", "AGE", "NAME") VALUES (2, 17,'Sheldon') INSERT INTO STUDENT("ID", "AGE", "NAME") VALUES (3, 25,'Amy') INSERT INTO STUDENT("ID", "AGE", "NAME") VALUES (4, 22,'Leonard') INSERT INTO STUDENT("ID", "AGE", "NAME") VALUES (5, 55,'Bernade...
ALTER TABLE launchers ADD COLUMN type VARCHAR(50);
<filename>sql-script/pattern_all.sql use compact_092316; select D.Disease, count(*) as cnt from cancer_cui C join all_diseases_trials D on C.tid=D.tid and C.month>-1 and nested!='nesting' group by D.Disease order by cnt desc;
<filename>db_library/views/db_privileges.sql<gh_stars>10-100 --# Copyright IBM Corp. All Rights Reserved. --# SPDX-License-Identifier: Apache-2.0 /* * Lists all the direct privileges granted on the system, including those gained via object ownership. Also include database level privileges, set session user privlies e...
-- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION pg_block_systemcatalog" to load this file.\quit
-- Convert schema 'sql/PAH-Schema-0.0011-SQLite.sql' to 'sql/PAH-Schema-0.0012-SQLite.sql':; BEGIN; CREATE TABLE "waiters" ( "id" INTEGER PRIMARY KEY NOT NULL, "user" integer NOT NULL, "game" integer NOT NULL, "wait_since" integer NOT NULL DEFAULT 0, FOREIGN KEY ("game") REFERENCES "games"("id") ON DELETE C...
create table user ( id serial constraint user_pk primary key, key varchar(36) not null, admin boolean default false not null, created_at timestamp without time zone default now(), memo text ); comment on...
CREATE TABLE `notice_template` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', `desc` VARCHAR(255) NOT NULL COMMENT '通知描述', `notice_way` VARCHAR(255) NOT NULL COMMENT '通知方式', `title` VARCHAR(255) NOT NULL COMMENT '通知标题', `sms_content` TEXT NOT NULL COMMENT '短信通知内容', `email_content` TEXT NOT NU...
<reponame>p6/bizsensebms<gh_stars>1-10 INSERT INTO `contact` (`first_name`,`middle_name`,`last_name`,`work_phone`,`home_phone`,`mobile`,`fax`,`title`,`department`,`work_email`,`other_email`,`billing_city`,`billing_state`,`billing_postal_code`,`billing_country`,`shipping_city`,`shipping_state`,`shipping_postal_code`,`sh...
autocommit off; call login('dba','') on class db_user; call add_user('user1','') on class db_user; call add_user('user2','') on class db_user; call login('user1','') on class db_user; CREATE FUNCTION test1(i int) RETURN int as language java name 'SpTest.testInt(int) return int'; call login('user2','') on class db_...
-- @testpoint:opengauss关键字search(非保留),作为表空间名 --关键字不带引号,创建成功 drop tablespace if exists search; CREATE TABLESPACE search RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1'; drop tablespace search; --关键字带双引号,创建成功 drop tablespace if exists "search"; CREATE TABLESPACE "search" RELATIVE LOCATION 'hdfs_tablespace/hdfs...