text stringlengths 1 1.05M |
|---|
/*
WARNING: This SCRIPT USES SQL TEMPLATE PARAMETERS.
Be sure to hit CTRL+SHIFT+M in Query Analyzer if running manually.
This script imports data from a .TEXT 0.95 database
into the Subtext database.
This script is written with the following assumptions:
1) it is being run from the dotText schema (so be sure to ... |
-- 2019-08-21T12:13:50.955Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field SET DisplayLogic='@IsDropShip@=Y',Updated=TO_TIMESTAMP('2019-08-21 15:13:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=57734
;
|
CREATE TABLE `fine` (
`id` int(10) unsigned NOT NULL,
`name` varchar(30) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 |
CREATE TRIGGER testTrigger ON test1
FOR INSERT
AS
INSERT INTO test
(id,name,status)
SELECT
id,name,status
FROM inserted
go |
-- Feb 3, 2017
-- adding study tagging system
CREATE TABLE qiita.study_tags (
study_tag_id bigserial NOT NULL,
email varchar NOT NULL,
study_tag varchar NOT NULL,
CONSTRAINT pk_study_tag UNIQUE ( study_tag ),
CONSTRAINT pk_study_tag_id PRIMARY KEY ( study_tag_id )
) ;
CREATE INDEX idx_study_tag_id ON qiita.... |
DROP FUNCTION IF EXISTS grest.pool_history (text, uinteger);
CREATE FUNCTION grest.pool_history (_pool_bech32 text, _epoch_no uinteger DEFAULT NULL)
RETURNS TABLE (
epoch_no bigint,
active_stake text,
active_stake_pct numeric,
saturation_pct numeric,
block_cnt bigint,
delegator_cnt bigint,
... |
CREATE TABLE list (id VARCHAR(2) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "list" ("id", "value") VALUES (E'AF', E'Afganistan');
INSERT INTO "list" ("id", "value") VALUES (E'AL', E'Albanija');
INSERT INTO "list" ("id", "value") VALUES (E'DZ', E'Alžir');
INSERT INTO "list" ("id", "value") VALU... |
insert into authorities (name) values ('READ');
insert into authorities (name) values ('WRITE');
insert into authorities (name) values ('DELETE');
insert into roles (name) values ('ROLE_SYSADMIN');
insert into roles (name) values ('ROLE_ADMIN');
insert into roles (name) values ('ROLE_USER');
insert into roles_authoriti... |
SELECT SUM("Generico_5"."InversionUS") AS "sum:Calculation_0061002123102817:ok", CAST(EXTRACT(YEAR FROM "Generico_5"."FECHA") AS BIGINT) AS "yr:FECHA:ok" FROM "Generico_5" WHERE ((CAST(EXTRACT(YEAR FROM "Generico_5"."FECHA") AS BIGINT) >= 2010) AND (CAST(EXTRACT(YEAR FROM "Generico_5"."FECHA") AS BIGINT) <= 2015) AND... |
-- 增加订单编辑权限和查看已完成订单权限
INSERT INTO `ecs_admin_action` ( `action_id` , `parent_id` , `action_code` )
VALUES (
NULL , '6', 'order_edit'
), (
NULL , '6', 'order_view_finished'
);
-- 用户中心欢迎页面公告
INSERT INTO `ecs_shop_config` ( `id` , `parent_id` , `code` , `type` , `store_range` , `store_dir` , `value` )
VALUES (
... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 15, 2021 at 09:44 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
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_20') }}
union all
select * from {{ ref('node_78... |
-- MySQL dump 10.13 Distrib 5.6.35, for osx10.9 (x86_64)
--
-- Host: localhost Database: laraclassified
-- ------------------------------------------------------
-- Server version 5.6.35
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULT... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jun 29, 2019 at 05:19 PM
-- Server version: 5.7.19
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
-- Clear out old entries first
DELETE FROM postgres.{{schema_name | sqlsafe}}.reporting_ocpgcp_cost_summary_by_region_p
WHERE usage_start >= date('{{start_date | sqlsafe}}')
AND usage_start <= date('{{end_date | sqlsafe}}')
AND invoice_month = '{{year | sqlsafe}}{{month | sqlsafe}}'
AND cluster_id = '{{clus... |
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`lname` varchar(100) CHARACTER SET latin1 NOT NULL,
`gname` varchar(100) CHARACTER SET latin1 NOT NULL,
`location` varchar(200) NOT NULL,
`wife` int(2) NOT NULL,
`children` int(2) NOT NULL,
`payrate` int(50) NOT NULL,
`username`... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 06-Set-2020 às 03:48
-- Versão do servidor: 10.4.13-MariaDB
-- versão do PHP: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
-- file:boolean.sql ln:184 expect:true
SELECT '' AS "Not True", f1
FROM BOOLTBL1
WHERE f1 IS NOT TRUE
|
/* -----------------------------------------------------------------------------
Delete all data from the PIMS_STATIC_VARIABLE table and repopulate.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Author Date Comment
------------ ----------- ----------------------------... |
SELECT "MLB_48"."teamname" AS "teamname" FROM "MLB_48" GROUP BY 1 ORDER BY "teamname" ASC;
|
-- SPDX-License-Identifier: Apache-2.0
-- Copyright Contributors to the ODPi Egeria project.
disconnect all$
create database CDD$
connect to CDD$
drop table ContactPhone$
CREATE TABLE ContactPhone (
RecId INT NOT NULL,
ContactType CHAR NOT NULL,
Number VARCHAR(40) NOT NULL
) $
import from '../CompanyDirectory... |
CREATE View [reference].[RepoObjectColumn_ReferencedReferencing]
As
--Select
-- Object2.RepoObject_fullname As Referenced_fullname
-- , Object2.RepoObject_fullname2 As Referenced_fullname2
-- , Object2.RepoObject_guid As Referenced_RepoObject_guid
-- , Object2.RepoObject_type ... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 10, 2019 at 05:26 PM
-- 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... |
DELETE FROM waffle_switch WHERE name IN (
'allow-refund', 'paypal-disable', 'browserid-login', 'collection-stats',
'video-encode', 'theme-stats'
);
|
if exists (select * from dbo.sysobjects where id = object_id(N'[MenuObject_Set]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [MenuObject_Set]
GO
|
CREATE DATABASE MiniORM
GO
USE MiniORM
GO
CREATE TABLE Projects
(
Id INT IDENTITY PRIMARY KEY,
Name VARCHAR(50) NOT NULL
)
CREATE TABLE Departments
(
Id INT IDENTITY PRIMARY KEY,
Name VARCHAR(50) NOT NULL
)
CREATE TABLE Employees
(
Id INT IDENTITY PRIMARY KEY,
FirstName VARCHAR(50) NOT NULL,
MiddleName VARCHAR(50),
Las... |
-- 2018-10-23T16:03:24.058
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET MandatoryLogic='@AD_Element_ID/0@>0',Updated=TO_TIMESTAMP('2018-10-23 16:03:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=116
;
-- 2018-10-23T16:03:44.579
-- I forgot to set the DICTIONARY_... |
Copyright (C) 1998 James G. MacKinnon, Alfred A. Haug, and Leo Michelis.
lm0-07-2 3 1
20.2430 0.040814
20.8188 0.032740
21.6965 0.022018
22.4450 0.016911
23.2367 0.013174
23.7378 0.011992
24.1063 0.011234
24.4092 0.010313
24.6616 0.009878
24.8765 0.009114
25.0696 0.008961
25.2403 0.008379
25... |
--SELECT MAX("MLB_37"."AVG") AS "TEMP(attr:AVG:qk)(3030839854)(0)", MIN("MLB_37"."AVG") AS "TEMP(attr:AVG:qk)(3417196579)(0)", MAX("MLB_37"."BABIP") AS "TEMP(attr:BABIP:qk)(4285141330)(0)", MIN("MLB_37"."BABIP") AS "TEMP(attr:BABIP:qk)(611967120)(0)", MAX("MLB_37"."ISO") AS "TEMP(attr:ISO:qk)(2407168166)(0)", ... |
CREATE OR REPLACE FUNCTION "GET_FISH_PARTS_COUNTS"
( collection_object_id IN NUMBER
) RETURN VARCHAR2
-- Given a collection_object.collection_object_id, returns a string --
-- representing the numbers of Alcohol, Cleared and Stained, and --
-- skeletal specimen_parts that exist for that collection_object --
... |
select count(*) as validation_errors
from (
select
team_id
from `dbt-package-testing`.`dbt_jamie`.`asana_team`
where team_id is not null
group by team_id
having count(*) > 1
) validation_errors
|
-- --------------------------------------------------------
-- 主机: localhost
-- 服务器版本: 5.7.21 - MySQL Community Server (GPL)
-- 服务器操作系统: Linux
-- HeidiSQL 版本: 8.0.0.4396
-- --------------------------------------------------------
/*... |
CREATE TABLE [dbo].[MembershipType] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[TenantId] INT NOT NULL,
[Name] NVARCHAR (256) NOT NULL,
[RequiredVolunteerDays] INT CONSTRAINT [DF_MembershipType_RequiredVolunteerDays] DEFAULT ((... |
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table user_master (
user_id varchar(255) not null,
user_name varchar(255),
password varchar(255),
regist_time datetime(6)... |
SELECT "SalariesFrance_13"."REG_LIB" AS "REG_LIB", "SalariesFrance_13"."ZE2010_LIB" AS "ZE2010_LIB" FROM "SalariesFrance_13" GROUP BY 1, 2;
|
USE tempdb;
GO
IF EXISTS (SELECT 1 FROM sys.schemas WHERE name = 'STIG')
BEGIN
DROP SCHEMA STIG
END
GO
CREATE SCHEMA STIG
GO
/*
Objects defined in this file:
... |
ALTER TABLE challenges
ADD class_name varchar(30); |
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
-- +goose StatementBegin
DROP TABLE identification_comments;
DROP TABLE citizenship_comments;
DROP TABLE financial_comments;
DROP TABLE foreign_comments;
DROP TABLE history_comments;
DROP TABLE legal_comments;
DROP TABLE military_comments;
... |
CREATE DATABASE todo_db CHARACTER SET utf8mb4;
|
DECLARE genre_name VARCHAR(100);
BEGIN
SELECT g.NAME into genre_name
FROM Track t
INNER JOIN GENRE g on t.GENREID = g.GENREID
WHERE t.TRACKID = 1;
IF (genre_name = 'Jazz')
THEN
raise_application_error(-20000, 'Playlist cannot have more than 50 tracks!');
ELSE
INSERT INTO... |
-- @author: krakowiakpawel9@gmail.com
-- @site: e-smartdata.org
-- Funkcje czasu
-- CURRENT_TIME()
SELECT CURRENT_TIME('+2:00') as current_time;
-- TIME(hour, minute, second) - towrzy obiekt TIME
SELECT TIME(10, 12, 45) as time;
-- TIME_ADD(time, INTERVAL INT64 part)
SELECT
CURRENT_TIME('+2:00') as now,
TIME... |
set define '&'
prompt Execute /dummy_s3_function_a.sql
@./dummy_s3_function_a.sql
prompt Execute /dummy_s3_function_b.sql
@./dummy_s3_function_b.sql
prompt Execute /dummy_s3_function_c.sql
@./dummy_s3_function_c.sql
|
SELECT *
FROM
JSON_TABLE(
'[{"a":"3"},{"a":2},{"b":1},{"a":0},{"a":[1,2]}]',
'$[*]'
COLUMNS(
rowid FOR ORDINALITY,
ac VARCHAR(100) PATH '$.a' DEFAULT '999' ON ERROR DEFAULT '111' ON EMPTY,
aj JSON PATH '$.a' DEFAULT '{"x": 333}' ON EMPTY,... |
insert into hotel (id, name) values (1, 'Orion');
insert into hotel (id, name) values (2, 'Taj');
insert into department (id, name, hotel_id) values (1, 'Food', 1);
insert into department (id, name, hotel_id) values (2, 'Travel', 1);
insert into department (id, name, hotel_id) values (3, 'Hospitality', 1)
insert into ... |
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for exam_answer
-- ----------------------------
DROP TABLE IF EXISTS `exam_answer`;
CREATE TABLE `exam_answer` (
`id` bigint(20) NOT NULL COMMENT '主键',
`exam_record_id` bigint(20) NOT NULL COMMENT '考试记录id',
`subje... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 06 Apr 2020 pada 10.57
-- Versi server: 10.1.37-MariaDB
-- Versi PHP: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
DROP PROCEDURE IF EXISTS clean;
DELIMITER ;;
CREATE DEFINER=web@localhost PROCEDURE clean()
COMMENT 'clean tables'
BEGIN
DECLARE $cnt_user INT DEFAULT NULL;
DECLARE $cnt_node INT DEFAULT NULL;
DECLARE $cnt_comment INT DEFAULT NULL;
DROP TEMPORARY TABLE IF EXISTS users_t, nodes_t, comments_t;
C... |
/*
Generate the following two result sets:
Query an alphabetically ordered list of all names in OCCUPATIONS, immediately followed by the first letter of each profession as a parenthetical (i.e.: enclosed in parentheses). For example: AnActorName(A), ADoctorName(D), AProfessorName(P), and ASingerName(S).
Query... |
--* return row
SELECT
$1::int AS "number",
$2::text AS str
|
-- boundary1.test
--
-- db eval {
-- SELECT a FROM t1 WHERE rowid >= 32768 ORDER BY rowid
-- }
SELECT a FROM t1 WHERE rowid >= 32768 ORDER BY rowid |
--TEST: test with reuse_oid tables
drop table if exists p_disc_collection;
create table p_disc_collection(
col1 set(int),
col2 multiset(smallint),
col3 list(timestamp),
col4 sequence(datetime),
num smallint
);
insert into p_disc_collection values({1, 2, 3}, {1, 1, 3}, {'1990-1... |
--Undercover Catalogue
--David Fowler
--Version 0.4.2 - 06 February 2020
--Module: TraceFlags
--Script: Get
CREATE TABLE #TraceFlags
(
TraceFlag INT,
Status BIT,
Global BIT,
Session BIT
)
INSERT INTO #TraceFlags
EXEC sp_executesql N'DBCC tracestatus'
SELECT @@SERVERNAME AS ServerName, TraceFlag
FROM #TraceFlags |
use mydb;
GO
IF (NOT EXISTS (SELECT *
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'dbo'
AND TABLE_NAME = 'Persons'))
BEGIN
CREATE TABLE Persons (
PersonID int,
LastName varchar(255),
FirstName varchar(255),
Address varcha... |
SELECT COUNT(*) FROM ictrp.ictrp_full_weekly_data;
-- \COPY ictrp."ictrp_weekly_data" FROM 'ICTRPWeek31January2022.csv' DELIMITER ',' CSV QUOTE AS '"' HEADER;
-- \COPY ictrp."ictrp_full_weekly_data" FROM 'ICTRPWeek31January2022.csv' DELIMITER ',' CSV QUOTE AS '"' HEADER;
-- SELECT COUNT(*) FROM ictrp.ictrp_full_we... |
UPDATE herramientas.categoria_revendedora SET descripcion = 'CATEGORIA_TEST01' WHERE id = 1;
UPDATE herramientas.categoria_revendedora SET descripcion = 'CATEGORIA_TEST02' WHERE id = 2;
UPDATE herramientas.categoria_revendedora SET descripcion = 'CATEGORIA_TEST03' WHERE id = 3;
UPDATE herramientas.categoria_revendedora... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 17, 2022 at 04:05 PM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 7.4.27
SET FOREIGN_KEY_CHECKS=0;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 S... |
=# CREATE INDEX btreeidx ON tbloom (i1, i2, i3, i4, i5, i6);
CREATE INDEX
=# SELECT pg_size_pretty(pg_relation_size('btreeidx'));
pg_size_pretty
----------------
3976 kB
(1 row)
=# EXPLAIN ANALYZE SELECT * FROM tbloom WHERE i2 = 898732 AND i5 = 123451;
QUERY PLAN ... |
-- @testpoint:openGauss关键字Least(非保留),作为列名不带双引号,Least大小写混合,建表成功
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),
c_char cha... |
-- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: localhost Database: spo
-- ------------------------------------------------------
-- Server version 5.7.31
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4010... |
CREATE DATABASE sqlalchemy;
|
# Table
## 1. Users
CREATE TABLE Users
(
user_id varchar(300),
user_name varchar(255)
);
INSERT INTO Users ( user_id , user_name )
VALUES
('6', 'Alice'),
('2', 'Bob'),
('7', 'Alex');
## 2. Register
CREATE TABLE Register
(
contest_id varchar(300),
user_id varchar(255)
);
INSERT I... |
CREATE KEYSPACE CustomerProfileKeySpace
WITH REPLICATION = {
'class' : 'SimpleStrategy',
'replication_factor' : 2
}
AND DURABLE_WRITES = true;
USE CustomerProfileKeySpace;
CREATE TABLE CustomerProfile (
PartyId text,
PartyNumber text,
PartyType text,
Name text,
FullLegalName text,
LegalStru... |
COMMENT ON COLUMN "public"."users"."email_primary" IS E'null'
alter table "public"."users" rename column "emailPrimary" to "email_primary"; |
/**
* 初始化所有数据表
*/ |
CREATE TABLE subdivision_CH (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision_CH" ("id", "name", "level") VALUES (E'CH-AG', E'Ааргау', E'canton');
INSERT INTO "subdivision_CH" ("id", "name", "level") VALUES (E'CH-AR', E'Аппенцелль — Ауссерроден', E'canto... |
SELECT ' UInt32 | UInt64 ';
DROP TABLE IF EXISTS test.u32;
DROP TABLE IF EXISTS test.u64;
DROP TABLE IF EXISTS test.merge_32_64;
CREATE TABLE test.u32 (x UInt32, y UInt32 DEFAULT x) ENGINE = Memory;
CREATE TABLE test.u64 (x UInt64, y UInt64 DEFAULT x) ENGINE = Memory;
CREATE TABLE test.merge_32_64 (x UInt64) ENGINE =... |
-- id_cheme = 3
drop table if exists streets;
create table streets(
`id` int auto_increment primary key not null,
`old_name` varchar(2048) not null,
`new_name` varchar(2048) not null,
`description` varchar(2048) not null,
`direction` int not null,
`start_lat` float not null,
`start_long` f... |
CREATE TABLE "KODELISTE" (
"ID" NUMBER(19,0),
"KODEVERK" VARCHAR2(100 CHAR),
"KODE" VARCHAR2(100 CHAR),
"OFFISIELL_KODE" VARCHAR2(1000 CHAR),
"NAVN" VARCHAR2(256 CHAR),
"BESKRIVELSE" VARCHAR2(4000 CHAR),
"SPRAK" VARCHAR2(3 CHAR) DEFAULT 'NB',
"GYLDIG_FOM" DATE DEFAULT sysdate,
"GYLDI... |
IF OBJECT_ID('@results_schema.cohort_inclusion', 'U') IS NULL
CREATE TABLE @results_schema.cohort_inclusion(
generation_id int NOT NULL,
rule_sequence int NOT NULL,
name varchar(255) NULL,
description varchar(1000) NULL
);
|
#standardSQL
# 17_23: Percentage of responses with pre-check directive
SELECT
_TABLE_SUFFIX AS client,
_cdn_provider AS cdn,
COUNTIF(LOWER(resp_cache_control) LIKE '%pre-check%') AS freq,
COUNT(0) AS total,
ROUND(COUNTIF(LOWER(resp_cache_control) LIKE '%pre-check%') * 100 / COUNT(0), 2) AS pct
FROM
`httparc... |
/* Addresses for Users (20) */
INSERT INTO `address` (street_number, street_name, city, region, country, postcode) VALUES ('109', 'Blue Street', 'Upper Hutt', 'Wellington', 'New Zealand', '5018');
INSERT INTO `address` (street_number, street_name, city, region, country, postcode) VALUES ('333', 'Ilam Road', 'Christchur... |
CREATE TABLE {{ identifier .Parameters.tableName }} ( "id" UUID NOT NULL, PRIMARY KEY ("id"));
|
-- @testpoint:opengauss关键字minute(非保留),作为外部数据源名
--关键字不带引号-成功
drop data source if exists minute;
create data source minute;
drop data source minute;
--关键字带双引号-成功
drop data source if exists "minute";
create data source "minute";
drop data source "minute";
--关键字带单引号-合理报错
drop data source if exists 'minute';
create data... |
-- 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';
CREATE TABLE IF NOT EXISTS `topMenu` (
`id` INT NOT NULL AUTO_INCREMENT,
... |
CREATE FUNCTION udf_GetPromotedProducts(@CurrentDate DATETIME,@StartDate DATETIME,@EndDate DATETIME,@Discount DECIMAL(10,2)
,@FirstItemId INT,@SecondItemId INT,@ThirdItemId INT)
RETURNS VARCHAR(MAX)
BEGIN
DECLARE @Result VARCHAR(MAX)
DECLARE @FirstItemPrice decimal(10,2) = (SELECT Price FROM Items WHERE Id = @FirstI... |
DROP TABLE IF EXISTS t_tbs_exemples;
CREATE TABLE t_tbs_exemples (
res_id int(11) NOT NULL auto_increment,
res_name varchar(50) NOT NULL default '',
res_score int(11) NOT NULL default '0',
res_date datetime NOT NULL default '0000-00-00 00:00:00',
res_team varchar(20) NOT NULL default '',
PRIMARY KEY ... |
-- AlterTable
ALTER TABLE "Certificate" ADD COLUMN "beneficiary" TEXT,
ADD COLUMN "redemptionDate" TIMESTAMP(3);
|
ALTER TABLE dbo.Building
ADD
CONSTRAINT FK_BUILDING_FACULTY FOREIGN KEY (IDbuilding) REFERENCES dbo.Faculty (IDbuilding) ON DELETE CASCADE;
ALTER TABLE dbo.Stages
ADD
CONSTRAINT FK_STAGES_BUILDING FOREIGN KEY(IDbuilding) REFERENCES dbo.Building (IDbuilding) ON DELETE CASCADE;
ALTER TABLE dbo.Room
ADD
CO... |
IF NOT EXISTS (SELECT * FROM sys.columns
WHERE object_id = OBJECT_ID(N'[dbo].[uCommerce_ProductCatalog]')
AND name = 'DefinitionId'
)
BEGIN
ALTER TABLE uCommerce_ProductCatalog
ADD DefinitionId INT,
FOREIGN KEY(DefinitionId) REFERENCES uCommerce_Definition(DefinitionId);
END |
-- CreateTable
CREATE TABLE "User" (
"id" TEXT NOT NULL,
"avatar" TEXT,
"name" TEXT NOT NULL,
"email" TEXT NOT NULL,
"password" TEXT NOT NULL,
"last_login_at" TIMESTAMP(3) NOT NULL,
CONSTRAINT "User_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "User_email_key" ON "User"("... |
# todo create an index on movie ids and another one on movies.title
CREATE INDEX movie_ids ON movies (id);
CREATE INDEX movie_titles ON movies (title);
SELECT * FROM movies WHERE title = 'Finding Nemo';
CREATE INDEX movie_ids_titles ON movies (title, id);
SHOW ENGINES;
# Pros: SELECT is much faster
# Cons: INSER... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 11, 2021 at 04:40 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
INSERT INTO `user` (`id`, `username`, `... |
#|No especifica características especiales de formato
e|Manuscrito
j|Tarjeta postal
k|Calendario
l|Rompecabezas
n|Juego
o|Mapa mural
p|Juego de naipes
r|Hojas sueltas
z|Otro
|No se provee información |
/*
Navicat MySQL Data Transfer
Source Server : MySQL55
Source Server Version : 50523
Source Host : localhost:3399
Source Database : yii2-brainbase
Target Server Type : MYSQL
Target Server Version : 50523
File Encoding : 65001
Date: 2017-03-12 19:45:36
*/
SET FOREIGN_KEY_CHECKS=0;
... |
-- MySQL dump 9.11
--
-- Host: localhost Database: userstamp_test
-- ------------------------------------------------------
-- Server version 4.0.24
--
-- Table structure for table `entries`
--
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id int(11) NOT NULL auto_increment,
name varchar(255),
... |
-- reservations
SELECT room_id, date_in, date_out, client_id
FROM reservations
WHERE
NOT (
date_out < '2017-01-06' OR
date_in > '2017-01-07'
)
and room_id = 3 |
-- preSHA1sum: 5f22e538285f79ec558e16dbfeb0b34a36e4da19
-- postSHA1sum: 6620c14bb4aaafdcf142022b5cef7f74ee7c7383
create table yat (
yet_another_column text
);
|
create table DDCSD_SCRIPT_CATEGORY (
ID varchar(36) not null,
VERSION integer not null,
CREATE_TS timestamp,
CREATED_BY varchar(50),
UPDATE_TS timestamp,
UPDATED_BY varchar(50),
DELETE_TS timestamp,
DELETED_BY varchar(50),
--
NAME varchar(255) not null,
CODE varchar(255) not ... |
-------------------------------------------------------------------------------
-- Convert 2D to 3D using a DEM
-------------------------------------------------------------------------------
DROP TYPE IF EXISTS elevation_infos CASCADE;
CREATE TYPE elevation_infos AS (
draped geometry,
slope float,
min_ele... |
/*
Navicat MySQL Data Transfer
Source Server : zltgov
Source Server Version : 50717
Source Host : localhost:3306
Source Database : zltgov
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2018-01-23 15:54:30
*/
SET FOREIGN_KEY_CHECKS=0;
-- -----... |
-------------------------------------------------------------------------------
-- store info
-------------------------------------------------------------------------------
CREATE TABLE STORE_INFO(
ID BIGINT NOT NULL,
NAME VARCHAR(200),
MODEL VARCHAR(50),
PATH VARCHAR(200),
TYPE VARCHAR(50),
SIZ... |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 27, 2018 at 02:14 PM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
select D.Name as Department, E.Name as Employee, E.Salary as Salary
from Department D, Employee E
where (select(count(distinct(salary))) from Employee
where DepartmentId = E.DepartmentId and Salary > E.Salary) < 3
and E.DepartmentId = D.Id
order by E.DepartmentId, E.Salary desc; |
DROP TABLE IF EXISTS characters;
CREATE TABLE characters (
id SERIAL PRIMARY KEY,
name VARCHAR(255),
img VARCHAR(511),
level VARCHAR(255)
); |
SELECT t1.name, count(*)
FROM
site as s,
so_user as u1,
question as q1,
answer as a1,
tag as t1,
tag_question as tq1
WHERE
q1.owner_user_id = u1.id
AND a1.question_id = q1.id
AND a1.owner_user_id = u1.id
AND s.site_id = q1.site_id
AND s.site_id = a1.site_id
AND s.site_id = u1.site_id
AND s.site_id = tq1.site_id
AND s.s... |
-- wherelimit.test
--
-- execsql {UPDATE t1 SET y=4 WHERE x=5 ORDER BY x LIMIT 2, 5}
UPDATE t1 SET y=4 WHERE x=5 ORDER BY x LIMIT 2, 5 |
-- file:join.sql ln:457 expect:true
CREATE TEMP TABLE t1 (a int, b int)
|
-- Copyright 2020 the Exposure Notification Server 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
--
-- Unless required by a... |
CREATE DATABASE `jonah_johansen`;
USE `jonah_johansen`;
CREATE TABLE `stylists` (`StylistId` int NOT NULL AUTO_INCREMENT,`Name` varchar(255) NOT NULL,`StartDate` varchar(255) NOT NULL,`CustomerCount` int NOT NULL DEFAULT '0',`Notes` text,PRIMARY KEY (`StylistId`));
CREATE TABLE `clients` (`ClientId` int NOT NULL AUTO_I... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 05, 2019 at 08:22 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.