text stringlengths 1 1.05M |
|---|
CREATE INDEX idx_aros_lft_rght ON `aros` (`lft`, `rght`);
CREATE TABLE acos ( id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, parent_id INTEGER(10) DEFAULT NULL, model VARCHAR(255) DEFAULT '', foreign_key INTEGER(10) UNSIGNED DEFAULT NULL, alias VARCHAR(255) DEFAULT '', lft INTEGER(10) DEFAULT NULL, rght INTEGER(10) D... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 11 Feb 2020 pada 08.54
-- Versi Server: 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=@@CHARACTER_SET_CLI... |
CREATE TABLE subdivision_UA (id VARCHAR(6) NOT NULL, name VARCHAR(255) NOT NULL, level VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
INSERT INTO `subdivision_UA` (`id`, `name`, `level`) VALUES ('UA-71', 'Čerkaská oblasť', 'region');
INSERT INTO `subdivision_... |
CREATE TABLE music
(
id VARCHAR(32) NOT NULL
PRIMARY KEY COMMENT '歌曲ID',
name VARCHAR(64) NOT NULL COMMENT '歌曲名',
description TEXT NULL COMMENT '歌曲简介',
status VARCHAR(32) DEFAULT 'DRAFT' NOT NULL COMMENT '歌曲上架状态,DRAFT-草稿,PUBLISHED-已上架,CLOSED-已下架',
created_time datetime(6) NOT NULL COMMENT '创... |
\echo *** INSERT RECORDS INTO THE RELATIONAL DB WITH B-TREE INDEX ***
\echo
\echo INSERT INTO customers (customerid, firstname, lastname, address1, address2, city, state, zip, country, region, email, phone, creditcardtype, creditcard, creditcardexpiration, username, PASSWORD, age, income, gender)
\echo WITH tmp AS (... |
CREATE TEMP TABLE Codesets (
codeset_id int NOT NULL,
concept_id bigint NOT NULL
)
;
INSERT INTO Codesets (codeset_id, concept_id)
SELECT 3 as codeset_id, c.concept_id FROM (select distinct I.concept_id FROM
(
select concept_id from @cdm_database_schema.CONCEPT where concept_id in (1350310,1331247)and invalid_... |
-- phpMyAdmin SQL Dump
-- version 5.6.8
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 22, 2017 at 08:52 AM
-- Server version: 10.1.9-MariaDB
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... |
CREATE TABLE [dbo].[RMs] (
[ID] INT IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL,
[Name] CHAR (100) NULL,
[TypeID] INT NULL,
[KeyWords] CHAR (100) NULL,
[Obs] TEXT NULL,
[Activ] INT CONSTRAINT [DF_RMs_Activ... |
UPSERT INTO BICING_DIM_STATION
VALUES (428, 2.19626100, 41.3983890, 11, 'Sant Marti', 'El Poblenou', '08019', 'Carrer Pujades 103', 21739.64, 228701, 10.52);
UPSERT INTO BICING_DIM_STATION
VALUES (510, 2.13414400, 41.3633500, 49, 'NULL', 'NULL', 'NULL', 'Radi 11', NULL, NULL, NULL);
UPSERT INTO BICING_DIM_STATION
VALUE... |
select concat('company;', sub.company, ';activity,authors,issues,prs,commits,review_comments,issue_comments,commit_comments,comments,contributions,contributors'),
sub.activity,
sub.authors,
sub.issues,
sub.prs,
sub.commits,
sub.review_comments,
sub.issue_comments,
sub.commit_comments,
sub.review_comme... |
set echo on
spool reset.log
--
call XDB.DBMS_SODA_ADMIN.drop_Collection('MyCollection')
/
call XDB.DBMS_SODA_ADMIN.drop_Collection('MyCustomCollection')
/
quit |
-- file:plpgsql.sql ln:3639 expect:true
$$ language plpgsql immutable
|
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50522
Source Host : localhost:3306
Source Database : crawl
Target Server Type : MYSQL
Target Server Version : 50522
File Encoding : 65001
Date: 2015-04-14 19:37:11
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---... |
USE `classicmodels`;
/*Table structure for table `customers was used for another project in college` */
DROP TABLE IF EXISTS `customers`;
CREATE TABLE `customers` (
`customerNumber` int(11) NOT NULL,
`customerName` varchar(50) NOT NULL,
`contactLastName` varchar(50) NOT NULL,
`contactFirstName` var... |
create table migration_two(x text) |
DROP TABLE soknader;
CREATE TABLE soknader (
soknad_id VARCHAR(64) NOT NULL,
soknad_status VARCHAR(64) NOT NULL,
soknad JSONB,
PRIMARY KEY (soknad_id,soknad_status)
); |
select 1 as id
union all
select * from {{ ref('node_0') }}
union all
select * from {{ ref('node_3') }}
union all
select * from {{ ref('node_6') }}
union all
select * from {{ ref('node_8') }}
union all
select * from {{ ref('node_17') }}
union all
select * from {{ ref('node_85') }}
union all
select * from {{ ref('node_15... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 21, 2022 at 03:52 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
DROP TABLE "USER" CASCADE CONSTRAINTS;
DROP TABLE "RENT" CASCADE CONSTRAINTS;
DROP TABLE "AREARENT" CASCADE CONSTRAINTS;
DROP TABLE "AREA" CASCADE CONSTRAINTS;
DROP TABLE "ARTICLE" CASCADE CONSTRAINTS;
DROP TABLE "ARTICLERENT" CASCADE CONSTRAINTS;
DROP TABLE "BOATRENT" CASCADE CONSTRAINTS;
DROP TABLE "BOAT" CASCADE CON... |
DECLARE
V_COUNTRYID LOCATIONS.COUNTRY_ID%TYPE:='CA';
V_LOC_ID LOCATIONS.LOCATION_ID%TYPE;
V_COUNTER NUMBER(2):=1;
V_NEW_CITY LOCATIONS.CITY%TYPE:='MONTREAL WHILE';
BEGIN
SELECT MAX(LOCATION_ID) INTO V_LOC_ID FROM LOCATIONS
WHERE COUNTRY_ID = V_COUNTRYID;
WHILE V_COUNTER <=3 LOOP
INSERT INTO L... |
-----------------------------------------------------------------------------------
--Do not modify this file, instead use an alter proc to over-write the procedure.--
--Make sure you follow the same expected interface of parameters, and resultsets.--
--------------------------------------------------------------------... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 02, 2020 at 05:34 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
EXPLAIN {% if analyze %}ANALYZE {% endif %}{{ sql }}
|
CREATE TABLE IF NOT EXISTS `footprints` (
`id` INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
`digest` CHAR(64) NOT NULL,
`size` BIGINT NOT NULL,
`fast_digest` BIGINT NOT NULL,
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
UNIQUE (`digest`)
)
DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 07, 2020 at 03:33 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
Insert into EG_ACTION (id, name, url, queryparams, parentmodule, ordernumber, displayname, enabled, contextroot, version, createdby, createddate, lastmodifiedby, lastmodifieddate, application)
values (nextval('seq_eg_action'),'BudgetSearch-groupedBudgets','/budget/budgetSearch-groupedBudgets.action',null,
(select id ... |
CREATE PROCEDURE [workers].[DumpDataAndWait8]
(
@SecondWait TINYINT = 0
)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @Delay VARCHAR(8)
SELECT
@Delay = '00:00:0' + LEFT(ABS(CAST(CAST(NEWID() AS VARBINARY(192)) AS INT)),1)
INSERT INTO [dbo].[DataDump]
(
[SomeValue]
)
SELECT TOP 1
[stopword]
FROM
sys.f... |
CREATE TABLE IF NOT EXISTS `batches_cancelled` (
`id` BIGINT NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`id`) REFERENCES batches(id) ON DELETE CASCADE
) ENGINE = InnoDB;
INSERT INTO batches_cancelled
SELECT id
FROM batches
WHERE batches.cancelled;
ALTER TABLE batches DROP COLUMN cancelled,
R... |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 21, 2021 at 01:38 PM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
--
-- Copyright 2009-2021 the original author or authors.
--
-- Licensed 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
--
-- Unles... |
SELECT ie.subject_id, ie.hadm_id, ie.stay_id
-- patient level factors
, pat.gender, pat.dod
-- hospital level factors
, adm.admittime, adm.dischtime
, adm.dischtime::DATE - adm.admittime::DATE as los_hospital
--, DATETIME_DIFF(adm.dischtime, adm.admittime, DAY) as los_hospital
--, DATETIME_DIFF(adm.admittime, DATETI... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 03, 2020 at 04:36 AM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
CREATE ROLE api_user WITH LOGIN ENCRYPTED PASSWORD 'api$pass';
CREATE TABLE IF NOT EXISTS predict_logs
(
TS TIMESTAMP DEFAULT now(),
f1 FLOAT NOT NULL,
f2 FLOAT NOT NULL,
f3 VARCHAR(1),
predict INT NOT NULL
);
CREATE TABLE IF NOT EXISTS predict_logs_cnt
(
f3 VARCHAR(1),
cnt INT,
CONSTRAINT predict_logs_cnt_PK... |
DROP PROCEDURE IF EXISTS fix_split_match;
DELIMITER //
CREATE PROCEDURE fix_split_match(IN _mode INT, IN _matchId INT, IN _newMatchId INT)
BEGIN
SELECT "start";
SET @mode = _mode;
SET @matchId = _matchId;
SET @newMatchId = _newMatchId;
SELECT @matchId, @newMatchID;
IF @mode = 0 THEN
... |
CREATE OR REPLACE FUNCTION jobcenter.do_jobtaskerror(a_jobtask jobtask)
RETURNS nextjobtask
LANGUAGE plpgsql
SECURITY DEFINER
SET search_path TO jobcenter, pg_catalog, pg_temp
AS $function$DECLARE
v_errortask_id int;
v_parentjob_id bigint;
v_parenttask_id int;
v_parentworkflow_id int;
v_parentwait boolean;
v... |
-- selectA.test
--
-- execsql {
-- SELECT x,y,z FROM t2 UNION SELECT a,b,c FROM t1
-- ORDER BY c,b,a
-- }
SELECT x,y,z FROM t2 UNION SELECT a,b,c FROM t1
ORDER BY c,b,a |
/*
* Copyright (c) 2020 Bixbit s.c. All rights reserved.
* See LICENSE file for licensing information.
*/
CREATE TABLE application (
id UUID PRIMARY KEY NOT NULL,
project_id UUID NOT NULL,
user_id VARCHAR(255) NOT NULL,
CONSTRAINT user_id_project_id_unique UNIQUE (project_id, user_id),
FOREIGN ... |
-- @author: krakowiakpawel9@gmail.com
-- @site: e-smartdata.org
CREATE TABLE DQL.01_tab (
id STRING NOT NULL,
age INT64,
name STRING
);
-- 4 różne wiersze
INSERT INTO DQL.01_tab VALUES ('001', 22, 'Mark');
INSERT INTO DQL.01_tab VALUES ('002', 27, 'Paul');
INSERT INTO DQL.01_tab VALUES ('003', 30, 'Rose');
INSE... |
SELECT
`mc`.`country_code`,
COUNT(`m`.`mountain_range`) AS `mountain_range`
FROM
`mountains_countries` AS `mc`
JOIN
`mountains` AS `m` ON `mc`.`mountain_id` = `m`.`id`
WHERE
`mc`.`country_code` = 'BG'
OR `mc`.`country_code` = 'US'
OR `mc`.`country_code` = 'RU'
GROUP BY `mc`.... |
SELECT name, setting FROM pg_settings WHERE name LIKE 'enable%';
CREATE TABLE foo2(fooid int, f2 int);
INSERT INTO foo2 VALUES(1, 11);
INSERT INTO foo2 VALUES(2, 22);
INSERT INTO foo2 VALUES(1, 111);
CREATE FUNCTION foot(int) returns setof foo2 as 'SELECT * FROM foo2 WHERE fooid = $1;' LANGUAGE SQL;
-- supposed to f... |
INSERT INTO IIS.ESTABLISHMENT (
PK_ESTABLISHMENT_CODE,
ESTABLISHMENT_NAME,
ESTAB_CNA,
ESTAB_OP_CAP,
ESTAB_ADDRESS_LINE_1,
ESTAB_ADDRESS_LINE_2,
ESTAB_ADDRESS_LINE_3,
ESTAB_ADDRESS_LINE_4,
ESTAB_POSTCODE,
GENERAL_TEL_NO,
TEAM_ID,
FAX_NUMBER,
TRANSACTION_SEQ_NUMBER,
... |
-- ----------------------------------------
-- Security
CREATE SCHEMA [data];
GO
CREATE ROLE [TestRole];
GO
GRANT EXECUTE, SELECT, UPDATE, INSERT, DELETE ON SCHEMA :: [data] TO [TestRole];
GO
ALTER ROLE [db_datareader] ADD MEMBER [TestRole];
ALTER ROLE [db_datawriter] ADD MEMBER [TestRole];
GO
-- ---... |
--TEST: pass zero date/time values to date function
--TEST: pass zero datetime value
select date(datetime'0000-00-00 00:00:00');
select date(datetime'00/00/0000 00:00:00');
select date(datetime'00:00:00 00/00/0000');
select date(datetime'00:00:00 0000-00-00');
--TEST: pass string value
select date('0000-00-00 00:00:0... |
-- @product_version gpdb: [4.3.4.0 -],4.3.4.0O2
-- @Description Ensures that a reindex table during alter tab add partition operations is ok
--
DELETE FROM reindex_crtabforadd_part_heap_btree WHERE id < 12;
1: BEGIN;
2: BEGIN;
1: REINDEX TABLE reindex_crtabforadd_part_heap_btree;
2&: alter table reindex_crtabforad... |
-- {
CREATE OR REPLACE FUNCTION ver_disable_versioning(
p_table_oid REGCLASS
)
RETURNS BOOLEAN AS
$$
DECLARE
v_schema NAME;
v_table NAME;
v_owner NAME;
BEGIN
SELECT nspname, relname, rolname
INTO v_schema, v_table, v_owner
FROM @extschema@._ver_get_table_info(p_table_oid);
-- ... |
CREATE DATABASE heightWeight;
use heightWeight;
CREATE TABLE IF NOT EXISTS hw10 (
`Index` INT,
`Height_Inches` NUMERIC(4, 2),
`Weight_Pounds` NUMERIC(5, 2)
);
INSERT INTO hw10 VALUES
(1,60.73,110.90),
(2,71.50,130.47),
(3,67.40,153.03),
(4,68.27,140.30),
(5,67.70,147.30),
(6,68.73,1... |
select top 100
c_last_name,c_first_name,substr(s_city,1,30),ss_ticket_number,amt,profit
from
(select ss_ticket_number
,ss_customer_sk
,store.s_city
,sum(ss_coupon_amt) amt
,sum(ss_net_profit) profit
from store_sales,date_dim,store,household_demographics
where stor... |
-- @testpoint:openGauss关键字state(非保留),作为列名带引号并且排序时使用该列,建表成功,state列按字母大小排序
drop table if exists explain_test;
create table explain_test(
c_id int, c_int int, c_integer integer, c_bool int, c_boolean int, c_bigint integer,
c_real real, c_double real,
c_decimal decimal(38), c_number number(38), c_numeric numeric(38)... |
-- AlterTable
ALTER TABLE "Setting" ALTER COLUMN "photos" DROP NOT NULL,
ALTER COLUMN "garage" DROP NOT NULL,
ALTER COLUMN "friends" DROP NOT NULL,
ALTER COLUMN "events" DROP NOT NULL,
ALTER COLUMN "location" DROP NOT NULL;
|
ALTER TABLE queue_placement ADD COLUMN ts timestamp NOT NULL DEFAULT NOW(); |
BEGIN;
DROP VIEW IF EXISTS qidao."view_evt_approval" CASCADE;
CREATE VIEW qidao."view_evt_approval" AS(
select
*
from
((select
NULL::int as vaultID,
contract_address as contract_address,
evt_tx_hash as evt_tx_hash,
evt_index as evt_index,
evt_block_time as evt_b... |
DROP FUNCTION eniwaredatum.find_most_recent(bigint, text[]);
CREATE OR REPLACE FUNCTION eniwaredatum.find_most_recent(
Edge bigint,
sources text[] DEFAULT NULL)
RETURNS SETOF eniwaredatum.da_datum_data AS
$BODY$
SELECT dd.* FROM eniwaredatum.da_datum_data dd
INNER JOIN (
-- to speed up query for sources (which ... |
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 26 Apr 2021 pada 16.31
-- Versi server: 10.4.14-MariaDB
-- Versi PHP: 7.3.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
CREATE TABLE [dbo].[NORMATIVE_DOCS_TYPES] (
[ID] BIGINT NOT NULL,
[NAME] VARCHAR (500) NOT NULL,
[STARTDATE] DATETIME NOT NULL,
[ENDDATE] DATETIME NOT NULL,
CONSTRAINT [PK_NORMATIVE_DOCS_TYPES] PRIMARY KEY CLUSTERED ([ID] ASC)
);
|
-- INSERT INTO FNAC.Filme (id_artigo, duracao, realizador, genero)
Use FNAC;
INSERT INTO FNAC.Filme (id_artigo, duracao, realizador, genero) VALUES (1273,142,'Frank Darabont','Drama');
INSERT INTO FNAC.Filme (id_artigo, duracao, realizador, genero) VALUES (1274,175,'Francis Ford Coppola','Crime');
INSERT INTO FNAC.Film... |
# ---------------------------------------------------
# Last Update: modified by Valminder Sept 15, 2006.
# ---------------------------------------------------
#
# Game Setup
#
# Modified by Valminder, April 2002.
#
# Source: Cities of Mystery.
#
# Modified by Valminder April 2002
# I modified the "City Encounters" ... |
SELECT
ace.cod_acervo,
ace.tipo,
ace.visivel as 'visivel',
ace.reserva as 'reserva',
ace.nacional as 'nacional',
ace.cod_unidade as 'cod_unidade',
ace.cod_acervo as '001',
ISNULL(idiom.idiomas, '') as '008-35-37',
ISNULL(cla.classificacao, '') as '090a',
ISNULL(cla.cutter, '') as '090b',
ISNULL(a... |
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table activity (
id bigint auto_increment not null,
employee_id varchar(255),
machine_id bigint,
check_in_date dateti... |
-- file:privileges.sql ln:299 expect:true
INSERT INTO atest5 (two) VALUES (3)
|
show variables like 'char%';
DROP TABLE IF EXISTS test_table;
CREATE TABLE IF NOT EXISTS test_table(
test_int INTEGER,
test_float DOUBLE,
test_enum ENUM('even', 'odd'),
test_null INTEGER
);
INSERT INTO test_table VALUES (1, 1.1, 'odd', NULL);
INSERT INTO test_table VALUES (2, 2.2,'even', NULL);
INSE... |
update Planet
set kepler_name = NULL
where status != 'CONFIRMED';
Delete from Planet
where radius < 0; |
drop table if exists emp_;
CREATE TABLE emp_ (
empno NUMERIC(4) NOT NULL CONSTRAINT emp_pk PRIMARY KEY,
ename VARCHAR(10),
job VARCHAR(9),
mgr NUMERIC(4),
hiredate DATE,
sal NUMERIC(7,2),
comm NUMERIC(7,2),
deptno NUMERIC(2)
);
INSERT INTO emp_ VALUES (7369,'SMITH','CLERK',7902,'17-DEC-80',800,NULL,20);
INSERT INTO em... |
/* ==Scripting Parameters==
Source Server Version : SQL Server 2012 (11.0.6020)
Source Database Engine Edition : Microsoft SQL Server Enterprise Edition
Source Database Engine Type : Standalone SQL Server
Target Server Version : SQL Server 2012
Target Database Engine Edition : Microsoft SQL Ser... |
-----------------------------------------------------------------------
--
-- Copyright (c) 2010 Pierre Racine <pierre.racine@sbf.ulaval.ca>
--
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation;... |
-- Main features:
-- - Disambiguates editor linked papers as far as possible
-- Gives each editor paper match a priority
-- - Select papers with increasing priority until at least a target number of papers is reached
WITH t_editor AS (
SELECT
editor.person_id,
editor.name,
editor.relevant_pubm... |
-- -----------------------------------------------------
-- Schema websports
-- -----------------------------------------------------
CREATE DATABASE IF NOT EXISTS websports DEFAULT CHARACTER SET utf8 ;
USE websports ;
-- -----------------------------------------------------
-- Table pais
-- ------------------------... |
ALTER TABLE [dbo].[CategoryGoals]
ADD CONSTRAINT [FK_CategoryGoals_Categories] FOREIGN KEY ([CategoryId]) REFERENCES [dbo].[Categories] ([id]) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
/*
Enter your query here.
*/
SELECT ROUND(LONG_W, 4) FROM (SELECT LAT_N, LONG_W FROM STATION WHERE LAT_N < 137.2345 ORDER BY LAT_N DESC LIMIT 1) AS S;
|
DROP SCHEMA IF EXISTS public CASCADE;
CREATE SCHEMA public;
|
CREATE TABLE Image (id INT AUTO_INCREMENT NOT NULL, project_history_id INT DEFAULT NULL, image_title VARCHAR(255) NOT NULL, path VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, updated DATETIME NOT NULL, INDEX IDX_4FC2B5B6A3FF60 (project_history_id), PRIMARY KEY(id))
CREATE TABLE Education (id INT AUTO_INCREM... |
#DROP TABLE if exists eventtypes;
CREATE TABLE eventtypes (
EventType varchar(255) NOT NULL,
PRIMARY KEY (EventType ASC)
)
ENGINE = InnoDB
DEFAULT CHARSET = utf8
COMMENT = 'Event Types'
;
|
-- P16C. POPULATION IN HOUSEHOLDS BY AGE (AMERICAN INDIAN AND ALASKA NATIVE ALONE HOUSEHOLDER)
-- designed to work with the IRE Census bulk data exports
-- see http://census.ire.org/data/bulkdata.html
CREATE TABLE ire_p16c (
geoid VARCHAR(11) NOT NULL,
sumlev VARCHAR(3) NOT NULL,
state VARCHAR(2) NOT NULL,
count... |
CREATE TABLE [dbo].[Pracownicy] (
[PracownikId] INT IDENTITY (1, 1) NOT NULL,
[Imie] VARCHAR (50) NOT NULL,
[Nazwisko] VARCHAR (100) NOT NULL,
[PESEL] CHAR (11) NULL,
[Plec] VARCHAR (9) NULL,
[Adres] VARCHAR (200) NULL,... |
-- MySQL dump 10.13 Distrib 5.7.18, for Linux (x86_64)
--
-- Host: localhost Database: GIAOVIEN
-- ------------------------------------------------------
-- 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_S... |
SET DEFINE OFF;
CREATE TABLE AFW_17_COMPT_TWILI
(
SEQNC NUMBER(10),
CODE VARCHAR2(23 BYTE),
NOM VARCHAR2(60 BYTE),
DESCR VARCHAR2(4000 BYTE),
ACOUN_ID VARCHAR2(100 BYTE),
AUTHE_TOKEN VARCHAR2(100 BYTE),
REPRT_WALT VARCHAR2(500 BYTE),
MOT_PASSE_W... |
CREATE TABLE device_txack (
id uuid primary key,
received_at timestamp with time zone not null,
dev_eui bytea not null,
device_name varchar(100) not null,
application_id bigint not null,
application_name varchar(100) not null,
gateway_id bytea not nul... |
-- noinspection SqlNoDataSourceInspectionForFile
CREATE TABLE people (id NUMBER NOT NULL, name VARCHAR(56) NOT NULL, last_name VARCHAR(56), dob DATE, graduation_date DATE, created_at TIMESTAMP, updated_at TIMESTAMP)
-- BREAK
ALTER TABLE people ADD CONSTRAINT people_pk PRIMARY KEY ( id )
-- BREAK
CREATE SEQUENCE peopl... |
CREATE OR REPLACE FUNCTION f_mb_prj_insert (
in_projectid VARCHAR(64),
in_projectname VARCHAR(255),
in_projectdesc text,
in_hospcode VARCHAR(64),
OUT retcode integer, OUT retvalue text)
RETURNS record
LANGUAGE plpgsql
AS $function$
/*
* 函数说明:插入项目。
* 参数:按要求填写参数
* * 返回:
* retcode: 小于0,失败;==0成功
* re... |
--
-- Copyright 2010-2014 Axel Fontaine
--
-- Licensed 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 applicable law or... |
create extension hstore;
create schema goodschema;
create table goodschema.t(id uuid, value text);
create table t(id uuid, value text);
CREATE TYPE goodschema.sdfasdfasdf AS ENUM ('not shipped', 'shipped', 'delivered');
create index on goodschema.t(id);
create view goodschema.v as select 1;
|
-- +migrate Up
-- +migrate StatementBegin
ALTER TABLE transaction
CHANGE COLUMN raw raw MEDIUMTEXT NULL DEFAULT NULL;
-- +migrate StatementEnd |
/*
* Copyright 2021 (c) Renzo Diaz
*
* Folders table
*/
DELIMITER //
DROP TABLE IF EXISTS Folders //
CREATE TABLE Folders (
FolderID INTEGER AUTO_INCREMENT,
UserID INTEGER NOT NULL,
ParentID INTEGER,
Name TEXT NOT NULL,
Token VARCHAR(64) NOT NULL UNIQUE,
CreateDa... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 07, 2016 at 02:22 PM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.5.37
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
-- stat.sql
-- Timur Akhmadeev - akhmadeev@.com
--
-- @stat table_name
-- or
-- @stat table_name owner
set echo off feed off termout off
set linesize 180 trimspool on
set pagesize 60
repheader off
ttitle off
col num_rows format a6 heading 'Num|rows' justify right
co... |
--! Previous: sha1:f892be9610cebef202705a520d5e96173da2b3a4
--! Hash: sha1:aa51406d4744d24cffd301aed444e7c0236e8bad
--! split: 1-current.sql
-- Enter migration here
create or replace function app_public.items_unique_check_ins(i app_public.items)
returns int
language sql
stable
as
$$
select count(distinct c.autho... |
insert into city values
(2835018,"Schwarzenbach an der Saale","DE",11.93333,50.216671),
(2955951,"Annweiler am Trifels","DE",7.96667,49.200001),
(6556701,"Dieterskirchen","DE",12.4167,49.416698),
(2937115,"Dieterskirchen","DE",12.41667,49.416672),
(6556358,"Chiemsee","DE",12.4167,47.866699),
(2940126,"Chiemsee","DE",12... |
-- You can use one of the following 3 options for randomness. Please use only one of these.
-- Which ever you want to use, remove the -- before INSERT word and put -- before the others.
-- Use this one if you want consistent seed (meaning the swap will always be the same for the same seed
-- Change the second value to... |
create table "user"
(
id uuid primary key,
subject varchar(1000) not null,
attributes jsonb not null
);
create unique index user_subject_u on "user" (subject);
|
DECLARE @ErrColumns VARCHAR(MAX) = '';
DECLARE @ErrValues VARCHAR(MAX) = '';
DECLARE @ErrSQL VARCHAR(MAX) = '';
;WITH oldTableColumns AS
(
SELECT
c.[name] AS 'ColName'
FROM
sys.objects o
INNER JOIN sys.schemas s
ON o.[schema_id] = s.[schema_id]
INNER JOIN sys.columns c
ON o.[object_id] = c.[object_id... |
-- insert.test
--
-- execsql {INSERT INTO sqlite_master VALUES(1,2,3,4)}
INSERT INTO sqlite_master VALUES(1,2,3,4) |
-- Table SEQUENCE_TABLE is an internal table required by DataNucleus.
-- NOTE: Some versions of SchemaTool do not automatically generate this table.
-- See http://www.datanucleus.org/servlet/jira/browse/NUCRDBMS-416
CREATE TABLE SEQUENCE_TABLE
(
SEQUENCE_NAME VARCHAR2(255) NOT NULL,
NEXT_VAL NUMBER NOT NULL
);
A... |
---------------------------------------------------------------------------
--
-- syscat.sql-
-- sample queries to the system catalogs
--
--
-- Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
-- Portions Copyright (c) 1994, Regents of the University of California
--
-- src/tutorial/syscat.sourc... |
-- 修改每个收费项目的价格。
update shop_product_price_item
,
(
SELECT item_id, MIN( adult_price ) as min_price
FROM `shop_product_price_detail`
WHERE inventory >0
AND price_date >20140531
GROUP BY item_id
) s
set shop_product_price_item.min_price = s.min_price
where shop_product_price_item.id=s.item_id;
-- 修改商品价格
insert into ... |
CREATE DATABASE IF NOT EXISTS APPLICATION;
USE APPLICATION;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `APPLICATION`
--
-- --------------------------------------------------------
--
-- Table structure for table `APPLICATION`
--
CREATE TABLE IF NOT EXISTS `APPLICATION` (
`A... |
CREATE TYPE "Currency" AS ENUM (
'USD',
'EUR'
);
CREATE TABLE "accounts" (
"id" bigserial PRIMARY KEY,
"owner" varchar NOT NULL,
"balance" bigint NOT NULL,
"currency" varchar NOT NULL,
"created_at" timestamptz NOT NULL DEFAULT (now())
);
CREATE TABLE "entries" (
"id" bigint PRIMARY KEY,
"account_id"... |
--
-- Copyright 2010-2017 Boxfuse GmbH
--
-- Licensed 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 applicable law or ... |
IF OBJECT_ID('sales.post_return') IS NOT NULL
DROP PROCEDURE sales.post_return;
GO
CREATE PROCEDURE sales.post_return
(
@transaction_master_id bigint,
@office_id integer,
@user_id integer,
@login_id bigint,
@val... |
USE msdb
GO
IF EXISTS(SELECT * FROM sys.objects WHERE name = 'tr_SysJobs_enabled' And type = 'TR')
BEGIN
EXEC('Drop trigger dbo.tr_SysJobs_enabled')
IF (@@error = 0)
PRINT 'Successfully dropped trigger dbo.tr_SysJobs_enabled.'
ELSE
BEGIN
PRINT 'FAILED to create trigger dbo.tr_SysJobs_enabled.'
END
END
GO
P... |
SELECT
(extract(epoch FROM now()) * 1e9)::int8 AS epoch_ns,
*
FROM (
SELECT
'table'::text AS object_type,
grantee::text AS tag_role,
quote_ident(table_schema) || '.' || quote_ident(table_name) AS tag_object,
privilege_type
FROM
information_schema.table_privileges
... |
CREATE DATABASE IF NOT EXISTS `incubator` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `incubator`;
-- MySQL dump 10.13 Distrib 5.6.24, for Win64 (x86_64)
--
-- Host: localhost Database: incubator
-- ------------------------------------------------------
-- Server version 5.6.26-log
/*!40101 SET @OLD_CHARACTER_SET... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.