text stringlengths 1 1.05M |
|---|
CREATE TABLE `ipv6` (
`ip_from` varchar(42) NOT NULL DEFAULT '0',
`ip_to` varchar(42) NOT NULL,
`country` varchar(32) COLLATE utf8_bin NOT NULL,
`region` varchar(128) COLLATE utf8_bin NOT NULL,
`city` varchar(128) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`ip_from`,`ip_to`)
) ENGINE=InnoDB DEFAULT CHARSET=utf... |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 20-Dez-2017 às 20:39
-- Versão do servidor: 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 */... |
--结果展开
drop table if exists online_test_multi_prob_normal;
create table online_test_multi_prob_normal as select a.row_id,b.shop_id,a.prob
from
(select prob_pivot(row_id,mall_id,prediction_detail) as (row_id,mall_id,shop_code,prob)
from online_test_prob_union_all) a
left outer join shop_code b on a.mall_id=b.ma... |
--
-- Create tables for a Jinaga database
--
-- Before executing, be sure you have created the database and the dev role.
--
-- CREATE DATABASE myapplication;
-- \connect myapplication
--
-- CREATE USER dev WITH
-- LOGIN
-- ENCRYPTED PASSWORD 'devpassword'
-- NOSUPERUSER
-- INHERIT
-- NOCREATEDB
-- NOCREATE... |
ALTER TABLE Repo DROP CONSTRAINT Repo_pkey;
--
-- Name: repo_id_seq; Type: SEQUENCE; Schema: public; Owner: seafile
--
CREATE SEQUENCE public.repo_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.repo_id_seq OWNER TO seafile;
ALTER TABLE Repo ADD COLUMN id ... |
CREATE EXTENSION pg_visibility;
--
-- recently-dropped table
--
\set VERBOSITY sqlstate
BEGIN;
CREATE TABLE droppedtest (c int);
SELECT 'droppedtest'::regclass::oid AS oid \gset
SAVEPOINT q; DROP TABLE droppedtest; RELEASE q;
SAVEPOINT q; SELECT * FROM pg_visibility_map(:oid); ROLLBACK TO q;
-- ERROR: could not open ... |
start transaction;
select 'sql 1: sleep 1 second';
select SLEEP(1);
update t_test_committed set id = id + 1;
select 'sql 1: sleep 5 seconds after 0 -> 1 ...';
select SLEEP(5);
select 'sql 1', t.* from t_test_committed t;
select 'sql 1: commit';
commit;
|
select name, id, type, region, resource_group, subscription_id
from azure.azure_application_gateway
where id = '{{ output.resource_id.value }}';
|
-- Disable referential integrity
EXEC sp_MSForEachTable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'
GO
EXEC sp_MSForEachTable 'DELETE FROM ?'
GO
EXEC sp_MSForEachTable 'DBCC CHECKIDENT(''?'', RESEED, 0)'
GO
-- Enable referential integrity
EXEC sp_MSForEachTable 'ALTER TABLE ? WITH CHECK CHECK CONSTRAINT ALL'
GO
-- Tabl... |
DELIMITER $$
CREATE PROCEDURE usp_get_employees_by_salary_level(level_of_salary VARCHAR(20))
BEGIN
SELECT
e.first_name,
e.last_name
FROM employees AS e
WHERE ufn_get_salary_level(e.salary) = level_of_salary
ORDER BY
e.first_name DESC,
e.last_name DESC;
END $$
DELIMITER ;
CALL usp_get_employees_by_salary_l... |
CREATE TABLE Version (
Version INT NOT NULL
);
CREATE UNIQUE INDEX ON Version (Version);
-- Create Factions Table
CREATE TABLE Factions (
Id INT AUTO_INCREMENT NOT NULL,
Name VARCHAR(200) UNIQUE NOT NULL,
Tag VARCHAR(10) NOT NULL,
Tag... |
DECLARE @district_number varchar(6),
@excluded_campuses TABLE(entityid char(3)),
@attendance TABLE(id int, EnrollDate date, CampusID varchar(9), SchoolName varchar(512), Enrollment int, Absent int),
SET @district_nubmer = '';
--INSERT INTO @excluded_campuses(entityid)
--VALUES (0);
-- Pull Enrollment directly f... |
/**
* História: PRDINT-1150
* Base: gerenciadora e gerenciadora2
*
* Altera a view do relatório "de veículos" para suporte à nova versão com tradução
*
**/
------------------------------------------------------------------------
--- VIEW GERENCIADORA
--------------------------------------------------------... |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 11, 2019 at 09:02 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- TAB-3705
alter table MONITORINGPOINTSET add (
migratedto NVARCHAR2(255)
); |
CREATE OR REPLACE FUNCTION zerobyte.ZEROBYTE_TO_ARRAY_BYTES(a ARRAY< STRUCT< _ ARRAY< STRUCT< _ ARRAY<
STRUCT< STRUCT< INT64 > > > > > > >)
AS (
ARRAY(
SELECT
zerobyte.ZEROBYTE_TO_BYTES(_)
FROM
UNNEST(a) WITH OFFSET AS o
ORDER BY o)
);
|
-- Copyright 2020 The Nomulus Authors. All Rights Reserved.
--
-- 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... |
library NCQA_Status version '1.0.0'
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1' called FHIRHelpers
include NCQA_Terminology version '1.0.0' called Terminology
context Patient
// Condition
define function "Active Condition"(Condition List<FHIR.Condition>):
Condition C
where C.clinicalStatus... |
CREATE TABLE cv (
id2 int not null,
id varchar(255) not null,
name int not null,
PRIMARY KEY(id2)
);
|
CREATE OR REPLACE VIEW business_intelligence.total_daily_tickets AS SELECT operatorName, nocCode, COUNT(*) AS dailyTotal FROM business_intelligence.matching_data CROSS JOIN UNNEST(products) AS t(i) WHERE i.productduration = '1 day' GROUP BY operatorName, nocCode;
CREATE OR REPLACE VIEW business_intelligence.total_weekl... |
drop table reports cascade;
drop table reported_ips cascade;
drop function add_report(var_ip inet, var_reporter inet, var_comment text);
drop function update_ips_table();
create table reported_ips (
id bigserial primary key,
ip inet unique,
reports_count int4 default 0,
last_reported timestamp with time zone d... |
-- Storage of daily min/max stage akrherz/iem#278
ALTER TABLE summary ADD min_rstage real;
ALTER TABLE summary ADD max_rstage real;
|
SELECT
/*%expand*/*
FROM
role_permissions
WHERE
deleted_at IS NULL
/*%if criteria.roleKey != null */
AND role_key = /* criteria.roleKey */'user.editUser'
/*%end*/
LIMIT
1
|
/*
* SimpleLoop.sql
* Chapter 4, Oracle10g PL/SQL Programming
* by Ron Hardman, Mike McLaughlin, Scott Urman
*
* This script shows how simple loops are written
*/
exec clean_schema.trigs
exec clean_schema.procs
exec clean_schema.tables
exec clean_schema.ind
set feedback on escape ~
CREATE TABLE authors (
id ... |
# Count the number of variants across the entirety of 1,000 Genomes by variant type.
SELECT
vt,
COUNT(vt) as cnt,
FROM
[google.com:biggene:1000genomes.variants1kG]
GROUP BY
vt
ORDER BY
vt;
|
-- Locks:
with
det as
(
SELECT
s. inst_id, s.sid, s.serial#,
s.osuser, s.username, s.machine, s.program,
o.owner ||'.'|| o.object_name locked_object,
Decode(lo.locked_mode, 0,'None', 1,'Null', 2,'Row-S', 3,'Row-X', 4,'Share', 5,'S/Row-X', 6,'Exclusive') as lock_mode
FROM gv$locked_ob... |
CREATE TABLE countries (
id integer,
country text,
country_code text
);
CREATE TABLE vulnerabilities (
id integer,
vulnerability text
);
CREATE TABLE languages (
id integer,
en_name text,
es_name text,
fr_name text,
native_name text,
speakers int,
lat decimal(7,4),
long decimal(7,4),
vulne... |
UPDATE utbetaling
SET neste_paminnelsetidspunkt=now()
WHERE id IN (
'8488337c-b788-4947-b0c7-e37e07672b4f',
'0fc83ea1-7ab2-406b-8b9c-cc0379951406',
'ee7fac11-12df-4599-94e4-dd10eb7fb928'
); |
/*
Post-Deployment Script Template
--------------------------------------------------------------------------------------
This file contains SQL statements that will be appended to the build script.
Use SQLCMD syntax to include a file in the post-deployment script.
Example: :r .\myfile.sql
... |
if exists (select * from INFORMATION_SCHEMA.VIEWS where TABLE_NAME = 'vwACL_ACCESS_ByAccess')
Drop View dbo.vwACL_ACCESS_ByAccess;
GO
/**********************************************************************************************************************
* Copyright (C) 2005-2022 SplendidCRM Software, Inc.
... |
/* ======================食材模块====================== */
/* 1.食材季节 */
USE tegin_hp;
DELETE FROM hp_foods_season;
INSERT INTO hp_foods_season VALUES(DEFAULT,'春季'),(DEFAULT,'夏季'),(DEFAULT,'秋季'),(DEFAULT,'冬季');
/* 2.食材类型
蔬菜类
水果/干果
禽畜/肉类
水产/海鲜
米面豆乳
药食/药材
蛋奶/其它
调味品*/
USE tegin_hp;
DELETE FROM hp_foods_type;
INSERT INTO hp_f... |
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 23, 2018 at 08:02 AM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
insert into enabled_court (id, name) values
( 'CANTCC', 'Canterbury Crown'), -- {"id":"CANTCC","name":"Canterbury Crown Court"}
( 'CANTCT', 'Canterbury County'), -- {"id":"CANTCT","name":"Canterbury County Court"}
( 'CANTMC', 'Canterbury Magistrates'), -- {"id":"CANTMC... |
CREATE FUNCTION pg_list_orphaned(
older_than interval default null,
OUT dbname text,
OUT path text,
OUT name text,
OUT size bigint,
OUT mod_time timestamptz,
OUT relfilenode bigint,
OUT reloid bigint,
OUT older bool)
RETURNS SETOF RECORD
AS 'MODULE_PATHNAME','pg_list_orphaned'
LANGUAGE C VOLATILE;
CREATE FUNC... |
\set ON_ERROR_STOP
\set ECHO all
BEGIN;
\set ECHO all
CREATE SEQUENCE "mon"."group_id_seq" INCREMENT BY 1 MINVALUE 1 START WITH 1 OWNED BY "mon"."Group"."ID";
CREATE SEQUENCE "mon"."groupinstance_id_seq" INCREMENT BY 1 MINVALUE 1 START WITH 1 OWNED BY "mon"."GroupInstance"."ID";
CREATE SEQUENCE "mon"."hourstat_id_seq" ... |
INSERT INTO tweb_apbd(`rangkuman`,`berkas_id`,`lembaga_id`, `lembaga_kode`,`pemda_kode`, `wilayah_kode`,`tahun`, `rekening_kode`,`rekening`, `uraian`, `nominal`,`nominal_sebelum`, `nominal_sesudah`, `nominal_perubahan`, `nominal_persen`, `keterangan`, `created_by`, `updated_by`) VALUES
('0','424','204','1.19.04.00','1... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 29, 2020 at 08:45 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
SELECT 'foobar';
|
USE tempdb;
go
SELECT OBJECT_NAME(object_id), * FROM sys.dm_db_xtp_object_stats;
go |
CREATE TABLE [employer_financial].[PaymentMetaData]
(
[Id] BIGINT IDENTITY(1,1) NOT NULL PRIMARY KEY,
[ProviderName] VARCHAR(MAX) NULL,
[StandardCode] BIGINT NULL,
[FrameworkCode] INT NULL,
[ProgrammeType] INT NULL,
[PathwayCode] INT NULL,
[PathwayName] VARCHAR(MAX) NULL,
[Apprenticeshi... |
-- @testpoint: openGauss保留关键字or作为触发器名,部分测试点合理报错
--前提条件
--创建源表
drop table if exists test_trigger_src_tbl;
CREATE TABLE test_trigger_src_tbl(id1 INT, id2 INT, id3 INT);
--创建触发表
drop table if exists test_trigger_des_tbl;
CREATE TABLE test_trigger_des_tbl(id1 INT, id2 INT, id3 INT);
--创建触发器函数
CREATE OR REPLACE FUNCTION ... |
-- DDL and data
CREATE EXTENSION pgcrypto;
-- Do this manually
CREATE TABLE keys (
keyid varchar(16) PRIMARY KEY,
pub bytea,
priv bytea
);
-- dbtest=> \lo_import '/home/emanuel/dummyKeys/public.key' pubk
-- lo_import 16438
-- dbtest=> \lo_import '/home/emanuel/dummyKeys/private.key' privk
-- lo_import 16439... |
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_AUTH_SESSION_RECORDS_STORE]') AND TYPE IN (N'U'))
CREATE TABLE IDN_AUTH_SESSION_RECORDS_STORE (
SESSION_ID VARCHAR (100) NOT NULL,
SESSION_TYPE VARCHAR(100) NOT NULL,
SESSION_OBJECT VARBINARY(MAX),
TIME_CREATED BIGINT,
TENANT_I... |
IF Object_ID('news_articles_cnbc') IS NULL
CREATE TABLE [stock-financials].[dbo].[news_articles_cnbc]
(
[news_id] NVARCHAR(60) NOT NULL,
[news_source] NVARCHAR(60) NOT NULL,
[link] NVARCHAR(MAX) NULL,
[guid] NVARCHAR(MAX) NULL,
[type] NVARCHAR(MAX) NULL,
[article_id] NVARCHAR(MAX) NULL,
[s... |
#
# Table structure for table 'radippool'
#
CREATE TABLE IF NOT EXISTS radippool (
id int(11) unsigned NOT NULL auto_increment,
pool_name varchar(30) NOT NULL,
framedipaddress varchar(15) NOT NULL default '',
nasipaddress varchar(15) NOT NULL default '',
calledsta... |
ALTER TABLE terraria_instance_event RENAME COLUMN "text" TO "content";
ALTER TABLE terraria_instance_event ALTER COLUMN "content" TYPE varchar USING "content"::varchar;
UPDATE terraria_instance_event SET "content" = convert_from(loread(lo_open("content" :: oid, 262144), 1048576), 'UTF8');
|
CREATE TABLE test_table (col integer NOT NULL);
INSERT INTO test_table (col) VALUES (25);
|
-- +micrate Up
-- SQL in section 'Up' is executed when this migration is applied
CREATE TABLE users(
id BIGSERIAL PRIMARY KEY,
gitlab_id BIGINT,
name VARCHAR NOT NULL,
email VARCHAR NOT NULL,
avatar_url VARCHAR ,
created_at TIMESTAMP,
updated_at TIMESTAMP
);
-- +micrate Down
-- SQL section 'Down' is exec... |
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0//
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0//
DROP DATABASE IF EXISTS `spring_persistence`
//
CREATE DATABASE `spring_persistence` /*!40100 COLLATE 'utf8_bin' */
//
USE `spring_persistence`//
CREATE TABLE `email` (
`id` BIGINT(... |
library Retrieve
using FHIR version '4.0.0'
include FHIRHelpers version '4.0.0'
codesystem SampleMaterialType: 'https://fhir.bbmri.de/CodeSystem/SampleMaterialType'
context Specimen
define InInitialPopulation:
true
define TypeCodes:
from Specimen.type.coding C return FHIRHelpers.ToCode(C)
define SampleMaterial... |
--- Displays which users have been mentioned the most
--- Invalid mentions are ignored
SELECT
mentions.user_id,
users.name,
mentions.count AS mentions
FROM (
SELECT
mentioned_id AS user_id,
COUNT(mentioned_id)
FROM mentions
WHERE guild_id = 181866934353133570 -- Programming
... |
fn fp global_sd-cTiterSub global_sd-ep_x global_sd-lbi global_sd-ne_star global_sd-null last_training_timepoint n_samples parameter-cTiterSub parameter-ep_x parameter-lbi parameter-ne_star parameter-null predictors sae sample sse test_timepoint testing_accuracy testing_correlation tn tp training_accuracy training_corre... |
CREATE TABLE IF NOT EXISTS crypto_currencies (
symbol VARCHAR PRIMARY KEY,
name VARCHAR,
slug VARCHAR
);
INSERT INTO crypto_currencies (symbol, name, slug)
VALUES ('BTC', 'Bitcoin', 'bitcoin'); |
-- randexpr1.test
--
-- db eval {SELECT case when t1.e not between (select +max(17) from t1)*t1.f and d then t1.c+case when e+f<=coalesce((select max((19)) from t1 where t1.e not in ((abs( -17-17)/abs(t1.e)),(c),(t1.b))),d) and 13 in (select d from t1 union select c from t1) then 19 else c end-19 when exists(select 1 ... |
create or replace package body test_output_buffer is
procedure test_recieve is
l_result varchar2(4000);
l_remaining integer;
l_expected varchar2(4000);
l_reporter ut3.ut_reporter_base :=ut3. ut_documentation_reporter();
begin
--Act
l_expected := lpad('a text',4000,',a text');
ut3.ut_out... |
DROP TABLE IF EXISTS `event`;
CREATE TABLE `event` (
`id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`name` VARCHAR(150),
`slug` VARCHAR(150),
`cover` VARCHAR(150),
`content` TEXT,
`address` TEXT,
`location` VARCHAR(250),
`date` DATETIME,
`seo_schema` VARCHAR(25),
`seo_titl... |
with base as (
select *
from {{ ref('stg_quickbooks__item_tmp') }}
),
fields as (
select
/*
The below macro is used to generate the correct SQL for package staging models. It takes a list of columns
that are expected/needed (staging_columns from dbt_quickbooks_source/models/tmp... |
-- file:numeric.sql ln:260 expect:true
INSERT INTO num_exp_add VALUES (5,9,'-24910407.006556420')
|
DROP TABLE IF EXISTS regions;
DROP TABLE IF EXISTS staging_regions;
----- CREATE TEMPORARY STAGING TABLE TO LOAD CSV FORMATTED DATA -----
CREATE EXTERNAL TABLE staging_regions
USING com.databricks.spark.csv OPTIONS(path ':dataLocation/regions.csv', header 'true', inferSchema 'true', nullValue 'NULL', maxCharsPerCol... |
delimiter //
DROP trigger IF EXISTS save_employee_to_journal_after_insert; //
create trigger save_employee_to_journal_after_insert
before insert
on employee for each row
begin
INSERT INTO journal (id, full_name, age, sex, degree, seniority) VALUES(new.id, new.full_name, new.age, new.sex, new.degree, new.seniority);
... |
-- MySQL dump 10.13 Distrib 5.7.12, for osx10.9 (x86_64)
--
-- Host: localhost Database: sys
-- ------------------------------------------------------
-- Server version 5.7.16
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 17, 2022 at 02:12 PM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 8.0.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
/****** Object: StoredProcedure [dbo].[UpdateChargeCodesFromWarehouse] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE Procedure UpdateChargeCodesFromWarehouse
/****************************************************
**
** Desc:
** Updates charge code (aka work package) information in T_Charg... |
/*
Name: Problem 2621
Copyright: 2019 Augusto Machado Ramos
Author: Augusto Machado Ramos
Date: 07/30/2019
Comment language: en
Description:
When it comes to delivering the report on how many products the company has in stock,
a part of the report has become corrupted, so the stock keeper asked for help, he... |
USE SQLInformationStore
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF OBJECT_ID(N'AES.InfoQuery', N'U') IS NOT NULL
BEGIN
DROP TABLE AES.InfoQueryVersion
DROP TABLE AES.InfoQuery
DROP SCHEMA AES
END
EXEC ('CREATE SCHEMA AES AUTHORIZATION dbo')
CREATE TABLE AES.InfoQuery(
QueryId ... |
create database webapp;
create table newsletter (id serial, email varchar(250), created_at timestamp without time zone, updated_at timestamp without time zone);
create table category (id serial, name varchar(250), description text, created_at timestamp without time zone, updated_at timestamp without time zone);
inse... |
--
-- AGGREGATES
--
SELECT avg(four) AS avg_1 FROM onek;
SELECT avg(a) AS avg_32 FROM aggtest WHERE a < 100;
-- In 7.1, avg(float4) is computed using float8 arithmetic.
-- Round the result to 3 digits to avoid platform-specific results.
SELECT avg(b)::numeric(10,3) AS avg_107_943 FROM aggtest;
SELECT avg(gpa) AS a... |
-- main copy in metrics, also a copy in metricsRuncheck project (for testing purposes)
-- DROP TABLE IF EXISTS APPLICATIONS;
-- DROP TABLE IF EXISTS EVENTMAPPING;
-- DROP TABLE IF EXISTS GRAPHMAPPING ;
-- DROP TABLE IF EXISTS METRICSLA;
-- DROP TABLE IF EXISTS RUNS;
-- DROP TABLE IF EXISTS SLA;
-- DROP TABLE IF ... |
CREATE TABLE `addresses` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(45) NOT NULL,
`street` VARCHAR(45) NOT NULL,
`city` VARCHAR(45) NOT NULL,
`postcode` VARCHAR(45) NOT NULL,
`country` VARCHAR(45) NOT NULL,
`user_id` INT(11) NOT NULL,
PRIMARY KEY (`id`)); |
CREATE SEQUENCE SUBAWARD_CONTACT_ID_S
MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE
/
COMMIT
/
|
-- #df:checkEnv(diffworld)#
alter table MEMBER alter column MEMBER_ACCOUNT VARCHAR(80) NOT NULL
;
drop table MEMBER_LOGIN;
create table MEMBER_LOGIN(
MEMBER_LOGIN_ID BIGINT IDENTITY NOT NULL PRIMARY KEY,
MOBILE_LOGIN_FLG INTEGER NOT NULL,
MEMBER_ID INTEGER NOT NULL,
LOGIN_DATETIME DATETIME N... |
-- MySQL dump 10.13 Distrib 8.0.27, for Linux (x86_64)
--
-- Host: 127.0.0.1 Database: db_controller
-- ------------------------------------------------------
-- Server version 5.5.5-10.5.10-MariaDB-1:10.5.10+maria~focal
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_... |
select address.c address.h address.o build_support.c build_support.h build_support.o calendar.dst checksum checksum.c checksum.o checksum.vcproj cities.dst column_list.txt columns.h config.h constants.h Cygwin Tools.rules date.c date.h date.o dbgen2.sln dbgen2.vcproj dbgen_version.c dbgen_version.h dbgen_version.o dcgr... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 18, 2018 at 03:48 PM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 29, 2020 at 04:03 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.0.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
ALTER TABLE APP_ROLE
ADD CONSTRAINT uk_app_role_name_tenant UNIQUE (TENANT_ID, NAME);
ALTER TABLE APP_PRIVILEGE
ADD CONSTRAINT uk_app_privilege_name_tenant UNIQUE (TENANT_ID, NAME); |
EXEC [EST].[Proc_yjbb_Ins] @Code = N'601901',@CutoffDate = N'2017-09-30',@EPS = N'0.16',@EPSDeduct = N'0.16',@Revenue = N'47.03亿',@RevenueYoy = N'-24.59',@RevenueQoq = N'5.56',@Profit = N'13.31亿',@ProfitYoy = N'-50.07',@ProfiltQoq = N'20.76',@NAVPerUnit = N'4.5175',@ROE = N'3.66',@CashPerUnit = N'0.5783',@GrossProfitRa... |
ALTER TABLE "identity_verifiable_addresses" ADD COLUMN "code" TEXT;
ALTER TABLE "identity_verifiable_addresses" ADD COLUMN "expires_at" DATETIME;
UPDATE identity_verifiable_addresses SET code = substr(hex(randomblob(32)), 0, 32) WHERE code IS NULL;
UPDATE identity_verifiable_addresses SET expires_at = CURRENT_TIMESTAMP... |
/*
Navicat MySQL Data Transfer
Source Server : mobvoi_misc
Source Server Version : 50505
Source Host : 127.0.0.1:3306
Source Database : warranty_ticwear
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2016-09-26 16:45:46
*/
SET FOREIGN_KEY_CHEC... |
-- Tags: no-ordinary-database, no-fasttest
-- Tag no-ordinary-database: Sometimes cannot lock file most likely due to concurrent or adjacent tests, but we don't care how it works in Ordinary database
-- Tag no-fasttest: In fasttest, ENABLE_LIBRARIES=0, so rocksdb engine is not enabled by default
DROP TABLE IF EXISTS 0... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 20, 2019 at 03:48 AM
-- Server version: 10.2.19-MariaDB-cll-lve
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
-- CreateTable
CREATE TABLE "DailyBalances" (
"id" TEXT NOT NULL,
"userId" TEXT NOT NULL,
"amount" INTEGER NOT NULL,
"date" TIMESTAMP(3) NOT NULL,
"accountId" TEXT NOT NULL,
PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "DailyBalances" ADD FOREIGN KEY ("userId") REFERENCES "User"("id") ON... |
SELECT
EMP.DEPTNO
, DNAME
, LOC
, EMPNO
, ENAME
, JOB
, MGR
, HIREDATE
, SAL
, COMM
, TSTAMP
, VERSIONNO
FROM
EMP
, DEPT
WHERE
EMP.DEPTNO = DEPT.DEPTNO
ORDER BY
DEPT.DEPTNO,
EMPNO desc
|
# --- !Ups
UPDATE project p SET p.organization_id =
(
SELECT o.id
FROM organization o
WHERE UPPER(p.owner) = UPPER(o.name)
)
WHERE p.id IN
(
SELECT p.id
FROM project p LEFT JOIN organization o ON UPPER(p.owner) = UPPER(o.name)
WHERE UPPER(p.owner) = UPPER(o.name) AND p.organization_id IS NULL
);
# --- !... |
SELECT arrayJoin(arrayMap(i -> (i + 1), range(2))) AS index, number
FROM numbers(2)
GROUP BY number
ORDER BY index, number;
SET max_bytes_before_external_group_by = 1;
SELECT arrayJoin(arrayMap(i -> (i + 1), range(2))) AS index, number
FROM numbers(2)
GROUP BY number
ORDER BY index, number;
SET group_by_two_level_th... |
-- // add practitioner and orgs columns date created date edited server version
-- Migration SQL that makes the change goes here.
-- Add date created and date edited columns
ALTER TABLE team.practitioner ADD COLUMN IF NOT EXISTS date_created timestamp DEFAULT NOW();
ALTER TABLE team.practitioner ADD COLUMN IF NOT EXIS... |
DROP FUNCTION IF EXISTS de_metas_endcustomer_fresh_reports.Docs_Purchase_InOut_Customs_Root(IN record_id numeric);
CREATE OR REPLACE FUNCTION de_metas_endcustomer_fresh_reports.Docs_Purchase_InOut_Customs_Root(IN record_id numeric)
RETURNS TABLE
(
ad_org_id numeric,
c_orderline_id numeric,
c_order_id numeric,
Ha... |
/*DELETE FROM [dbo].[ValuteCursOnDates]
WHERE (OnDate >= @FromDate) AND (OnDate <= @ToDate)*/
DELETE FROM [dbo].[CurrencyValues]
WHERE (OnDate >= {0}) AND (OnDate <= {1}) |
INSERT INTO k_lu_job_commands (id_command,tx_command,nm_class) VALUES ('SMS','SEND SMS PUSH TEXT MESSAGE','com.knowgate.scheduler.jobs.SMSSender');
INSERT INTO k_lu_job_commands (id_command,tx_command,nm_class) VALUES ('SEND','SEND MIME MESSAGES BY SMTP','com.knowgate.scheduler.jobs.MimeSender');
INSERT INTO k_lu_jo... |
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
ALTER TABLE user_contribution_searches ADD follow_count BIGINT NOT NULL COMMENT 'フォロー数' AFTER search;
-- +goose Down
-- SQL section 'Down' is executed when this migration is rolled back
ALTER TABLE user_contribution_searches DROP COLUMN fo... |
UPDATE treners
SET age = age + 3
WHERE id = 3; |
/*
*/
CREATE DATABASE `website-monitor` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci';
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for notice_methods
-- ----------------------------
DROP TABLE IF EXISTS `notice_methods`;
CREATE TABLE `notice_methods` (
`id` int(11) unsigned... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-- basic test table with an auto inc field
create table foo(
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
);
-- second test tab... |
prompt --application/set_environment
set define off verify off feedback off
whenever sqlerror exit sql.sqlcode rollback
--------------------------------------------------------------------------------
--
-- ORACLE Application Express (APEX) export file
--
-- You should run the script connected to SQL*Plus as the Oracle... |
-- 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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI... |
-- 500 Number of persons with death, by cause_concept_id
--HINT DISTRIBUTE_ON_KEY(stratum_1)
SELECT
500 AS analysis_id,
CAST(d.cause_concept_id AS VARCHAR(255)) AS stratum_1,
CAST(NULL AS VARCHAR(255)) AS stratum_2,
CAST(NULL AS VARCHAR(255)) AS stratum_3,
CAST(NULL AS VARCHAR(255)) AS stratum_4,
CAST(NULL AS V... |
select d.id, d.iyakuhincode, m.iyakuhincode from (visit_conduct_drug d inner join visit_conduct c on d.visit_conduct_id = c.id )
inner join visit v on c.visit_id = v.visit_id
left outer join iyakuhin_master_arch m
on d.iyakuhincode = m.iyakuhincode
and m.valid_from <= date(v.v_datetime)
and (m.valid_upto = '000... |
CREATE TABLE [dbo].[ReadType1](
[ID] [int] NOT NULL,
[Name] [nvarchar](10) NULL
) ON [PRIMARY]
CREATE TABLE [dbo].[ReadType2](
[ID] [int] NOT NULL,
[Name] [nvarchar](10) NULL
) ON [PRIMARY]
CREATE TABLE [dbo].[ReadType3](
[ID] [int] NOT NULL,
[Name] [nvarchar](10) NULL
) ON [PRIMARY]
CREATE TAB... |
CREATE TABLE subdivision_LK (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision_LK" ("id", "name", "level") VALUES (E'LK-52', E'Ampara', E'district');
INSERT INTO "subdivision_LK" ("id", "name", "level") VALUES (E'LK-71', E'Anuradhapura', E'district');
INS... |
create table ACT_GE_PROPERTY (
NAME_ varchar(64),
VALUE_ varchar(300),
REV_ integer,
primary key (NAME_)
);
create table ACT_GE_BYTEARRAY (
ID_ varchar(64),
REV_ integer,
NAME_ varchar(255),
DEPLOYMENT_ID_ varchar(64),
BYTES_ bytea,
GENERATED_ boolean,
primary key (ID_)
);
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.