sql stringlengths 6 1.05M |
|---|
drop database jpa;
create database jpa character set = 'utf8' collate = 'utf8_unicode_ci';
use jpa; |
<reponame>peter-marriott/GlobalDayofCoderetreat<filename>T-SQL/glider.sql
-- Gilder
update conway set cell = 0;
update conway set cell = 1 where x = 1 and y = 3;
update conway set cell = 1 where x = 2 and y = 3;
update conway set cell = 1 where x = 3 and y = 3;
update conway set cell = 1 where x = 3 and y = 2;... |
<gh_stars>0
CREATE OR REPLACE FUNCTION DATE2GRADESEMESTER
-- 【5-⑩】
(dDate IN DATE)
RETURN NUMBER
IS
nSemester NUMBER;
sMonth CHAR(10);
BEGIN
SELECT TO_CHAR(dDate, 'MM')
INTO sMonth
FROM DUAL;
IF (sMonth >='03' and sMonth<='08') THEN
nSemester := 1;
ELSE
nSemester := 2;
E... |
--
-- PostgreSQL database dump
--
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 search_path = ooiui, pg_catalog;
--
-- Data for Name: vocabnames; Type: TABLE DATA; Schema: ... |
-- Insert SAML account id for admin user to check that
-- the database migration logic in v12 updates the record as
-- expected
INSERT INTO iam_saml_id(idpid, userid, account_id) VALUES
('https://idptestbed/idp/shibboleth', '<EMAIL>',1); |
DROP INDEX hydra_oauth2_obfuscated_authentication_session_so_idx;
DROP INDEX hydra_oauth2_consent_request_cid_idx;
DROP INDEX hydra_oauth2_consent_request_sub_idx;
DROP INDEX hydra_oauth2_consent_request_veri_idx;
DROP INDEX hydra_oauth2_authentication_request_cid_idx;
DROP INDEX hydra_oauth2_authentication_request_s... |
CREATE INDEX idx_posts_updated_at ON posts (updated_at DESC); |
SET search_path=v1;
CREATE TABLE IF NOT EXISTS project_fact_type_options (
project_type TEXT NOT NULL,
fact_type TEXT NOT NULL,
value TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_... |
create table ANNOTATION_GROUP (
ID bigint not null auto_increment,
STUDY_ID bigint,
NAME varchar(255),
DESCRIPTION varchar(500),
ANNOTATION_ENTITY_TYPE varchar(100),
primary key (ID)
) ENGINE=InnoDB;
ALTER TABLE ANNOTATION_GROUP ADD CONSTRAINT FK_ANNOTATION_GROUP_STUDY
FOREIGN K... |
<gh_stars>1-10
--+ holdcas on;
drop class 댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁;
create class 댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁 (
댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁댁... |
-- @testpoint: opengauss关键字constructor(非保留),作为游标名,部分测试点合理报错
--前置条件
drop table if exists constructor_test cascade;
create table constructor_test(cid int,fid int);
--关键字不带引号-成功
start transaction;
cursor constructor for select * from constructor_test order by 1;
close constructor;
end;
--关键字带双引号-成功
start transaction;
c... |
ALTER TABLE "messages" ADD COLUMN correlation_id VARCHAR(256);
|
-- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 29 Mar 2019 pada 22.21
-- Versi Server: 5.6.16
-- PHP Version: 5.5.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... |
DELETE FROM t WHERE EXISTS (SELECT * FROM t ot WHERE t.n = ot.n AND t.id <> ot.id) |
CREATE SCHEMA People
GO
CREATE SCHEMA Buildings
GO
CREATE TABLE Buildings.Office (
Id INT IDENTITY PRIMARY KEY,
Name NVARCHAR(50) NOT NULL
)
CREATE TABLE People.Employee (
Id INT IDENTITY PRIMARY KEY,
FirstName NVARCHAR(50) NOT NULL,
LastName NVARCHAR(50) NOT NULL,
FullName AS CONCAT(FirstName, ' ', LastName)... |
<filename>database/apero-bar-api-database/ForeignKey/bouteilles_category_FK.sql
ALTER TABLE [dbo].[bouteilles]
ADD CONSTRAINT [bouteilles_category_FK, ]
FOREIGN KEY (categoryId)
REFERENCES [categories] (id) |
DROP DATABASE IF EXISTS employee_DB;
CREATE DATABASE employee_DB;
USE employee_DB;
CREATE TABLE department(
id INT AUTO_INCREMENT NOT NULL,
department_name VARCHAR(30) NOT NULL,
PRIMARY KEY(id)
);
CREATE TABLE role (
id INT AUTO_INCREMENT NOT NULL,
title VARCHAR(30) NOT NULL,
salary DECIMAL N... |
<gh_stars>0
select SQL_NO_CACHE bot_id, bot_name from `[el]#moca_prefix#bots`; |
CREATE TABLE media (
id serial PRIMARY KEY,
release_id integer NOT NULL,
kind integer NOT NULL,
position smallint DEFAULT 1 NOT NULL,
name character varying,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
CREATE INDEX ON media (release_id);
ALTER TABL... |
<gh_stars>0
CREATE OR REPLACE FUNCTION eval_number(i_string IN VARCHAR2) RETURN NUMBER AS
ret NUMBER;
BEGIN
EXECUTE IMMEDIATE 'BEGIN :ret := '||i_string||'; END;' USING OUT ret;
RETURN ret;
END;
/
GRANT EXECUTE ON eval_number TO PUBLIC;
|
--
-- Table structure for table `api_settings`
--
CREATE TABLE IF NOT EXISTS `api_settings` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`key` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`value` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` times... |
<filename>citPOINT.PrefApp.DataBase/Schema Objects/Schemas/dbo/Programmability/Stored Procedures/uspPreferenceSetSelectForUser.proc.sql
CREATE PROC [DBO].[uspPreferenceSetSelectForUser]
@UserID uniqueidentifier,
@ListOfOrganizations Nvarchar(2000)
AS
/*----------------------------------------------------
- Gett... |
<filename>movie_sc.sql
#create database movie_sc;
use movie_sc;
create table customers
(
customerid int unsigned not null auto_increment primary key,
name char(60) not null,
address char(80) not null,
city char(30) not null,
state char(20),
zip char(10),
country char(20) not null
);
create table order... |
<filename>schema.sql
CREATE TABLE shoes (
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
sku VARCHAR(6),
style VARCHAR(30),
name VARCHAR(30),
inventory INTEGER,
inventory_sold INTEGER,
retail_price DECIMAL(7,2),
cost DECIMAL(7,2)
);
CREATE TABLE vendors (
id INT AUTO_INCREMENT NOT NULL... |
GO
ALTER ROLE [DataViewing] ADD MEMBER [User_DSCI];
GO
ALTER ROLE [DataViewing] ADD MEMBER [EAS2021_RO_User];
GO
ALTER ROLE [DataProcessing] ADD MEMBER [EAS2021_RW_User];
GO
|
<gh_stars>1-10
CREATE TABLE [dbo].[hlsystimezoneadjustmentrule]
(
[hltzid] INT NOT NULL, --<-- pk[1/2]
[ruleno] TINYINT NOT NULL, --<-- pk[2/2]
[datestart] DATETIME NOT NULL,
[dateend] DATETIME NOT NULL,
[daylighttransitionstartisfixeddaterule] BIT NOT NULL,
[daylighttransitionstartmonth] TINYINT NOT NULL,
[da... |
<gh_stars>10-100
alter table "public"."artworks" drop constraint "artworks_user_id_fkey",
add constraint "artworks_user_id_fkey"
foreign key ("user_id")
references "public"."users"
("id")
on update restrict
on delete restrict;
|
<gh_stars>10-100
-- file:arrays.sql ln:437 expect:true
select '{0 second ,0 second}'::interval[]
|
-- 1. Elimine la tabla si existe:
DROP TABLE IF EXISTS alumnos;
-- 2. Cree la tabla con la siguiente estructura:
CREATE TABLE alumnos(
agnio YEAR NOT NULL,
numero INT UNSIGNED NOT NULL,
nombre VARCHAR(30),
documento char(8) NOT NULL,
domicilio VARCHAR(30),
ciudad VARCHAR(20),
provincia VARCHAR(20),
P... |
with year_total as (
select c_customer_id customer_id
, c_first_name customer_first_name
, c_last_name customer_last_name
, d_year as year
, sum(ss_net_paid) year_total
, 's' sale_type
from customer
, store_sales
, date_d... |
-- 0 (Creating Table to be used)
create table studentTable(
roll number(2),
gpa numeric(4,2));
insert into studentTable values(1,5.8);
insert into studentTable values(2,6.5);
insert into studentTable values(3,3.4);
insert into studentTable values(4,7.8);
insert into studentTable values(5,9.5);
insert into studentTabl... |
<reponame>Ambal/mangos
UPDATE `item_template` SET `BagFamily` = 0x00000400 WHERE `BagFamily` =11;
UPDATE `item_template` SET `BagFamily` = 0x00000200 WHERE `BagFamily` =10;
UPDATE `item_template` SET `BagFamily` = 0x00000100 WHERE `BagFamily` = 9;
UPDATE `item_template` SET `BagFamily` = 0x00000080 WHERE `BagFamily` = ... |
CREATE TABLE cartrulecarrier (
id CHAVE NOT NULL,
id_cart_rule CHAVE NOT NULL,
id_carrier CHAVE NOT NULL,
CONSTRAINT pk_cartrulecarrier PRIMARY KEY (id)
); |
<reponame>dimak1/cas-ciip-portal
-- Deploy ggircs-portal:function_get_products_by_bcghgid to pg
begin;
create or replace function ggircs_portal.get_products_by_bcghgid(bcghgid_input numeric)
returns setof ggircs_portal.ciip_production as $function$
select *
from ggircs_portal.ciip_production
where bcgh... |
<reponame>dadmbc/mmm-test
library PIHCohort version '0.0.01'
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.001' called FHIRHelpers
codesystem "SNOMEDCT": 'http://snomed.info/sct'
valueset "Eclampsia SNOMED": 'http://www.hl7.org/fhir/us/mihr/ValueSet/pregnancy-eclampsia-mmm-SNOMED'
valueset "Eclampsia ... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 2018-07-11 06:01:11
-- 服务器版本: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
INSERT INTO historical_stock (id, close, currency, high, low, open, stockdate, symbol) VALUES (1, 139.96, 'USD', 140.00, 137.75, 137.90, '2021-07-02 02:00:00.000000', 'AAPL'); |
<gh_stars>1-10
/**
* This plugin implementation for PostgreSQL requires the following tables
*/
-- The table storing accounts
CREATE TABLE account (
pubkey BYTEA PRIMARY KEY,
owner BYTEA,
lamports BIGINT NOT NULL,
slot BIGINT NOT NULL,
executable BOOL NOT NULL,
rent_epoch BIGINT NOT NULL,
... |
<filename>src/main/sql/create-inicu-tables.sql
--
-- TOC entry 173 (class 1259 OID 70688)
-- Name: acidosis_seq; Type: SEQUENCE; Schema: kdah; Owner: postgres
--
CREATE SEQUENCE acidosis_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE acidosis_seq OWNER TO postgres;
... |
<filename>tests/queries/0_stateless/01455_nullable_type_with_if_agg_combinator.sql
SET cast_keep_nullable = 0;
-- Value nullable
SELECT anyIf(CAST(number, 'Nullable(UInt8)'), number = 3) AS a, toTypeName(a) FROM numbers(2);
-- Value and condition nullable
SELECT anyIf(number, number = 3) AS a, toTypeName(a) FROM (SELE... |
<reponame>komainu8/pgroonga<filename>sql/function/flush/jsonb.sql
CREATE TABLE logs (
id int,
record jsonb
);
INSERT INTO logs VALUES (1, '{"message": "Hello World"}');
INSERT INTO logs VALUES (2, '{"message": "This is a pen"}');
INSERT INTO logs VALUES (3, '{"message": "Good-by World"}');
CREATE INDEX pgroonga_i... |
<reponame>MarcoVega30/GSWSystemInformationWebPHP
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 17-08-2021 a las 03:37:58
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTIO... |
/*
??????????????????????????????????????????????????????????????????????
?|
?| Procedure Name: ag_test_by_primary_sel
?|
?| Description: Selects data from table ag_test_by_primary_sel_by primary key
?|
?| @Author: <NAME>
?| @Createdate: 2/13/2018
?|
?| @return: Select statement results
?|
?| example exec ag_tes... |
<filename>src/main/resources/db/migration/V31__Migrer_eksisterende_vilkårsresultater.sql<gh_stars>0
UPDATE vilkarsvurdering SET resultat = 'OPPFYLT' WHERE resultat = 'JA';
UPDATE vilkarsvurdering SET resultat = 'IKKE_OPPFYLT' WHERE resultat = 'NEI';
UPDATE vilkarsvurdering
SET delvilkar = cast(replace(cast(delvilkar ... |
create table stories (
id bigint not null auto_increment primary key,
source_url blob not null,
publication_date timestamp not null,
user_id bigint not null
) |
<reponame>SailSlick/rabble
CREATE TABLE IF NOT EXISTS posts (
global_id integer PRIMARY KEY AUTOINCREMENT,
author_id integer NOT NULL,
title text NOT NULL,
body text NOT NULL,
creation_datetime integer NOT NULL,
md_body text NOT NULL,
ap_id ... |
SELECT COUNT(*)
FROM site AS s,
so_user AS u1,
question AS q1,
answer AS a1,
tag AS t1,
tag_question AS tq1,
badge AS b,
account AS acc
WHERE s.site_id = q1.site_id
AND s.site_id = u1.site_id
AND s.site_id = a1.site_id
AND s.site_id = t1.site_id
AND s.site_id = tq1.site_id
A... |
DROP TABLE IF EXISTS emails;
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id serial,
name character varying(128) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE email (
id serial,
users_id integer NOT NULL REFERENCES users (id) ON DELETE CASCADE,
email character varying(128) NOT NULL,
PRIM... |
<gh_stars>10-100
CREATE TABLE NTCC_TRANSACTION
(
TRANSACTION_ID VARCHAR2(128) NOT NULL
, GLOBAL_TRANSACTION_ID VARCHAR2(128)
, BRANCH_QUALIFIER VARCHAR2(128)
, STATUS NUMBER(9, 0) NOT NULL
, TRANSACTION_TYPE NUMBER(9, 0) NOT NULL
, RETRIED_COUNT NUMBER(9, 0) NOT NULL
, CREATE_UTC_TIME DATE NOT NULL... |
--
-- Increasing size of the URL field in com_newsfeeds
--
ALTER TABLE "#__newsfeeds" ALTER COLUMN "link" TYPE character varying(2048);
|
/*!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 NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET... |
<filename>src/lf/pretas_tas/dashboard/16_participant_per_eu.sql
/*
* File: 16_participant_per_eu.sql
* File Created: Wednesday, 6th May 2020 11:06:30 am
* Author: <NAME>
* Last Modified: Wednesday, 6th May 2020 11:28:36 am
* Modified By: <NAME>
* -----
* (c) 2020, WHO/AFRO/UCN/ESPEN
*/
/*
* This query will d... |
<reponame>uhndev/hateoas-server<gh_stars>0
DO $$DECLARE r record;
BEGIN
FOR r IN SELECT schemaname, viewname
FROM pg_catalog.pg_views
WHERE schemaname NOT IN ('pg_catalog', 'information_schema')
ORDER BY schemaname, viewname
LOOP
EXECUTE 'DROP VIEW IF EXISTS ' || r.schemaname || '.' || r.viewname ||... |
<gh_stars>0
-- Default data insertions
-- -----------------------------------------------------
-- Table `AGBEGBE`.`PROFILE_TYPE`
-- -----------------------------------------------------
INSERT INTO `AGBEGBE`.`PROFILE_TYPE` (type, description)
VALUES
('SYSTEM', 'System Profile'),
('ADMINISTRATOR', 'Administrator Pro... |
<reponame>Altinity/clickhouse-sink-connector<filename>deploy/sql/init_clickhouse.sql<gh_stars>0
use test;
CREATE TABLE employees
(
`emp_no` Int32,
`birth_date` Date32,
`first_name` String,
`last_name` String,
`gender` String,
`hire_date` Date32,
`_offset` Nullable(UInt64),
`_key` Nullab... |
<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50516
Source Host : 127.0.0.1:3306
Source Database : thinkphp
Target Server Type : MYSQL
Target Server Version : 50516
File Encoding : 65001
Date: 2014-1-23 16:57:34
*/
SET FOREIGN_KEY_CHE... |
alter table o_ac_reservation add column expirationdate datetime;
alter table o_ac_reservation add column reservationtype varchar(32);
alter table o_ac_reservation add constraint idx_rsrv_to_rsrc_rsrc foreign key (fk_resource) references o_olatresource (resource_id);
alter table o_ac_reservation add constraint idx_rsrv... |
<gh_stars>0
ALTER TABLE eniwareuser.user_meta
ALTER COLUMN jdata SET DATA TYPE jsonb;
CREATE OR REPLACE FUNCTION eniwareuser.store_user_meta(
cdate timestamp with time zone,
userid BIGINT,
jdata text)
RETURNS void LANGUAGE plpgsql VOLATILE AS
$BODY$
DECLARE
udate timestamp with time zone := now();
jdata_json ... |
-- Sample queries to illustrate the data model
-- Fingerprints by name
select fp.name as fingerprint_name, r.name as name
from repo_snapshots r, repo_fingerprints j, fingerprints fp
where j.repo_snapshot_id = r.id and j.fingerprint_id = fp.id;
-- Fingerprint names
select fp.name as fingerprint_name, r.name as na... |
/* ***************************************************** **
practical_fill_schema.sql
Companion script for Practical Oracle SQL, Apress 2020
by <NAME>, https://www.kibeha.dk
Use at your own risk
*****************************************************
Creation of objects in schema PRACTICAL
Ta... |
-- Tags: long, zookeeper
DROP TABLE IF EXISTS report;
CREATE TABLE report
(
`product` Enum8('IU' = 1, 'WS' = 2),
`machine` String,
`branch` String,
`generated_time` DateTime
)
ENGINE = MergeTree
PARTITION BY (product, toYYYYMM(generated_time))
ORDER BY (product, machine, branch, generated_time);
INSE... |
<gh_stars>100-1000
LOAD 'pg_hint_plan';
SET pg_hint_plan.enable_hint TO on;
SET pg_hint_plan.debug_print TO on;
SET client_min_messages TO LOG;
SET search_path TO public;
----
---- No. G-1-1 RULE definition table
----
-- No. G-1-1-1
EXPLAIN (COSTS false) UPDATE s1.r1 SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';
/*+
S... |
<reponame>SKalt/pg_sql_parser_tests
eval ./configure `pg_config --configure`
|
update recordedassessmentcomponentstudent
set needs_writing_to_sits = true
where id in (
select racs.id
from recordedassessmentcomponentstudent racs
join recordedassessmentcomponentstudentmark racsm on
racs.id = racsm.recorded_assessment_component_student_id and
racsm.updated_dat... |
<reponame>jiancong952/-SSH-demo-<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50721
Source Host : localhost:3306
Source Database : canteen
Target Server Type : MYSQL
Target Server Version : 50721
File Encoding : 65001
Date: 2018-0... |
set sql dialect 3;
set term ^;
create or alter package pk_utilitaires
as
begin
procedure separer_nom_prenom(
nom_prenom varchar(100),
separateur_np varchar(5) = ' ')
returns(
nom varchar(100),
prenom varchar(100),
nom_jeune_fille varchar(100));
end
^
recreate package bo... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 31-10-2018 a las 22:13:47
-- Versión del servidor: 10.1.21-MariaDB
-- Versión de PHP: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
<reponame>naveenkod22/MySQL
-- 12. 4 logical model
-- adds more details to conceptual model and independent of database technology
-- representing data structers
-- name to first name and last name(spliting them) so we can easily, simply, fastly quirey them
-- stating type of relationships between tables
-- re-thinki... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 10, 2018 at 07:54 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<reponame>rebet/rebet
use `{! $db_name !}`;
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`user_id` INTEGER PRIMARY KEY,
`name` TEXT NOT NULL,
`gender` INTEGER NOT NULL,
`birthday` DATE NOT NULL,
`email` TEXT NOT NULL,
`role` VARCHAR(6) NOT NULL DEFAULT 'user',
`password` VARCHAR(255... |
--
-- Estructura de tabla para la tabla `provincias`
--
CREATE TABLE `provincias` (
`Id` int(11) NOT NULL,
`CodigoArea` varchar(2) CHARACTER SET utf8 NOT NULL,
`Nombre` varchar(255) CHARACTER SET utf8 NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_spanish_ci;
--
-- Volcado de datos para la ta... |
<filename>SANNET.DataModel/Database Scripts/Creation Scripts/1 - Security/PRE - Create Login User SANNETAdmin.sql<gh_stars>0
IF NOT EXISTS (SELECT * FROM master.dbo.syslogins WHERE [name] = 'SANNETAdmin')
BEGIN
PRINT 'Creating "SANNETAdmin" login..'
CREATE LOGIN [SANNETAdmin] WITH PASSWORD='<PASSWORD>', DEFAULT_LANG... |
<filename>migrations/20210420084301_AddUniquenessOnAudienceScope.sql
-- Add migration script here
CREATE UNIQUE INDEX uniq_audience_scope ON class (audience, scope);
|
-- sample data to test PostgreSQL INFORMATION_SCHEMA
-- TABLE TEST
CREATE TABLE IF NOT EXISTS TEST1 (
TEST_NAME CHAR(30) NOT NULL,
TEST_ID INTEGER DEFAULT '0' NOT NULL,
TEST_DATE TIMESTAMP NOT NULL
);
ALTER TABLE TEST1 DROP CONSTRAINT IF EXISTS PK_TEST CASCADE;
ALTER TABLE TEST1 ADD CONSTRAINT PK_TEST PRIMARY KE... |
<reponame>grrlgeek/extended-events
/* This session will capture events to find what queries may be causing forced parameterization to be recommended in Azure SQL Database. */
CREATE EVENT SESSION [query_parameterization_data] ON DATABASE
ADD EVENT sqlserver.query_parameterization_data(
ACTION(sqlserver.client_app... |
-- file:privileges.sql ln:1171 expect:true
GRANT DELETE ON lock_table TO regress_locktable_user
|
-- tracking previous manual updates in migration
UPDATE `LineItemCategories` SET `Description` = "Funds From Dean's Office" WHERE `Id` = 1;
UPDATE `LineItemCategories` SET `Description` = "Internal Buyout" WHERE `Id` = 2;
UPDATE `LineItemCategories` SET `Description` = "Range Adjustment Funds" WHERE `Id` = 4;
DELETE F... |
-- Revert yelukerest:roles from pg
BEGIN;
-- XXX Add DDLs here.
COMMIT;
|
/* Definition for the MARK_AS_READ_MESSAGE procedure : */
------------------------------------------------------------------------------
-- Create date: 2020-02-15
-- Autor: <NAME>
--
-- Description:
-- Mark a single message as read.
--
-- Parameters:
-- ID_MESSAGE - The id of message.
------------------------------... |
<filename>komga/src/main/resources/db/migration/V20191021101906__user_library_sharing.sql
alter table user
add (shared_all_libraries boolean not null default true);
create table user_library_sharing
(
user_id bigint not null,
library_id bigint not null,
primary key (user_id, library_id)
);
alter ta... |
<reponame>dram/metasfresh<filename>backend/de.metas.swat/de.metas.swat.base/src/main/sql/postgresql/system/40-sw01_swat/5488920_sys_gh3693_Rename_errorMessage_for_Missing_QarantingWarehouse.sql
-- 2018-03-20T14:47:28.684
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Message SET Value='M_Wa... |
DROP FUNCTION IF EXISTS HU_CostPrice_Function (IN keydate timestamp with time zone, IN M_Product_ID numeric(10,0), IN M_Warehouse_ID numeric(10,0), showDetails character varying);
CREATE OR REPLACE FUNCTION HU_CostPrice_Function (IN keydate timestamp with time zone, IN M_Product_ID numeric(10,0), IN M_Warehouse_ID ... |
-- 2017-06-08T15:26:50.970
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Window (AD_Client_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsBetaFunctionality,IsDefault,IsOneInstanceOnly,IsSOTrx,Name,Processing,Updated,UpdatedBy,WindowType,WinHeight,WinWidth) VALUES (0... |
DELIMITER /
INSERT INTO SEQ_QUESTIONNAIRE_REF_ID VALUES(NULL)
/
INSERT INTO SEQ_QUESTIONNAIRE_ID VALUES(NULL)
/
INSERT INTO QUESTIONNAIRE(QUESTIONNAIRE_REF_ID,QUESTIONNAIRE_ID,NAME,DESCRIPTION,SEQUENCE_NUMBER,IS_FINAL,UPDATE_USER,UPDATE_TIMESTAMP,OBJ_ID,VER_NBR)
VALUES ((SELECT (MAX(ID)) FROM SEQ_QUESTIONNAIRE_REF_ID),... |
<reponame>Erdigergeist/ADB<filename>World/Professions/Cooking/item_loot_template.Small Spice Bag.sql
UPDATE `item_template` SET `LootID`= 44113 WHERE `entry` = 44113;
DELETE FROM `item_loot_template` WHERE `entry` IN(44113);
INSERT INTO `item_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `Groupid`... |
<filename>sql/updates/0.17/11807_01_mangos_gameobject_addon.sql<gh_stars>0
ALTER TABLE db_version CHANGE COLUMN required_11785_01_mangos_instance_encounters required_11807_01_mangos_gameobject_addon bit;
DROP TABLE IF EXISTS `gameobject_addon`;
CREATE TABLE `gameobject_addon` (
`guid` int(10) unsigned NOT NULL defau... |
<reponame>EricChen96/burger_restaurant_node_handlebar
CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE burgers
(
id int NOT NULL AUTO_INCREMENT,
burger_name varchar(255) NOT NULL,
devoured boolean NOT NULL,
PRIMARY KEY (id)
); |
/*
* q_construct_hash.sql
*/
/*
* construct the hash table from the signature matrix of the domain
* specified by schema_string, table_string and the domain_string
*
* max_k is the number of hash functions per band
* max_l is the number of bands
* q_sig_string is the schema where the signature matrix is stored... |
<reponame>SummerWindL/platform-aix-framework
CREATE OR REPLACE FUNCTION f_mb_prj_title_query(
in_projectid VARCHAR(64),
IN in_countflag int4,
IN in_offset int4,
IN in_pagesize int4,
OUT retcode integer, OUT retvalue text)
LANGUAGE plpgsql
AS $function$
--函数说明
--
/*
* 函数说明:查询项目标题列表
* 参数:按要求填写参数。当所有参数为... |
/* Drop Indexes */
DROP INDEX IF EXISTS EVT_PLATFORM_ID_IDX;
DROP INDEX IF EXISTS EVT_PLAT_MSG_IDX;
DROP INDEX IF EXISTS EVT_SCHED_IDX;
DROP INDEX IF EXISTS EVT_TIME_IDX;
/* Drop Tables */
DROP TABLE IF EXISTS CONFIGSENSORPROPERTY;
DROP TABLE IF EXISTS CONFIGSENSORDATATYPE;
DROP TABLE IF EXISTS CONFIGSENSOR;
DROP... |
<reponame>rnzhiw/DistributedMall
/*
Navicat Premium Data Transfer
Source Server : 192.168.56.10
Source Server Type : MySQL
Source Server Version : 50735
Source Host : 192.168.56.10:3306
Source Schema : gulimall_oms
Target Server Type : MySQL
Target Server Version : 50735
File ... |
<reponame>NeroSys/mummi_blog
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Ноя 15 2017 г., 13:45
-- Версия сервера: 5.7.18-0ubuntu0.16.04.1
-- Версия PHP: 7.0.18-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00... |
-- @testpoint:opengauss关键字deferrable(保留),作为角色名
--关键字不带引号-失败
drop role if exists deferrable;
create role deferrable with password '<PASSWORD>' valid until '2020-12-31';
--关键字带双引号-成功
drop role if exists "deferrable";
create role "deferrable" with password '<PASSWORD>' valid until '2020-12-31';
drop role "deferrable";... |
<reponame>lewisblackburn/tweetah<gh_stars>0
/*
Warnings:
- The migration will change the primary key for the `Like` table. If it partially fails, the table could be left without primary key constraint.
- You are about to drop the column `id` on the `Like` table. All the data in the column will be lost.
- You a... |
<filename>Ch21/ex21-09.sql
SELECT count(*)
FROM customers
LEFT JOIN employees
ON (customers.contact_surname=employees.surname
and customers.contact_firstname=employees.firstname
and customers.date_of_birth=employees.date_of_birth)
WHERE employees.surname IS NULL... |
<gh_stars>0
ALTER TABLE BEHANDLING ADD BEHANDLING_TYPE NVARCHAR2(255); |
CREATE TABLE team (
id varchar(100) not null PRIMARY KEY,
name varchar(100) not null,
invitation_id varchar(100)
);
CREATE TABLE user (
id varchar(100) not null PRIMARY KEY,
full_name varchar(100) not null,
display_name varchar(100),
title varchar(100),
available bit default 0,
email varc... |
<filename>only table/csa.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 20, 2021 at 02:06 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00"... |
<reponame>GamzeYaman/JavaBackendWebDevelopment
1. SELECT * FROM film WHERE title LIKE '%n' ORDER BY title ASC LIMIT 5
2. SELECT * FROM film WHERE title LIKE '%n' ORDER BY title DESC OFFSET 1 LIMIT 5
3. SELECT * FROM customer WHERE store_id = 1 ORDER BY last_name DESC LIMIT 4
|
prompt --application/shared_components/navigation/lists/application_configuration
begin
-- Manifest
-- LIST: Application Configuration
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2021.04.15'
,p_release=>'21.1.2'
,p_default_workspace_id=>32532315908301997117
,p_default_application_id=>... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.