text stringlengths 1 1.05M |
|---|
----DROP TABLE bdf3_component;
--CREATE TABLE bdf3_component (id_ varchar(64) NOT NULL, component_id_ varchar(255), path_ varchar(512), url_id_ varchar(64), description_ varchar(512), name_ varchar(64), component_type varchar(64), PRIMARY KEY (id_)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
----DROP TABLE bdf3_permission;
--... |
CREATE PROCEDURE [dbo].[netsqlazman_ApplicationInsert]
(
@StoreId int,
@Name nvarchar(255),
@Description nvarchar(1024)
)
AS
IF EXISTS(SELECT StoreId FROM dbo.[netsqlazman_Stores]() WHERE StoreId = @StoreId) AND dbo.[netsqlazman_CheckStorePermissions](@StoreId, 2) = 1
BEGIN
INSERT INTO [dbo].[netsqlazman_Applicati... |
DROP TABLE IF EXISTS admin_settings;
DROP TABLE IF EXISTS alarm;
DROP TABLE IF EXISTS asset;
DROP TABLE IF EXISTS audit_log;
DROP TABLE IF EXISTS attribute_kv;
DROP TABLE IF EXISTS component_descriptor;
DROP TABLE IF EXISTS customer;
DROP TABLE IF EXISTS dashboard;
DROP TABLE IF EXISTS device;
DROP TABLE IF EX... |
ALTER TYPE transfer_task ADD target_domain_ids set<uuid>; |
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.5
-- Dumped by pg_dump version 10.5
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', fal... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Mar 05, 2018 at 04:01 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... |
update item
set read = true
from source
join "user" using(user_id)
where item.source_id = source.source_id
and "user".token = $1
|
-- View: public."HistorySummaryByBureauFund"
-- Subtotal Budget History by Service Area, Bureau & Funding type
-- DROP VIEW public."HistorySummaryByBureauFund";
CREATE OR REPLACE VIEW public."HistorySummaryByBureauFund" WITH (security_barrier=true) AS
SELECT budget_app_budgethistory.fiscal_year,
case
whe... |
-- phpMyAdmin SQL Dump
-- version 4.5.5.1
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Dim 14 Janvier 2018 à 15:44
-- Version du serveur : 5.7.11
-- Version de PHP : 5.6.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER... |
CREATE DATABASE `rfid`;
CREATE TABLE `rfid`.`rfid_fab` (
`rfid_fab_id` int(10) unsigned NOT NULL auto_increment,
`rfid_fab_name` varchar(45) NOT NULL,
`rfid_fab_type` varchar(45) NOT NULL,
`rfid_fab_creation` timestamp NOT NULL default '0000-00-00 00:00:00',
`rfid_fab_last_use` timestamp NOT NULL def... |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 10, 2020 at 08:27 AM
-- 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... |
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 14, 2016 at 10:24 PM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
CREATE DATABASE `orpheos`;
-- TABLE CREATION
CREATE TABLE `orpheos`.`user` (
`id` INT NOT NULL AUTO_INCREMENT ,
`display_name` VARCHAR(20) NOT NULL ,
`user_name` VARCHAR(20) NOT NULL ,
`access_level` INT,
`password` VARCHAR(60) NOT NULL ,
`created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
`updated` TIMESTAMP on... |
explain plan for select * from dfs.drillTestDir.`parquet_storage/DRILL_6259/DRILL_6259_test_data` t where t.complex_field.nested_complex_field.nested_field is null; |
-- boundary2.test
--
-- db eval {
-- SELECT a FROM t1 WHERE r >= 281474976710656 ORDER BY a
-- }
SELECT a FROM t1 WHERE r >= 281474976710656 ORDER BY a |
/*
SQLyog Community v12.04 (64 bit)
MySQL - 10.4.18-MariaDB : Database - basic
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KE... |
-- Migrationscripts for ebean unittest
-- apply changes
alter table migtest_e_basic drop column old_boolean;
alter table migtest_e_basic drop column old_boolean2;
alter table migtest_e_basic drop column eref_id;
alter table migtest_e_history2 drop column obsolete_string1;
alter table migtest_e_history2 drop column ... |
CREATE DATABASE tecla_mercadolibre;
USE tecla_mercadolibre;
CREATE TABLE RolModel(
rol_id INT NOT NULL IDENTITY(1,1),
name VARCHAR(25) NOT NULL,
PRIMARY KEY(rol_id),
);
INSERT INTO RolModel(name) VALUES('user'); /* Este rol puede listar sus productos en la tienda, agregar su dirección */
INSERT INTO RolM... |
USE [master]
GO
DECLARE @custompath NVARCHAR(500), @allow_xpcmdshell bit, @ptochecks bit, @duration tinyint, @logdetail bit, @diskfrag bit, @ixfrag bit, @ixfragscanmode VARCHAR(8), @bpool_consumer bit, @gen_scripts bit, @dbScope VARCHAR(256), @spn_check bit
/* Best Practices Check - pedro.lopes@microsoft.com (ht... |
WITH source AS (
SELECT *
FROM {{ ref('sheetload_manual_downgrade_dotcom_tracking_source') }}
)
SELECT *
FROM source |
USE [ANTERO]
GO
/****** Object: View [dw].[v_virta_jtp_tilasto] Script Date: 30.3.2022 16:06:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER VIEW [dw].[v_virta_jtp_tilasto] AS
SELECT
[Tilastovuosi]
,[Statistikår]
,[Statistical year]
,[Ilmoitusvuosi]
,julkaisunTunnus
,[Koodit Sektori]
,[Sektor... |
-- Test Customers
insert into SALES_CUSTOMER
(ID, CREATE_TS, CREATED_BY, VERSION, NAME, EMAIL)
select newid(), now(), 'admin', 0, 'test' || trim(both ' ' from to_char(i, '00000')), 'test' || trim(both ' ' from to_char(i, '00000')) || '@example.com'
from generate_series(1,10000) i; |
BEGIN TRANSACTION;
CREATE TABLE epics_channel(
id integer primary key,
lcs_name text unique,
value_type text, -- current or voltage_tmp
value double precision default 0.0,
value_txt text default 'NA',
update_time date --default datetime('now')
);
INSERT INTO "epics_channel" VALUES(1, '01QM000I01', 'current... |
-- wal6.test
--
-- execsql {
-- CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
-- INSERT INTO t1 VALUES(1,2);
-- SELECT * FROM t1;
-- }
CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
INSERT INTO t1 VALUES(1,2);
SELECT * FROM t1; |
set @query_script_skip_cleanup := true;
set @query := 'INSERT IGNORE INTO some_table';
call _interpret(@query, false);
call _peek_states_list(1, 10000, 'alpha,alpha,alpha', true, false, true, @tokens_array_id, @match_to);
select @match_to = 0; |
TRUNCATE TABLE Schema3.[TransTable1]
GO
SET IDENTITY_INSERT Schema3.[TransTable1] ON
GO
INSERT Schema3.[TransTable1] ([TransID], [Quantity], [Price], [TotalPrice]) VALUES (1, 2, 100, 200)
GO
INSERT Schema3.[TransTable1] ([TransID], [Quantity], [Price], [TotalPrice]) VALUES (2, 5, 200, 1000)
GO
SET IDENTITY_INSERT S... |
DROP VIEW IF EXISTS M_Packageable_V;
CREATE OR REPLACE VIEW M_Packageable_V AS
SELECT
--
-- BPartner
p.C_BPartner_ID,
p.Value AS BPartnerValue,
(coalesce(p.Name,'') || coalesce(p.Name2,'')) AS BPartnerName,
--
-- BPartner location
l.C_BPartner_Location_ID,
l.Name AS BPartnerLocationName,
s.BPartnerAddress_Ov... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 23, 2021 at 09:21 AM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *... |
-- name: create-users-table
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
name VARCHAR(255),
email VARCHAR(255)
);
-- name: create-user
INSERT INTO users (name, email) VALUES(?, ?)
-- name: find-one-user-by-email
SELECT id,name,email FROM users WHERE email = ? LIMIT 1
-- name: drop-users-tab... |
-- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 18, 2016 at 09:59 AM
-- Server version: 10.0.20-MariaDB
-- PHP Version: 5.2.17
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_C... |
-- Database Definition Queries for the Cactus Club Project Website
-- CS 340 Project: Team 17 - Nathan Klump & Lidia Alexia Banos
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
--
-- Database: `cs340_cactus_club_ddq`
--
-- ---------------------------------------------... |
-- not related to #2121:
-- fix the salesRep_id field of the purchase order window
-- the old value was #@AD_User@ which is wrong in two different ways
UPDATE AD_Field SET DefaultValue='@#AD_User_ID@' WHERE AD_Field_ID=3438;
|
-- database: presto; groups: system; queryType: SELECT
SHOW TABLES FROM system.metadata
|
create database if not exists ims_test;
create table if not exists ims_test.customers(id int primary key auto_increment, first_name varchar(40), surname varchar(40));
create table if not exists ims_test.items(productid int primary key auto_increment, productName varchar(40), price int);
create table if not exists ims_t... |
/*
* treat.sql
* Chapter 15, Oracle10g PL/SQL Programming
* by Ron Hardman, Mike McLaughlin, Scott Urman
*
* This script demonstrates the TREAT function.
*/
SET SERVEROUTPUT ON SIZE 1000000
exec clean_schema.synonyms
exec clean_schema.tables
exec clean_schema.objects
CREATE OR REPLACE TYPE discount_price_obj A... |
-- phpMyAdmin SQL Dump
-- version 4.8.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 09, 2018 at 09:39 PM
-- Server version: 10.1.33-MariaDB
-- PHP Version: 7.2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
CREATE TABLE FLIGHT_DELAY
(
fl_id BIGINT PRIMARY KEY AUTO_INCREMENT,
`year` SMALLINT UNSIGNED NOT NULL,
`quarter` TINYINT UNSIGNED NOT NULL,
`month` TINYINT UNSIGNED NOT NULL,
day_of_month TINYINT UNSIGNED NOT NULL,
day_of_week TINYINT UNSIGNED NOT NULL,
fl_date ... |
# 06. Create Table People
#
# Using SQL query create table “people” with columns:
# id – unique number for every person there will be no more than 231-1people. (Auto incremented)
# name – full name of the person will be no more than 200 Unicode characters. (Not null)
# picture – image with size up to 2 MB. (Allow nulls... |
SELECT acc.location, 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
AND s.site_id = b.site_id
AND q1... |
INSERT INTO `companies` (`id`, `created`, `date`, `updated`, `business_key`, `domain`, `email`, `name`, `version`) VALUES
(1, '2014-12-18 00:00:00', '2014-12-18 00:00:00', '2014-12-18 00:00:00', 'reimbursementRequest', 'www1.rushucloud.com', 'dev@dev.com', 'dc=www', 0),
(2, '2015-01-01 00:00:00', '2015-01-01 00:00:00',... |
-- name: create-table-stages
CREATE TABLE IF NOT EXISTS stages (
stage_id SERIAL PRIMARY KEY
,stage_repo_id INTEGER
,stage_build_id INTEGER
,stage_number INTEGER
,stage_name VARCHAR(50)
,stage_kind VARCHAR(50)
,stage_type VARCHAR(50)
,stage_status VARCHAR(50)
,stage_erro... |
create table magasin(
idt serial PRIMARY KEY ,
nom text not null
);
create table rayon(
idt serial PRIMARY KEY ,
idt_magasin integer not null,
nom text not null,
nom_image text not null
);
ALTER TABLE ONLY rayon ADD CONSTRAINT f... |
--1
/* Change the query shown so that it displays Nobel prizes for 1950. */
SELECT
yr,
subject,
winner
FROM
nobel
WHERE
yr = 1950;
--2
/* Show who won the 1962 prize for Literature. */
SELECT
winner
FROM
nobel
WHERE
yr = 1962
AND subject = 'Literature';
--3
/* Show the year and subject that won 'Alb... |
-- MySQL dump 10.13 Distrib 5.1.73, for redhat-linux-gnu (x86_64)
--
-- Host: localhost Database: gradesystem
-- ------------------------------------------------------
-- Server version 5.1.73
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_... |
CREATE DATABASE bcc_db;
CREATE TABLE User;
INSERT INTO categories (id, category, createdAt, updatedAt) VALUES (1,'General', '2020-07-21 17:00:36','2020-07-21 17:00:36');
INSERT INTO categories (id, category, createdAt, updatedAt) VALUES (2,'Jobs', '2020-07-21 17:00:36','2020-07-21 17:00:36');
INSERT INTO categories (... |
INSERT INTO employees (
fname,
lname,
company_phone,
personal_phone,
company_email,
personal_email,
address,
city,
state,
zip,
gender
) VALUES (
'Bill',
'Williams',
'601-555-5945',
'601-555-3245',
'b@company.net',
'b@gmail.com',
'345 Front Street',... |
/*
// Copyright (c). 2020 Daniel Patterson, MCSD (danielanywhere)
// Released for public access under the MIT License.
// http://www.opensource.org/licenses/mit-license.php
*/
SELECT
CatalogItem.CatalogItemID,
CatalogItem.CatalogItemTicket,
CatalogItem.DepartmentItemID,
CatalogItem.UserItemID,
CatalogItem.DateCreated,
... |
INSERT INTO burgers (burger_name, devoured)
VALUES ('Cheeseburger', true),('Bacon Cheeseburger', true),('Impossible Burger', true); |
-- MySQL dump 10.13 Distrib 5.6.24, for osx10.8 (x86_64)
--
-- Host: 127.0.0.1 Database: travel
-- ------------------------------------------------------
-- Server version 5.5.38
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*... |
SELECT
page,
COUNT(page) as pageviews,
SUM(IF(hit_number = max_hit, 1, 0)) as exits,
(SUM(IF(hit_number = max_hit, 1, 0))/COUNT(page)) * 100 AS exit_rate
FROM (SELECT CONCAT(fullVisitorId, STRING(visitId)) AS unique_visit_id, hits.hitNumber AS hit_number, hits.type AS hit_type, hits.page.pagePath AS page, MAX(h... |
--
-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
-- under one or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information regarding copyright
-- ownership. Camunda licenses this file to you under the Apache License,
-- Version 2.0; y... |
DROP TABLE IF EXISTS users;
CREATE TABLE users (
user_id BIGINT AUTO_INCREMENT NOT NULL PRIMARY KEY,
first_name VARCHAR(20),
last_name VARCHAR(20)
);
|
DROP TABLE IF EXISTS `derived_aggregate_daily_rollup`;
CREATE TABLE IF NOT EXISTS `derived_aggregate_daily_rollup` (
`domain_id` INT UNSIGNED NOT NULL,
`effective_date` DATE NOT NULL,
`full_compliance_count`INT UNSIGNED NOT NULL,
`dkim_only_count` INT UNSIGNED NOT NULL,
`spf_only_count` INT UNSIGNED NOT NU... |
-- Tags: no-parallel
create database if not exists shard_0;
create database if not exists shard_1;
drop table if exists dist_01850;
drop table if exists shard_0.data_01850;
create table shard_0.data_01850 (key Int) engine=Memory();
create table dist_01850 (key Int) engine=Distributed('test_cluster_two_replicas_diffe... |
--
-- Created by SQL::Translator::Producer::SQLite
-- Created on Thu Jun 28 16:51:29 2018
--
BEGIN TRANSACTION;
--
-- Table: alt_allele
--
CREATE TABLE alt_allele (
alt_allele_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
alt_allele_group_id integer NOT NULL,
gene_id integer NOT NULL
);
CREATE UNIQUE INDEX ... |
DO LANGUAGE plpgsql $$
DECLARE
error TEXT;
source TEXT;
result TEXT;
BEGIN
RAISE NOTICE '===== Starting test for schema =====';
-- Test 1.1 --
SELECT extension.create_schema('schema_1') INTO source;
result := 'CREATE SCHEMA "schema_1";';
IF source = result THEN
RAISE NOTICE 'Test 1.1: O... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 22, 2020 at 06:25 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.2.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
/* ==================================================
3.8.2 Join Exercises
Ednalyn C. De Dios
2019-02-21
MySQL
Ada Cohort
Codeup Data Science Career Accelerator Program
==================================================
*/
/*
-- Join Example Database
*/
-- Use the join_example_d... |
----------------------------------------------------------------
-- [all_disks] View
--
Create or replace FUNCTION GetAllFromDisks(v_user_id UUID, v_is_filtered BOOLEAN) RETURNS SETOF all_disks STABLE
AS $procedure$
BEGIN
RETURN QUERY
SELECT *
FROM all_disks
WHERE (NOT v_is_filtered OR EXISTS ... |
CREATE INDEX article_published_index ON article (published);
|
-- file:returning.sql ln:19 expect:true
DELETE FROM foo WHERE f1 > 2 RETURNING f3, f2, f1, least(f1,f3)
|
insert into todo (id, user_name, description, done, due_date)
values (10001, 'foo', 'Read a book', false, sysdate());
insert into todo (id, user_name, description, done, due_date)
values (10002, 'foo', 'Eat', false, sysdate());
insert into todo (id, user_name, description, done, due_date)
values (10003, 'foo', 'Trave... |
SELECT
COUNT(*) OVER()::NUMERIC AS full_count,
member.member_id,
member.created,
member.updated,
member.title,
member.first_name,
member.last_name,
working_group.working_group_id,
working_group.working_group_name,
institute.institute_id,
institute.institute_name,
universi... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Feb 06, 2018 at 12:41 PM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
SELECT
se.EVENT_ID,
se.EVENT_DATE,
l.WaterName as WaterName_Lake,
l.Permanent_Identifier as Permanent_Identifier_Lake,
l.DWR_WaterID as DWR_WaterID_Lake,
l.ReachCode as ReachCode_Lake,
st.WaterName as WaterName_Stream,
st.Permanent_Identifier as Permanent_Identifier_Stream,
st.DWR_WaterID a... |
-- TABOARD 스키마
CREATE TABLE board(
num NUMBER(10) constraint board_num_pk primary key ,
sub VARCHAR2(100) ,
writer VARCHAR2(34) ,
pwd VARCHAR2(10) ,
cont CLOB , -- 가장 큰 문자열 타입 !
reip VARCHAR2(34) ,
redate DATE
);
CREATE SEQUENCE board_seq
INCREMENT by 1
START WITH 1;
|
CREATE DATABASE users_prod;
CREATE DATABASE users_staging;
CREATE DATABASE users_dev;
CREATE DATABASE users_test; |
DROP TABLE IF EXISTS `{dbprefix}bbs_cat_count`; |
/* Some PBKDF2 HMAC Test Vectors */
/*
PBKDF2 HMAC-SHA256 Test Vectors
Input:
P = "password" (8 octets)
S = "salt" (4 octets)
c = 1
dkLen = 32
Output:
DK = 12 0f b6 cf fc f8 b3 2c
43 e7 22 52 56 c4 f8 37
a8 65 48 c9 2c cc 35 48
08 05 98 7c b7 0b e1 7b (32 octets)
*/
SELECT "password" ... |
INSERT INTO burger (name) VALUES ('cheeseburger');
INSERT INTO burger (name) VALUES ('Double Cheese');
INSERT INTO burger (name, devour) VALUES ('Western Thickburger', true);
INSERT INTO burger (name, devour) VALUES ('Salami on Toast', true);
INSERT INTO burger (name, devour) VALUES ('Rueben', true);
INSERT INTO burger... |
CREATE TABLE events_raw (
id int AUTO_INCREMENT PRIMARY KEY,
timestamp datetime NOT NULL,
event longtext NOT NULL,
metadata text DEFAULT NULL,
source text NOT NULL,
KEY idx_timestamp (timestamp),
KEY idx_source (source(3072))
) ENGINE=INNODB;
|
--
-- PREPARED TRANSACTIONS (two-phase commit)
--
-- We can't readily test persistence of prepared xacts within the
-- regression script framework, unfortunately. Note that a crash
-- isn't really needed ... stopping and starting the postmaster would
-- be enough, but we can't even do that here.
-- create a simple t... |
set doc off;
set sqlblanklines on;
/**
* Oracle Table Creation Scripts.
*
* $Horde: horde/scripts/sql/create.oci8.sql,v 1.4.8.24 2009/10/19 10:54:32 jan Exp $
*
* @author Miguel Ward <mward@aluar.com.ar>
*
* This sql creates the Horde SQL tables in an Oracle 8.x database. Should
* work with Oracle 9.x (and ... |
ALTER TABLE `%{database.entities.button.table}`
MODIFY `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
MODIFY `paymentType` VARCHAR(50) NOT NULL DEFAULT 'CB',
MODIFY `height` INT(5) DEFAULT NULL,
MODIFY `position` ... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 15, 2017 at 01:44 PM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 7.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
SELECT eprintid FROM caltechauthors
WHERE (CONCAT(lastmod_year, "-",
LPAD(IFNULL(lastmod_month, 1), 2, "0"), "-",
LPAD(IFNULL(lastmod_day, 1), 2,"0"), " ",
LPAD(IFNULL(lastmod_hour, 0), 2, "0"), ":",
LPAD(IFNULL(lastmod_minute, 0), 2, "0"), ":",
LPAD(IFNULL(lastmod_second, 0), 2, "0")) >= ?) AND
(CONCAT(lastmod_year, "... |
# Time: O(nlogn)
# Space: O(n)
SELECT DISTINCT c1.seat_id
FROM cinema c1 JOIN cinema c2
ON ((c1.seat_id = c2.seat_id - 1) OR (c1.seat_id = c2.seat_id + 1))
AND c1.free = true AND c2.free = true
ORDER BY c1.seat_id
;
|
CREATE TABLE `alt_id` (
`alt_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`term_id` int(10) unsigned NOT NULL,
`accession` varchar(64) NOT NULL,
PRIMARY KEY (`alt_id`),
UNIQUE KEY `term_alt_idx` (`term_id`,`alt_id`),
KEY `accession_idx` (`accession`(50))
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=lat... |
/***************************************************************************************/
-- STORED PROCEDURE
-- GetInstanceV6
--
-- FIRST SCHEMA VERSION
-- 6
--
-- DESCRIPTION
-- Gets valid dicom instances at study/series/instance level
--
-- PARAMETERS
-- @invalidStatus
-- * Filter criteria to... |
USE StackOverflow
CREATE SCHEMA Persona AUTHORIZATION angie
DROP SCHEMA Persona
select CURRENT_USER
REVOKE UNMASK TO angie
go
ALTER SCHEMA Persona
TRANSFER [dbo].[users]
select * from Persona.Users
delete from Persona.users where idUser=2
select*from sys.schemas |
-- @testpoint:openGauss关键字unknown(非保留),同时作为表名和列名带引号,与union结合查询合并两个SELECT 语句查询
drop table if exists "unknown" CASCADE;
create table "unknown"(
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 numeri... |
USE [master]
GO
CREATE DATABASE Camp ON PRIMARY
( NAME = N'Camp_Data', FILENAME = N'D:\Courses\Data\Camp_Data.mdf' , SIZE = 167872KB , MAXSIZE = UNLIMITED, FILEGROWTH = 16384KB )
LOG ON
( NAME = N'Camp_Log', FILENAME = N'D:\Courses\Data\Camp_Log.ldf' , SIZE = 2048KB , MAXSIZE = 2048GB , FILEGROWTH = 16384KB )
CO... |
{{ $backendDb := .Values.appConfig.backend.database.connection.database }}
{{ $lighthouseDb := .Values.lighthouse.database.connection.database }}
{{ $user := .Values.global.postgresql.postgresqlUsername }}
create database {{ $backendDb }};
grant all privileges on database {{ $backendDb }} to {{ $user }};
create datab... |
CREATE DATABASE `DataWarehouse`;
CREATE TABLE `DataWarehouse`.`users` (
`id` int NOT NULL AUTO_INCREMENT,
`firstName` varchar(50) NOT NULL,
`lastName` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
`profile` varchar(50) NOT NULL,
`password` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB ... |
CREATE PROCEDURE [Download_Set]
(
@DownloadID int = null,
@Name nvarchar(255) = null,
@Description nvarchar(MAX) = null,
@FileDate datetime = null,
@Filename nvarchar(255) = null,
@UserId uniqueidentifier = null,
@Rank int = null
)
AS
SET NOCOUNT ON
if(@DownloadID is not null)
begin
/* UPDATE... |
/*
* Creates the following tables:
* - CDS
* - COLUMNS_V2
* The new columns table is called COLUMNS_V2
* because many columns are removed, and the schema is changed.
* It'd take too long to migrate and keep the same table.
*/
CREATE TABLE "CDS" (
"CD_ID" bigint NOT NULL,
PRIMARY KEY ("CD_ID")
);
CREATE TA... |
BEGIN TRANSACTION
DECLARE @utcdate DATETIME = (SELECT getutcdate() AS utcdate)
DECLARE @app_guid UNIQUEIDENTIFIER = (SELECT CASE WHEN SUSER_SID() IS NOT NULL THEN SUSER_SID() ELSE (SELECT CONVERT(uniqueidentifier,STUFF(STUFF(STUFF(STUFF('B00D00A0AC0A0D0C00DD00F0D0C00000',9,0,'-'),14,0,'-'),19,0,'-'),24,0,'-'))) END AS... |
CREATE TABLE u103010_recharge
(
puk VARCHAR(20) NOT NULL COMMENT '流水ID',
order_number VARCHAR(128) NOT NULL COMMENT '订单号',
material_id VARCHAR(20) COMMENT '素材ID',
material_classify VARCHAR(20) COMMENT '素材分类',
material_tpe VARCHAR(20) COMMENT '素材类型',
user_id VARCHAR(20) COMMENT '玩家流水ID',
user... |
-- @testpoint:openGauss关键字day(非保留),作为列名带引号并且删除时使用该列,建表成功,day列值是'hello'的删除成功
drop table if exists day_test;
create table day_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... |
SELECT a, todate(b, 'yyyy-m-d') ymd, SUM(c) as sum_c
FROM (select * from a a1) as tb
WHERE (c1 = 100 AND c2 LIKE '%as%') OR (c3 BETWEEN 10 AND 100 OR Todate(d) > toDate(e)) and not 1 > 2
GROUP BY z, a
HAVING AVG(c9) > 100
ORDER BY c4 DESC, c5
LIMIT 10;
CREATE TABLE a (c1 INTEGER, c2 DOUBLE, c3 VARCHAR(10), c4 DATE);
... |
# --- WireDatabaseBackup {"time":"2021-06-09 08:48:28","user":"","dbName":"acp-recipe","description":"","tables":[],"excludeTables":["pages_drafts","pages_roles","permissions","roles","roles_permissions","users","users_roles","user","role","permission"],"excludeCreateTables":[],"excludeExportTables":["field_roles","fie... |
prompt --application/pages/page_00007
begin
-- Manifest
-- PAGE: 00007
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2020.03.31'
,p_release=>'20.1.0.00.13'
,p_default_workspace_id=>2400405578329584
,p_default_application_id=>100
,p_default_id_offset=>0
,p_default_owner=>'FLOWS4APEX'
);
... |
if exists(select * from sysobjects where name='pr_Reports_MissedAppointments' and type='p')
drop proc pr_Reports_MissedAppointments
go
create proc pr_Reports_MissedAppointments @fromdate DATETIME, @todate datetime
as
begin
SELECT * FROM
(
Select Distinct b.ServiceArea,
a.Ptn_Pk As PatientPK,
b.PatientID,
... |
ALTER TABLE "clusters" DROP COLUMN "ttl_minutes";
|
-- @testpoint:opengauss关键字char(非保留),作为用户组名
--关键字不带引号-成功
drop group if exists char;
create group char with password 'gauss@123';
drop group char;
--关键字带双引号-成功
drop group if exists "char";
create group "char" with password 'gauss@123';
drop group "char";
--关键字带单引号-合理报错
drop group if exists 'char';
--关键字带反引号-合理报错
drop... |
-- MySQL dump 10.13 Distrib 8.0.20, for macos10.15 (x86_64)
--
-- Host: mysqldemos.elguille.xyz Database: uat_wedding
-- ------------------------------------------------------
-- Server version 5.7.28-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CH... |
insert into cursos values
('1', 'Html4', 'Curso de HTML5', '40', '37', '2014'),
('2', 'Algoritmos', 'Lógica de Programação', '20', '15', '2014'),
('3', 'Photoshop', 'Dicas de Photoshop CC', '10', '8', '2014'),
('4', 'PGP', 'Curso de PHP para Iniciantes', '40', '20', '2010'),
('5', 'Jarva', 'Introdução à Linguagem Java'... |
# Hindmarsh-Philipsen equation of state A
# rho=g*(pi^2/30)*T^4 s=gS*(2*pi^2/45)*T^3 p=gP*(pi^2/90)*T^4
# T[GeV] heff geff
1.2589250e+04 1.0478871e+02 1.0479721e+02
1.1885040e+04 1.0478321e+02 1.0479177e+02
1.1220190e+04 1.0477766e+02 1.0478630e+02
1.0592560e+04 1.047... |
use master
go
-- liste aller Prozesse
exec sp_who 'Werk12\Martin'
go
-- Liste aller aktuellen Anmeldungen
exec sp_helplogins
go
-- Liefert Infos zu den Datenbanken
exec sp_helpdb
go
select * from sys.sysdatabases
go
select * from sys.databases
go
exec sp_helprole
go
-- Listet alle Rollen, die ein User hat, sowie... |
create or replace view PromotionROIView as
select PromotionCode.promotion as promotion,
count(1) as num_orders,
sum(promotion_total) as promotion_total,
sum(total) as total
from PromotionCode
inner join Orders on Orders.promotion_code = PromotionCode.code
group by PromotionCode.promotion;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.