sql stringlengths 6 1.05M |
|---|
<reponame>mingcw/qa-wenda<gh_stars>1-10
-- MySQL Script generated by MySQL Workbench
-- 10/08/17 10:35:00
-- Model: New Model Version: 1.0
-- 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_... |
<gh_stars>1-10
-- für jede der angelegten Ligen benötigen wir eine Veranstaltung
-- das aktuelle Sportjahr liegt in "aktuellesaison"
-- Default für Wettkampfart Liga hinterlegen
-- Datenmigration nicht möglich, da Daten fehlerhaft, modellierung nicht nachjvollziehbar
-- Insert der Ligen manuell, keinen Migration wg. ... |
<reponame>Transform-Chiropratic/api<filename>db/migrations/00003_create_table_oauth_tokens.sql<gh_stars>1-10
-- +goose Up
-- +goose StatementBegin
CREATE TABLE oauth_tokens (
id SERIAL PRIMARY KEY,
created_at timestamptz NOT NULL DEFAULT now(),
expires_at timestamptz NOT NULL,
code TEXT NOT NULL,
"a... |
<gh_stars>10-100
alter table fund add column version numeric;
|
ALTER TABLE users ADD COLUMN gameview INT AFTER consoleview;
|
<gh_stars>0
/**
* WordPress Resurrection
*
* @author <NAME> <colo<EMAIL>>
* @license ISC
*/
-- -- -- --
-- Posts
-- -- -- --
-- Delete obsolete indexes
DROP INDEX `comment_count` ON `#DB_PREFIX#posts`;
DROP INDEX `post_date` ON `#DB_PREFIX#posts`;
DROP INDEX `post_modified` ON `#DB_PREFIX#posts`;
DROP INDEX `pos... |
DROP TABLE IF EXISTS transaction_normalized_new_old;
DROP TABLE IF EXISTS transaction_normalized_new_2;
CREATE TABLE transaction_normalized_new_2 AS (
SELECT
awards_new.id AS award_id,
transaction_normalized_new.id as id,
transaction_normalized_new.is_fpds AS is_fpds,
transaction_no... |
-- -- THEN I am presented with the job title, role id, the department that role belongs to, and the salary for that role
-- -- WHEN I choose to view all employees
-- -- THEN I am presented with a formatted table showing employee data, including employee ids, first names, last names, job titles, departments, salaries, a... |
CREATE USER genality WITH password '<PASSWORD>';
CREATE DATABASE genality;
GRANT ALL ON DATABASE genality TO genality;
|
<gh_stars>1-10
/*
Navicat MySQL Data Transfer
Source Server : localhost-mysql
Source Server Version : 50703
Source Host : localhost:3306
Source Database : minireportdb
Target Server Type : MYSQL
Target Server Version : 50703
File Encoding : 65001
Date: 2021-10-12 15:19:16
*/
SET F... |
<reponame>xiaochangbai/seata-samples
create table if not exists seata_state_machine_def
(
id varchar
(
32
) not null comment 'id',
name varchar
(
128
) not null comment 'name',
tenant_id varchar
(
32
) not null comment 'tenant id',
app_name varchar
(
32
) not null comment 'application na... |
drop table if exists invoice if exists;
drop table if exists late_invoice;
create table invoice (
id bigint generated by default as identity(start with 100),
name VARCHAR(100) not null,
account_manager VARCHAR(100) not null,
primary key (id)
);
create table late_invoice (
id bigint ... |
<reponame>donghuan1988/QuestionAnsweringSystem<gh_stars>1000+
CREATE DATABASE questionanswer_fulltext;
USE questionanswer_fulltext;
CREATE TABLE `questionanswer_fulltext`.`question` (
`id` INT NOT NULL AUTO_INCREMENT ,
`question` VARCHAR(200) NOT NULL ,
PRIMARY KEY (`id`) ,
UNIQUE INDEX `que... |
DATE AS `timestamp`,
ST_GeogPoint(LONGITUDE, LATITUDE) AS `coordinates`,
HLY_TEMP_NORMAL AS `mean_temperature`
|
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: wedding
-- ------------------------------------------------------
-- Server version 5.7.16-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;... |
<reponame>esamverkan-gis/origo-server
alter table groups add column collapsed_in_admin_tree INTEGER UNSIGNED; |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2018-12-14 09:33:24
-- 服务器版本: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET ... |
<reponame>dave-shawley/imbi
SET search_path=v1, public, pg_catalog;
CREATE TABLE IF NOT EXISTS teams (
"name" TEXT NOT NULL PRIMARY KEY,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
modified_at TIMESTAMP WITH TIME ZONE,
slug TEXT NOT NULL UNIQUE,
icon_class TEXT NOT N... |
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
drop index SYS_C0021122_IDX;
drop index MARKER_MTION_MARKER_ID;
drop index MARKER_MTION_MARKER_REL;
drop index MARKER_MTION_SORT_ORDER;
--EXIT;
|
<filename>openGaussBase/testcase/KEYWORDS/Language/Opengauss_Function_Keyword_Language_Case0033.sql<gh_stars>0
-- @testpoint:opengauss关键字Language(非保留),作为视图名
--关键字explain作为视图名,不带引号,创建成功
CREATE or replace VIEW Language AS
SELECT * FROM pg_tablespace WHERE spcname = 'pg_default';
drop view Language;
--关键字explain作为视图名,... |
<filename>src/Backend/Modules/Profiles/Installer/Data/install.sql
CREATE TABLE IF NOT EXISTS `profiles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`status` enum('active','inactive','deleted','blocked') NOT NULL,
`display_name` varchar(255) DEFAULT ... |
CREATE TABLE context (id VARCHAR, listenerId VARCHAR, roomId VARCHAR, threadId VARCHAR, userId VARCHAR, userName VARCHAR);
CREATE TABLE command (id VARCHAR, contextId VARCHAR, name VARCHAR, type INT, data VARCHAR);
CREATE TABLE message (id VARCHAR, contextId VARCHAR, body VARCHAR, reactions VARCHAR);
CREATE TABLE trigg... |
<reponame>andreinah/proyecto
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `cliente`
--
CREATE TABLE `cliente` (
`id` int(10) NOT NULL,
`proceso` varchar(30) NOT NULL,
`subproceso` varchar(30) NOT NULL,
`actividad` varchar(30) NOT NULL,
`sedes` varchar(... |
USE steam;
CREATE TABLE app_id_info_100
SELECT *
FROM app_id_info A
WHERE A.type = "game"
ORDER BY rand()
LIMIT 100; |
CREATE TABLE `raffles` (
`raffleID` int(11) NOT NULL AUTO_INCREMENT,
`displayMessageID` varchar(100) NOT NULL,
`active` tinyint(1) NOT NULL DEFAULT 1,
`entryKeyword` varchar(100) DEFAULT NULL,
`cost` int(11) NOT NULL DEFAULT 1,
`displayChannelID` varchar(100) NOT NULL,
`resolvesAt` datetime DEFAULT NULL,
... |
-- Criando a database
create database locadora;
use locadora;
-- Criando a tabela e as colunas
create table if not exists `carros` (
id int auto_increment primary key,
marca varchar(255) not null,
modelo varchar(255) not null,
ano int not null,
cor varchar(255) not null,
motorização double not null,
quil... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 10 Feb 2021 pada 07.26
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
<filename>Oracle/tabelas_teste/CHNF__QUERIES_DATA_TABLE.sql
REM INSERTING into SYS.CHNF$_QUERIES
SET DEFINE OFF;
|
<reponame>RektangularStudios/order-fulfillment<filename>sql/update_customer_order.sql
UPDATE order_fulfillment.customer_order
SET
order_status = $2,
checked_last = $3
WHERE customer_order_id = $1;
|
SELECT pl.Name,
pl.Seats,
COUNT(t.Id) AS [Passengers Count]
FROM Planes pl
LEFT JOIN Flights f
ON f.PlaneId = pl.Id
LEFT JOIN Tickets t
ON t.FlightId = f.Id
GROUP BY pl.Name,
pl.Seats
ORDER BY [Passengers Count] DESC,
pl.Name,
pl.Seats |
create database bamazon_db;
use bamazon_db;
create table products (
item_id integer(10) not null auto_increment,
product_name varchar(100) null,
department_name varchar(100) null,
price decimal(10,2) null,
stock_qty integer(10) null,
primary key (item_id)
);
update products set stock_qty=stock_q... |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Client : 127.0.0.1
-- Généré le : Mer 11 Octobre 2017 à 13:07
-- Version du serveur : 5.7.14
-- Version de PHP : 7.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER... |
<reponame>jpoliveira12345/Projects<filename>Rock_in_Rio/Codigo(SQL)/Triggers e SP.sql
CREATE OR REPLACE FUNCTION contaResp() RETURNS TRIGGER AS
$$
DECLARE nResp int;
BEGIN
SELECT COUNT(*) INTO nResp FROM Palco p WHERE p.responsavel = new.responsavel;
IF nResp = 0 THEN
RETURN NEW;
ELSE
RAISE EXCEPTION 'O funcion... |
<filename>CMC030/pr/open/pr_emp_std_ernded.ddl<gh_stars>1-10
DEFINE RECORD CDD$TOP.PR.PR_EMP_STD_ERNDED
DESCRIPTION IS /*Payroll Employee Standard ERNDED File*/.
PR_EMP_STD_ERNDED_CDD STRUCTURE.
/* Element =
Description = Employee Number */
EMPNUM DATATYPE IS ... |
<reponame>hankh0412/Building-Applications-with-Spring-5-and-Vue.js-2
DROP TABLE IF EXISTS `messages`;
CREATE TABLE `messages` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`text` varchar(128) COLLATE utf8_bin NOT NULL DEFAULT '',
`created_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) EN... |
DROP DATABASE IF EXISTS player_db;
CREATE DATABASE player_db; |
<reponame>eJme1992/Animax
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1:3306
-- Tiempo de generación: 18-09-2018 a las 04:15:01
-- Versión del servidor: 5.7.21
-- Versión de PHP: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET... |
-- :: rowcount Integer
BLAH
;;;
-- name: multiQueriesNamed :: rowcount Integer
PIZZA
;;;
OLIVES
|
<reponame>teekay/JamComments
/* @name expirePendingTokens */
UPDATE password_resets SET used_at=:now WHERE account_id=:accountId AND used_at IS NULL;
/* @name createPasswordResetToken */
INSERT INTO password_resets (id, account_id, token, created_at, expires_at) VALUES (:id, :accountId, :token, :createdAt, :expiresAt)... |
<reponame>chitratsr/AzureSynapseScriptsAndAccelerators
-- Query for: 17. Stored Proc Row Counts
SELECT o.type_desc AS ROUTINE_TYPE
,QUOTENAME(s.[name]) + '.' + QUOTENAME(o.[name]) AS [OBJECT_NAME]
,(LEN(m.definition) - LEN(REPLACE(m.definition, CHAR(10), ''))) AS LINES_OF_CODE
,(LEN(m.definition... |
-- file:timestamptz.sql ln:112 expect:true
SELECT '205000-01-10 17:32:01 Europe/Helsinki'::timestamptz
|
<reponame>HariPrasad-1999/IBM-Data-Science-Professional-Certificate<gh_stars>0
-- Drop the table in case it exists
DROP TABLE PETSALE;
-- Create the table
CREATE TABLE PETSALE (
ID INTEGER NOT NULL,
ANIMAL VARCHAR(20),
SALEPRICE DECIMAL(6,2),
SALEDATE DATE,
QUANTITY INTEGER,
PRIMARY KEY (ID)
);
-- Insert sam... |
<filename>modules/core/db/init/hsql/10.create-db.sql
-- begin PETCLINIC_PET
create table PETCLINIC_PET (
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... |
<gh_stars>0
select *
from {{ var('event') }}
|
## 查找题目答案
#macro($indexGetQuestionAnswers(qid,qids))
SELECT * FROM answer WHERE 1=1
#if(qid)
AND question_id = :qid
#end
#if(qids)
AND question_id IN :qids
#end
ORDER BY sequence ASC
#end |
<filename>src/main/resources/db/migration/V1.12__Add_generate_url_to_retailer.sql<gh_stars>1-10
ALTER TABLE udccs.retailer ADD COLUMN generate_url VARCHAR(255);
|
<reponame>SKalt/pg_sql_parser_tests
CREATE FUNCTION multiout_simple_setof(n integer, OUT integer, OUT integer) RETURNS SETOF record AS $$
return [(1, 2)] * n
$$ LANGUAGE plpythonu;
SELECT * FROM multiout_simple_setof(3);
|
create table Offline_class
(Offline_class_key INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(32) NOT NULL UNIQUE,
config TINYINT NOT NULL DEFAULT '0'
COMMENT 'True (=1) if calib is set-up data; false if it is response info',
description VARCHAR(255) NOT NULL,
... |
<reponame>hyoungsookim/banzee<filename>database/mysql/schema objects/db_microtransaction/tables/mtt_tx_order_payments.sql
/*
Order Payments
*/
create table mtt_tx_order_payments
(
payment_no int not null auto_increment,
order_no int not null,
method_code varchar(10) not null,
payment_status sma... |
--DO NOT MODIFY THIS FILE, IT IS GENERATED AUTOMATICALLY FROM SOURCES
-- Complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "ALTER EXTENSION cdb_dataservices_server UPDATE TO '0.24.1'" to load this file. \quit
-- HERE goes your code to upgrade/downgrade
CREATE OR REPLACE FUNCTION cdb_dat... |
-- @testpoint:opengauss关键字Host(非保留),作为数据库名
--关键字不带引号-成功
drop database if exists Host;
create database Host;
drop database Host;
--关键字带双引号-成功
drop database if exists "Host";
create database "Host";
drop database "Host";
--关键字带单引号-合理报错
drop database if exists 'Host';
create database 'Host';
--关键字带反引号-合理报错
drop datab... |
<reponame>taojiaenx/tjeadbc<gh_stars>0
GRANT CREATE, SELECT, INSERT, DELETE, UPDATE, DROP ON adbcjtck.* TO adbcjtck@localhost IDENTIFIED BY 'adbcjtck';
DROP DATABASE IF EXISTS adbcjtck;
CREATE DATABASE adbcjtck; |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 02, 2020 at 07:00 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.3.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- MySQL dump 10.13 Distrib 5.7.25, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: fki-website
-- ------------------------------------------------------
-- Server version 5.7.26-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@C... |
<gh_stars>0
with images as (
select distinct on (depicts) id, depicts from media
where depicts is not null and deleted is null and
type in ('Photograph', 'Portrait', 'Image', 'LineDrawing')
order by depicts, preferred desc nulls last, media.id
), typologies as (
select distinct on (structure) structure, typol... |
IF OBJECT_ID('dbo.StagedTransactions', 'U') IS NULL
BEGIN
CREATE TABLE dbo.StagedTransactions
(
StagedTransactionId int IDENTITY(1, 1) NOT NULL,
BankAccountId int NOT NULL,
TransactionNo varchar(255) NOT NULL,
TransactionDate datetime NOT NULL,
TransactionDesc varchar(255) NOT NULL,
... |
SELECT COUNT(user_id)
FROM auction_users
WHERE rating > 1000 AND user_id IN (SELECT seller_id FROM items);
|
<gh_stars>0
select FirstName, LastName from Employees
where Left(FirstName, 2) = 'SA' |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.127.12
-- Generation Time: Mar 06, 2022 at 01:14 PM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 8.1.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... |
DROP VIEW IF EXISTS "public".testview;
|
<filename>INFO/Books Codes/Oracle Database 10g PLSQL/Code/Chapter10/UpdateCategoryStats.sql
/*
* UpdateCategoryStats.sql
* Chapter 10, Oracle10g PL/SQL Programming
* by <NAME>, <NAME> and <NAME>
*
* This script demonstrates a user defined triggers.
*/
REM UpdateCategoryStats.sql
REM This is an example of a DML tr... |
--Paper references Patent
CALL apoc.export.csv.query('MATCH(n:paper{doc_type:""})-[:REFERENCES]->(m:paper)
WHERE n.doi IS NOT NULL AND n.doi <> "" AND m.doi <> "" AND m.doc_type = "Patent"
RETURN n.doc_type, n.paper_id, n.doi, m.doc_type, m.paper_id, m.doi', 'paper_to_patent_MAG.csv', {});
--Patent references Paper... |
-- Script para criação de tabela no banco de dados Mysql
CREATE DATABASE db_4results;
USE db_4results;
CREATE TABLE tb_users (
id INT PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(50) NOT NULL,
email VARCHAR(80) NOT NULL,
u_password VARCHAR(32) NOT NULL
) COLLATE=utf8_unicode_ci;
INSERT INTO tb_use... |
create procedure [dbo].[dnn_DeleteSystemMessage]
@PortalID int,
@MessageName nvarchar(50)
as
delete
from dbo.dnn_SystemMessages
where PortalID = @PortalID
and MessageName = @MessageName
|
-- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64)
--
-- Host: localhost Database: supermercado
-- ------------------------------------------------------
-- Server version 5.7.12-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_... |
<reponame>SkillsFundingAgency/tl-result-and-certification
CREATE TABLE [dbo].[TqRegistrationPathway]
(
[Id] INT IDENTITY(1,1) NOT NULL,
[TqRegistrationProfileId] INT NOT NULL,
[TqProviderId] INT NOT NULL,
[AcademicYear] INT NOT NULL,
[StartDate] DATETIME NOT NULL,
[EndDate] DATETIME NULL,
[Status] INT NOT NUL... |
DROP TABLE IF EXISTS `XXX_papoo_linkliste_daten`; ##b_dump##
DROP TABLE IF EXISTS `XXX_papoo_linkliste_pref`; ##b_dump##
DROP TABLE IF EXISTS `XXX_papoo_linkliste_cat`; ##b_dump##
DROP TABLE IF EXISTS `XXX_papoo_linkliste_lang_cat`; ##b_dump##
DROP TABLE IF EXISTS `XXX_papoo_linkliste_daten_lang`; ##b_dump##
|
<gh_stars>1-10
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
/*
This script creates a readonly guest user, new tables will need permissions
manuall... |
-- +migrate Up
-- +migrate StatementBegin
create table blocked_entry (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
blocked_channel_id CHAR(40) DEFAULT NULL,
blocked_by_channel_id CHAR(40) DEFAULT NULL,
universally_blocked BOOL DEFAULT FALSE,
created_at D... |
CREATE SCHEMA IF NOT EXISTS olympus;
BEGIN;
DROP materialized VIEW IF EXISTS olympus.treasury_rfv;
create materialized view olympus.treasury_rfv as
with time as
(
SELECT
generate_series('2021-03-23 00:00', NOW(), '1 day'::interval) as Date
),
treasury_dai AS
(
SELECT
evt_block_time as Date,
-e.value/1e1... |
<gh_stars>10-100
CREATE TABLE subdivision_BE (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_BE` (`id`, `name`, `level`) VALUES ('BE-VAN', 'Anversa', 'province');
INSERT INTO `... |
ALTER TABLE "public"."transactions" ADD COLUMN "type" text NOT NULL;
|
<filename>src/hg/lib/cnpSharp2.sql
# cnpSharp2.sql was originally generated by the autoSql program, which also
# generated cnpSharp2.c and cnpSharp2.h. This creates the database representation of
# an object which can be loaded and saved from RAM in a fairly
# automatic way.
#CNP data from Sharp lab
CREATE TABLE cn... |
<gh_stars>100-1000
-- original: win32longpath.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
BEGIN EXCLUSIVE;
CREATE TABLE t1(x);
INSERT INTO t1 VALUES(1);
INSERT INTO t1 VALUES(2);
INSERT INTO t1 VALUES(3);
INSERT INTO t1 VALUES(4);
SELECT x FROM t1 ORDER BY x;
COMMIT
... |
CREATE UNIQUE INDEX UNQ_MODULE_ACTION_CODE ON NOTIFICATION_TYPE (MODULE_CODE, ACTION_CODE); |
<gh_stars>1-10
-- POCOR-3672
-- system_patches
INSERT INTO `system_patches` (`issue`, `created`) VALUES ('POCOR-3672', NOW());
-- security_user_logins
ALTER TABLE `security_user_logins`
ADD COLUMN `session_id` VARCHAR(45) NULL AFTER `login_date_time`,
ADD COLUMN `ip_address` VARCHAR(45) NULL AFTER `session_id`;
-- si... |
-- Revert cbv_type
BEGIN;
DROP TYPE IF EXISTS cbv;
COMMIT;
|
DROP DATABASE IF EXISTS arcade_db;
CREATE DATABASE arcade_db; |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 27, 2020 at 10:10 PM
-- 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";
/*!40... |
/**
Add extensions
*/
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
/**
Create table for domains
*/
CREATE TABLE IF NOT EXISTS transactions (
id uuid DEFAULT uuid_generate_v4 () PRIMARY KEY,
name VARCHAR(255) NOT NULL,
description TEXT NULL,
category VARCHAR(50) NOT NULL,
amount DECIMAL NOT NULL,
withdrawn B... |
<reponame>christophanneser/Bao-for-Presto<filename>queries/stackoverflow/q13/210303a2b0422312dfe5c33223595396e4ec610e.sql<gh_stars>0
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.si... |
<gh_stars>0
CREATE UNLOGGED TABLE no_autovacuum (
id serial PRIMARY KEY,
name varchar(32)
) WITH (AUTOVACUUM_ENABLED = FALSE)
|
create table project (
project_id integer primary key,
project_code text,
project_name text,
pi text,
institution text,
project_type text,
description text,
unique(project_code)
);
create table sample (
sample_id integer primary key,
project_id integer,
sample_acc text,
... |
set serveroutput on echo on
set lines 120
begin
dbms_ra.copy_backup('&1','&1' || '_%t_%U','PRODUCTION_COPY-TO-TAPE');
end;
/
|
<gh_stars>1-10
USE %s;
LOAD DATA LOCAL INFILE '%s'
INTO TABLE continentCodes
CHARACTER SET 'UTF8MB4'
FIELDS TERMINATED BY ','
(code, name, geonameId);
|
<gh_stars>10-100
-- file:arrays.sql ln:383 expect:true
insert into arr_tbl values ('{1,2,3}')
|
<reponame>ogobrecht/sample-data-sets-for-oracle
prompt - trigger oehr_update_job_history
create or replace trigger oehr_update_job_history
after update of job_id, department_id on oehr_employees
for each row
begin
insert into oehr_job_history (
employee_id,
start_date,
end_date,
job_id,
... |
drop table if exists t_service;
drop table if exists t_rate;
create table t_service (
id uuid,
name varchar(20)
);
create table t_rate (
date_from date,
date_to date,
currency int,
service_id uuid
);
insert into t_service (id, name) values
('386f2c7f-3988-438b-af21-fb3562330ac5', 'Service1'),
('03a906a4-9... |
<gh_stars>0
-- source
CREATE TABLE player_source (
player_id BIGINT,
team_id BIGINT,
player_name VARCHAR,
height DOUBLE
) WITH (
'connector.type' = 'filesystem',
'connector.path' = 'file:///Users/chenshuai1/github/flink-sql-submit/src/main/resources/player.csv',
'format.type' = 'csv',
'format.fields.0.n... |
CREATE VIEW [Metadata].[vUserTableColumn] as
select
*
from
Metadata.vTableColumn
where
IsUserDefined = 1
|
CREATE DATABASE IF NOT EXISTS `test` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `test`;
CREATE TABLE IF NOT EXISTS `GHSNV` (
`RecordId` bigint(20) NOT NULL AUTO_INCREMENT,
`SampleId` varchar(255) DEFAULT NULL,
`RunId` varchar(255) DEFAULT NULL,
`Gene` varchar(255) DEFAULT NULL,
`Mutation_AA` v... |
DROP TABLE IF EXISTS test.enum;
CREATE TABLE test.enum (x Enum8('Hello' = -100, '\\' = 0, '\t\\t' = 111), y UInt8) ENGINE = TinyLog;
INSERT INTO test.enum (y) VALUES (0);
SELECT * FROM test.enum ORDER BY x, y FORMAT PrettyCompact;
INSERT INTO test.enum (x) VALUES ('\\');
SELECT * FROM test.enum ORDER BY x, y FORMAT Pr... |
ALTER TABLE datasets
DROP COLUMN banner,
DROP COLUMN readme;
|
<gh_stars>1000+
ALTER TABLE {$NAMESPACE}_daemon.daemon_log
ADD runningAsUser VARCHAR(255) COLLATE {$COLLATE_TEXT};
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: mysql
-- Generation Time: Sep 08, 2021 at 03:08 AM
-- Server version: 10.5.8-MariaDB-1:10.5.8+maria~focal-log
-- PHP Version: 7.4.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
# ************************************************************
# Sequel Pro SQL dump
# Version 5446
#
# https://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.5.5-10.4.19-MariaDB)
# Database: aspra_v1_2019
# Generation Time: 2021-09-06 03:56:17 +0000
# *************************... |
<gh_stars>0
CREATE TABLE `siemprea_bspi_gestion_hospitalaria`.`hospital_farmacia` (
`HOSP_FARM_COD` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`HOSPITAL_COD` BIGINT UNSIGNED NOT NULL,
`FARMACIA_COD` BIGINT UNSIGNED NOT NULL,
`HOSP_FARM_LOGIC_ESTADO` CHAR(2) NOT NULL,
`US_COD_CREATED_UPDATED` VARCHAR(10) NOT NUL... |
--título 72653-1
--
SELECT
cp.COMPL_HISTORICO
, cp.*
FROM CPAG_010 cp
WHERE 1=1
-- AND cp.DOCUMENTO = 72653
-- AND cp.COMPL_HISTORICO LIKE '%L%'
;
SELECT
cp.COMPL_HISTORICO
, cp.*
FROM CPAG_010 cp
--WHERE cp.COMPL_HISTORICO LIKE '%L%'
;
-- Ops! Não é a pagar e a receber
SELECT
bol.COMPL_HISTORICO
, bol.*
FR... |
<reponame>pedroroque/DigitalBroadcaster
CREATE VIEW [dbo].[ViewOnAirSponsors]
AS
SELECT dbo.Sponsors.SpotID, dbo.Sponsors.StartingDate,
dbo.Sponsors.EndingDate,
Broadcaster.dbo.Spots.Name AS SpotName,
Broadcaster.dbo.Customers.Name AS CustomerName,
Broadcaster.dbo.Spots.Finish - Broadcaster.dbo.Sp... |
<gh_stars>0
CREATE NONCLUSTERED INDEX [IX_Flights_Deleted_PilotBackseatId_StartTypeId] ON[dbo].[Flights]([Deleted], [PilotBackseatId], [StartTypeId]) INCLUDE([BetalerId], [Date], [Departure], [Description], [FlightCost], [HasTrainingData], [LandedOnId], [Landing], [LandingCount], [LastUpdated], [LastUpdatedBy], [Pilot... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.