sql stringlengths 6 1.05M |
|---|
-- View: m_inout_header_vt
--DROP VIEW m_inout_header_vt;
CREATE OR REPLACE VIEW m_inout_header_vt AS
SELECT io.ad_client_id, io.ad_org_id, io.isactive, io.created, io.createdby, io.updated, io.updatedby, dt.ad_language, io.m_inout_id,
io.issotrx, io.documentno, io.docstatus, io.c_doctype_id, io.c_bpartner_id, bp.v... |
INSERT INTO phenotype_parameter
(id, stable_id, db_id, name, description, major_version, minor_version, unit, datatype, parameter_type, formula, required, metadata, important, derived, annotate, increment, options, sequence, media, data_analysis_notes, stable_key)
VALUES
(8, 'IMPC_BWT_008_001', 6, 'Body weigh... |
CREATE TABLE T_BRAND
(
BRAND_ID INT AUTO_INCREMENT PRIMARY KEY,
NAME VARCHAR(50) NOT NULL
); |
<reponame>lbouma/Cyclopath
/* Copyright (c) 2006-2012 Regents of the University of Minnesota.
For licensing terms, see the file LICENSE. */
/* This script creates the Point table. */
BEGIN TRANSACTION;
SET CONSTRAINTS ALL DEFERRED;
/** Point tables **/
CREATE TABLE point_type (
code INT PRIMARY KEY,
draw_cl... |
DROP TABLE IF EXISTS lineitem;
CREATE TABLE lineitem
(
l_orderkey Int32, -- PK(1), FK o_orderkey
l_partkey Int32, -- FK ps_partkey
l_suppkey Int32, -- FK ps_suppkey
l_linenumber Int32, -- PK(2)
l_quantity Decimal(18,2),
l_extendedprice Decimal(18,2),
l_discount ... |
<reponame>khuddlefish/gpdb
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
--
-- CT CO TABLE 1
--
create table ct_co_alter_part_split_partlist1 (i int) with ( appendonly='true', orientation='column') partition by list(i) (partition a values(1, 2, 3, 4),
partition b values(5, 6, 7, 8)... |
<gh_stars>0
-- MariaDB dump 10.19 Distrib 10.4.21-MariaDB, for Win64 (AMD64)
--
-- Host: localhost Database: sigvac
-- ------------------------------------------------------
-- Server version 10.4.21-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@... |
<reponame>amandalima/gerador-certificados
ALTER TABLE usuario
DROP CONSTRAINT perfil_user_fk;
DROP TABLE feature_toogle;
DROP TABLE certificado;
DROP TABLE rel_participante_evento;
DROP TABLE evento;
DROP TABLE rel_permissao_perfil;
DROP TABLE permissoes;
DROP TABLE perfil;
DROP TABLE usuario; |
<reponame>railsstudent/nest-course-graphql
/*
Warnings:
- The migration will add a unique constraint covering the columns `[name,courseId]` on the table `lesson`. If there are existing duplicate values, the migration will fail.
*/
-- DropIndex
DROP INDEX "lesson.name_unique";
-- AlterTable
ALTER TABLE "course" A... |
create table if not exists longnames (
tsn int(11) not null,
completename varchar(164) not null,
primary key(tsn)
);
create table if not exists synonym_links (
tsn int(11) not null,
tsn_accepted int(11) not null,
primary key(tsn,tsn_accepted)
); |
<filename>week1/b12.sql
select count(*) from film where length > (select avg(length) from film);
select count(*) from film where rental_rate = (select max(rental_rate) from film);
select count(*) from film where rental_rate = (select min(rental_rate) from film) and replacement_cost = (select min(replacement_cost) fro... |
<reponame>yavoryankov83/Java_Web_Telerik_Academy_Alpha_May_2019
use northwind;
/*SELECT*/
-- select all employees
-- select all employee names; use alias for both tables and columns
-- select all job titles; get them uniquely
-- select all employees that work as coordinators, 'Sales Coordinator'
-- select all... |
-- Complain if script is sourced in psql, rather than by CREATE EXTENSION
\echo Use "CREATE EXTENSION tag_parser" to load this file \quit
-- Yoink out our phat functions
CREATE FUNCTION tagpsr_start(internal, int4)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION tagpsr_gettoken(inte... |
<gh_stars>1-10
-- CREATE DATABASE IF NOT EXISTS fiona_pet_business DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
-- ----------------------------
-- Table structure for t_dealer 经销商
-- ----------------------------
DROP TABLE IF EXISTS `t_dealer`;
CREATE TABLE `t_dealer` (
`id` VARCHAR(36) NOT NULL,
`code` varc... |
-- id name surname phone address
INSERT INTO client VALUES (default, 'Дмитро', 'Урин', '+380667962610', 'м. Київ');
INSERT INTO client VALUES (default, 'Петро', 'Іваненко', '+380669967832', 'м. Харків');
INSERT INTO client VALUES (default, 'Василь', 'Степаненко', '+380664562536', 'м. Дніпро');
-- id, name
INSERT INTO ... |
DROP TABLE IF EXISTS products;
CREATE TABLE products(
`id` int(11) NOT NULL AUTO_INCREMENT,
`nocCode` varchar(10) NOT NULL,
`matchingJsonLink` varchar(255) NOT NULL,
`lineId` varchar(100) NOT NULL,
`dateModified` datetime NOT NULL,
`fareType` varchar(20) NOT NULL,
`startDate` datetime NOT N... |
<reponame>relsna/sql-docs<filename>docs/t-sql/queries/codesnippet/tsql/select-examples-transact_16.sql<gh_stars>100-1000
USE AdventureWorks2012;
GO
SELECT AVG(OrderQty) AS [Average Quantity],
NonDiscountSales = (OrderQty * UnitPrice)
FROM Sales.SalesOrderDetail
GROUP BY (OrderQty * UnitPrice)
ORDER BY (OrderQty * Unit... |
<reponame>richdawe/webhookotron
SELECT * FROM webhookotron_events WHERE msg_from LIKE <EMAIL>';
|
<filename>src/main/resources/schema.sql<gh_stars>1-10
create table example (
id uuid not null,
create_timestamp timestamp DEFAULT CURRENT_TIMESTAMP not null,
update_timestamp timestamp DEFAULT CURRENT_TIMESTAMP not null,
age int4,
height numeric,
name text,
pr... |
DO
$$
BEGIN
IF NOT EXISTS (SELECT 1 FROM information_schema.columns
WHERE table_schema = current_schema
AND table_name = 'firmware'
AND column_name = 'identification') THEN
ALTER TABLE ONLY firmware ADD COLUMN identification character varying(100);
UPDATE firmware SET identification = md5(ra... |
<gh_stars>0
update resource set date_updated = default, dirty = false where id = ANY($1);
|
<reponame>LasseWolter/clowdr<gh_stars>10-100
alter table "public"."RequiredContentItem" drop constraint "RequiredContentItem_contentGroupId_fkey",
add constraint "RequiredContentItem_contentGroupId_fkey"
foreign key ("contentGroupId")
references "public"."ContentGroup"
("id")
... |
<filename>config/scripts/schema/migrations/2013-04-30 - assignment summative.sql
ALTER TABLE ASSIGNMENT
ADD SUMMATIVE NUMBER(1, 0);
UPDATE ASSIGNMENT SET SUMMATIVE = 1 where SUMMATIVE IS NULL;
ALTER TABLE ASSIGNMENT
MODIFY (SUMMATIVE DEFAULT 1);
ALTER TABLE ASSIGNMENT
MODIFY (SUMMATIVE NOT NULL);
|
<reponame>LarsVonQualen/cheetah
CREATE TABLE [dbo].[PasswordHashes] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[UserId] UNIQUEIDENTIFIER NOT NULL,
[Hash] NVARCHAR (MAX) NOT NULL,
[CreatedAt] DATETIME NOT NULL,
CONSTRAINT [PK_PasswordHashes_Id] PRIMARY KEY CLUSTERED (... |
USE GLVOnAir2019_02;
GO
-- drop column
ALTER TABLE dbo.SpeakersSessions DROP COLUMN SessionTime;
GO
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Gegenereerd op: 03 nov 2020 om 15:18
-- Serverversie: 5.7.24
-- PHP-versie: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- MySQL Script generated by MySQL Workbench
-- Tue Feb 4 13:37:50 2020
-- 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_SQL_MODE=@@SQL_MODE, SQL_MODE='ON... |
-- CreateEnum
CREATE TYPE "Currency" AS ENUM ('NOK');
-- AlterTable
ALTER TABLE "Account" ADD COLUMN "currency" "Currency" NOT NULL DEFAULT E'NOK';
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.5
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost
-- Généré le : lun. 06 nov. 2017 à 15:58
-- Version du serveur : 5.7.20-0ubuntu0.16.04.1
-- Version de PHP : 7.0.22-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION... |
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 20, 2018 at 09:59 AM
-- Server version: 5.7.9
-- PHP Version: 5.6.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... |
<gh_stars>0
create table if not exists USER (user_id int primary key,
first_name varchar(50),
last_name varchar(50),
adhar_no varchar(20),
gender enum('m','f'),
age tinyint,
mobile_no varchar(12),
email varchar(50),
city varchar(50),
state varchar(50),
pincode varchar(6),
_password varchar(50),
security_q... |
<reponame>biozid-0208/daily-random-programming-commit
# Write your MySQL query statement below
select email as 'Email'
from Person p
group by email
having count(email)>1 |
-- CreateTable
CREATE TABLE `users` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
`updated_at` DATETIME(3) NOT NULL,
`email` VARCHAR(191) NOT NULL,
`firstname` VARCHAR(191) NOT NULL,
`lastname` VARCHAR(191) NOT NULL,
`password` VARCHA... |
DECLARE @var INT
DECLARE @var2 VARCHAR(100)
CREATE TABLE test
(
id INT NOT NULL,
stringval CHAR(20) NULL,
PRIMARY KEY (id),
CONSTRAINT FK_foreignkey
FOREIGN KEY (stringval)
REFERENCES other_table (sringval)
)
GO
;
WITH (
SELECT id, value
FROM table
)
SELECT table.column, colum... |
<gh_stars>1-10
// Exemplo 5: - “Criação da tabela departamento”
create table departamento (
codDep integer not null,
nomeDep varchar2(20) UNIQUE
);
|
-- MySQL dump 10.13 Distrib 5.7.22, for Linux (x86_64)
--
-- Host: localhost Database: economizzer
-- ------------------------------------------------------
-- Server version 5.7.22-0ubuntu18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_... |
Insert into EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) values (NEXTVAL('SEQ_EG_ACTION'),'WorksAddEstimateTemplateToEstimate','/estimate/estimateTemplate-search.action','sourcePage=searchForEstimat... |
/*
Navicat MySQL Data Transfer
Date: 2019-04-29 11:18:50
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for pc_major
-- ----------------------------
DROP TABLE IF EXISTS `pc_major`;
CREATE TABLE `pc_major` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`en` varchar(255) NOT NULL DEFAULT ... |
<reponame>john-auld/sqitch
ALTER TABLE :"registry".changes DROP CONSTRAINT c_unique;
ALTER TABLE :"registry".changes ADD UNIQUE(project, script_hash);
COMMENT ON SCHEMA :"registry" IS 'Sqitch database deployment metadata v1.1.';
|
-- original: pagerfault.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
PRAGMA cache_size = 10;
BEGIN EXCLUSIVE
;PRAGMA page_size = 512;
PRAGMA journal_mode = wal;
PRAGMA wal_autocheckpoint = 0;
PRAGMA cache_size = 100000;
BEGIN;
CREATE TABLE t2(a UNIQUE, b UNIQUE);
... |
<reponame>dram/metasfresh<filename>backend/de.metas.serviceprovider/src/main/sql/postgresql/system/45-de.metas.serviceprovider/5558160_sys_gh5816-app_update_unique_indexes_to_consider_isActive.sql
-- 2020-04-28T15:19:02.739Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Index_Table SET Whe... |
--
-- Table structure for table `account_pass`
--
DROP TABLE IF EXISTS `account_pass`;
CREATE TABLE `account_pass` (
`id` bigint(20) unsigned NOT NULL auto_increment COMMENT 'Identifier',
`username` varchar(16) NOT NULL default '',
`password` varchar(28) NOT NULL default '',
`email` varchar(255) NOT N... |
<reponame>ggreen/cloudNativeData
drop table if exists product;
create table product (
productId int,
productName text,
categoryId int,
subCategoryId int,
unit numeric default NULL,
cost numeric default NULL,
price numeric default NULL,
startDate date default NULL,
endDate date default NULL,
createdD... |
insert into sys.parameters(id,available,description,label, "type", "value") values (1000, true, 'default language', 'default language', 0,'en');
insert into i18n.languages(id, iso_language, name) values (nextval('i18n.seq_languages'), 'en', 'English US');
-- Also add Spanish
insert into i18n.languages(id, iso_language... |
<reponame>epmd-edp/admin-console<gh_stars>1-10
drop sequence if exists cd_pipeline_id_seq; |
{%- macro get_test_results(results_sample_limit = 5) -%}
{% set select_test_results %}
with elemetary_test_results as (
select * from {{ ref('elementary', 'elementary_test_results') }}
),
tests_in_last_30_days as (
select *,
{{ dbt_utils.datediff(el... |
<reponame>Asterionworld/ether
BEGIN;
ALTER TABLE assets change id oldid varchar(36);
ALTER TABLE assets add id char(36) not null default '00000000-0000-0000-0000-000000000000';
UPDATE assets set id = oldid;
ALTER TABLE assets drop oldid;
ALTER TABLE assets add constraint primary key(id);
COMMIT; |
DROP TABLE "public"."Email";
|
-- @testpoint:opengauss关键字performance(保留),作为字段数据类型(合理报错)
--前置条件
drop table if exists performance_test cascade;
--关键字不带引号-合理报错
create table performance_test(id int,name performance);
--关键字带双引号-合理报错
create table performance_test(id int,name "performance");
--关键字带单引号-合理报错
create table performance_test(id int,name 'pe... |
<reponame>opengauss-mirror/Yat<gh_stars>0
-- @testpoint:opengauss关键字where(保留),作为游标名
--前置条件
drop table if exists where_test cascade;
create table where_test(cid int,fid int);
--关键字不带引号-失败
start transaction;
cursor where for select * from where_test order by 1;
close where;
end;
--关键字带双引号-成功
start transaction;
cursor... |
<reponame>jeanrjm/HotelBackend
CREATE DATABASE IF NOT EXISTS hotel;
use hotel;
CREATE TABLE IF NOT EXISTS hospedes (
id SERIAL,
nome varchar(255) NOT NULL UNIQUE,
documento varchar(255) NOT NULL UNIQUE,
telefone varchar(255) NOT NULL,
PRIMARY KEY (id));
CREATE TABLE IF NOT EXISTS hospedagem (
id SERI... |
<gh_stars>0
ALTER TABLE `applications` ADD `app_name` VARCHAR(128) DEFAULT NULL;
|
<filename>queries/stackoverflow/q13/f2ab079a8fb5e5a6e7a58bd8d21e8b47b4811044.sql
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.... |
/* leave this
l:see LICENSE file
g:utility
v:091022\s.zaglio: better view
v:080815\S.Zaglio: reformat a string that containt sql code
t:
begin
declare @s nvarchar(500)
set @s='select a, b, c, from '+char(13)+char(10)+' table'
set @s=dbo.fn__... |
-- 공지사항 테이블
CREATE TABLE adm_notice (
noti_no number(38) primary key
,noti_title varchar2(500) not null
,noti_name varchar2(500) not null
,noti_pwd varchar2(100) not null
,noti_cont varchar2(4000) not null
,noti_hit number(38) default 0
,noti_date date
);
CREATE SEQUENCE noti_no_seq
START W... |
-- 180. Consecutive Numbers
SELECT DISTINCT l1.Num as ConsecutiveNums
FROM Logs l1 JOIN Logs l2 on l1.Id + 1 = l2.Id
JOIN Logs l3 on l2.Id + 1 =l3.Id
WHERE l1.Num = l2. Num AND l2.Num = l3.Num |
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 06, 2015 at 11:36 AM
-- Server version: 5.6.25
-- PHP Version: 5.5.26-1+deb.sury.org~trusty+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... |
<reponame>SQLauto/DBA-database-1
CREATE TABLE [dbo].[IndexUsageStatsHistory]
(
[Id] [int] NOT NULL IDENTITY(1, 1) NOT FOR REPLICATION,
[server_name] [sys].[sysname] NOT NULL,
[database_id] [sys].[sysname] NOT NULL,
[database_name] [sys].[sysname] NOT NULL,
[schema_name] [sys].[sysname] NOT NULL,
[object_id] [int] NOT N... |
CREATE INDEX IF NOT EXISTS index_eg_pt_property_audit_audituuid ON eg_pt_property_audit (audituuid); |
ALTER TABLE qa_environments ADD COLUMN event_ids uuid[] DEFAULT '{}';
UPDATE qa_environments
SET event_ids = array(
SELECT id FROM event_logs WHERE qa_environments.name = event_logs.env_name
); |
<reponame>thylacine/websub-hub
--
UPDATE subscription SET
delivery_attempts_since_success = delivery_attempts_since_success + 1,
delivery_next_attempt = strftime('%s', 'now') + :nextAttemptDelaySeconds
WHERE
topic_id = :topicId AND callback = :callback
|
create database gh54;
|
<reponame>dpom/dbtools
-- create test1 table
DROP TABLE IF EXISTS test1;
CREATE TABLE test1
(
id character varying(75) NOT NULL,
comments character varying(75) NOT NULL,
CONSTRAINT test1_pkey PRIMARY KEY (id)
)
WITH (
OIDS=FALSE
);
-- create-test1 ends here
|
<reponame>Pivotal-Data-Engineering/greenplum-5-introduction-workshop<filename>workshop-exercises/Workshop/AdvancedTopics/PXF/providers.sql
/* *******************************************************************************************************
Copyright (C) 2019-Present Pivotal Software, Inc. All rights reserved.
Thi... |
<reponame>j-fish/cetcal<filename>database/MAJ_cetcal/20210205___insert-communes-geoloc_positionstack_05022021.sql
-- MySQL dump 10.17 Distrib 10.3.25-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: cetcal
-- ------------------------------------------------------
-- Server version 10.3.25-Mari... |
<reponame>foolite/panda
DROP TABLE TEST;
CREATE TABLE TEST (
ID INTEGER NOT NULL PRIMARY KEY,
FBIT CHAR(1),
FBOOL CHAR(1),
FCHAR CHAR(1),
FSTR VARCHAR(80),
FTINYINT SMALLINT,
FSMALLINT SMALLINT,
FINTEGER INTEGER,
FBIGINT BIGINT,
... |
<reponame>devrabbititsol/DEI
-- MySQL dump 10.13 Distrib 5.7.19, for Linux (x86_64)
--
-- Host: localhost Database: dei_db
-- ------------------------------------------------------
-- Server version 5.7.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@C... |
-- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 1172.16.58.3
-- Tiempo de generación: 02-05-2020 a las 13:00:40
-- Versión del servidor: 10.1.31-MariaDB
-- Versión de PHP: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00... |
<reponame>eduardaarosaa/SiteHosie
-- --------------------------------------------------------
-- Servidor: localhost
-- Versão do servidor: 5.7.24 - MySQL Community Server (GPL)
-- OS do Servidor: Win64
-- HeidiSQL Versão: 10.2.0.5599
-- -------------------------... |
<reponame>DocGreenRob/DB_Advanced
SP_HELP PHYSICAL_ENTRY
-------------------() put in #TempTable because we can not use joins when PIVOTing
GO
SELECT * FROM
(
SELECT
pe.PHYSICAL_ENTRY_ID
, pe.START_TIME
, pe.END_TIME
, pe.REPS
, pe.[WEIGHT]
, pe.DISTANCE
, ex.EXERCISE
, ex.BODY_PART
FROM PHYSICAL_ENTRY pe
JOI... |
<filename>ci4app.sql
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.4.21-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 11.3.0.6295
-- --------------------------... |
-- sc: https://ru.hexlet.io/courses/rdb-basics/lessons/2nf/exercise_unit
-- В базе данных содержится таблица old_cars, в которой составной первичный ключ: model-brand.
-- model brand price discount
-- m5 bmw 5500000 5
-- almera nissan 5500000 10
-- x5m bmw 6000000 5
-- m1 bmw 2500000 5
-- gt-r nissan 5000000 1... |
<filename>data/pizza.sql
SET FOREIGN_KEY_CHECKS=0;
START TRANSACTION;
DROP TABLE IF EXISTS `pizza`;
CREATE TABLE IF NOT EXISTS `pizza` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
`image` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`pos` i... |
CREATE TABLE [dbo].[AzureAdminSubscriptionRegionMapping](
[Id] [int] IDENTITY (1, 1) NOT NULL,
[PlanId] [nvarchar](50) NOT NULL,
[AzureRegionId][int] NOT NULL,
[IsActive][bit] NOT NULL
CONSTRAINT [PK_AzureAdminSubscriptionRegionMapping] PRIMARY KEY CLUSTERED ([Id] ASC)) |
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','283','137','1.02','1.02','... |
<reponame>Shuttl-Tech/antlr_psql
-- file:create_index.sql ln:963 expect:true
EXPLAIN (COSTS OFF)
SELECT count(*) FROM dupindexcols
WHERE f1 BETWEEN 'WA' AND 'ZZZ' and id < 1000 and f1 ~<~ 'YX'
|
CREATE TABLE "position"
(
id bigint NOT NULL,
name VARCHAR(255) NOT NULL,
CONSTRAINT position_pkey PRIMARY KEY (id),
CONSTRAINT position_name_key UNIQUE (name)
);
CREATE TABLE priveledge
(
id bigint NOT NULL,
name VARCHAR(255),
CONSTRAINT priveledge_pkey PRIMARY KEY (id)
);
CREATE TABLE employee
(
id ... |
/*
<documentation>
<summary>Disable and enable again all triggers in database</summary>
<returns>nothing.</returns>
<issues>No</issues>
<author><NAME></author>
<created>2019-08-20</created>
<modified>2019-08-26 by <NAME></modified>
<version>1.0</version>
<sourceLink>https://github.com/ktaranov/sqlserver... |
BEGIN
SELECT 'Weekend';
END
BEGIN;
SELECT 'Weekend';
END;
BEGIN;
SELECT 'Weekend';
END
BEGIN
SELECT 'Weekend';
END;
|
ALTER TABLE [Notification].[Producer]
DROP COLUMN [CountryId];
ALTER TABLE [Person].[AddressBookRecord]
DROP COLUMN [CountryId]; |
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80013
Source Host : localhost:3306
Source Schema : chengshidanao_core
Target Server Type : MySQL
Target Server Version : 80013
File Encoding : 65001
Date: 21... |
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Czas generowania: 28 Gru 2015, 18:26
-- Wersja serwera: 5.6.21
-- Wersja PHP: 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 */;
/*!401... |
CREATE USER chembl password '<PASSWORD>';
GRANT SELECT ON ALL TABLES IN SCHEMA public TO chembl; |
<filename>goci-core/goci-db-binding/src/main/resources/db/migration/V2.2.0_010__Add_preliminary_review_done.sql
/*
################################################################################
Migration script to add the curation status 'Preliminary review done'
author: <NAME>
date: 18th Nov 2016
version: 2.2.... |
<reponame>karthikrameskum/motech
DROP TABLE IF EXISTS RestDocs; |
<gh_stars>0
-- @testpoint:opengauss关键字declare(非保留),作为外部数据源名
--关键字不带引号-成功
drop data source if exists declare;
create data source declare;
drop data source declare;
--关键字带双引号-成功
drop data source if exists "declare";
create data source "declare";
drop data source "declare";
--关键字带单引号-合理报错
drop data source if exists 'd... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 28 Jun 2019 pada 02.44
-- Versi server: 10.1.38-MariaDB
-- Versi PHP: 7.3.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
-- Adminer 4.8.1 MySQL 5.7.33 dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
SET NAMES utf8mb4;
DROP TABLE IF EXISTS `camvs`;
CREATE TABLE `camvs` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci... |
INSERT INTO PEMINJAMAN VALUES
('6518856692','2018-08-28 1:17','9844768449','4925129139',NULL,NULL,NULL),
('1317810448','2018-04-05 21:59','1681512228','1357777809','2018-04-06 0:48',3000,NULL),
('6237746507','2018-08-02 13:07','9410437745','5131629586','2018-08-02 1:24',10000,100000),
('8407388522','2018-11-14 17:25','... |
/*
Warnings:
- You are about to drop the `FAQ` table. If the table is not empty, all the data it contains will be lost.
- You are about to drop the `Plan` table. If the table is not empty, all the data it contains will be lost.
- You are about to drop the `Question` table. If the table is not empty, all the da... |
CREATE DEFINER=`b<PASSWORD>`@`%` PROCEDURE `SP_SEL_USER_BY_EMAIL_PASSWORD`(
IN p_email VARCHAR(50),
IN p_password CHAR(8)
)
BEGIN
SELECT idUser
FROM user a
WHERE a.Email = p_email
AND a.Password = <PASSWORD>;
END |
DROP TABLE IF EXISTS location;
|
CREATE TABLE `block_replica_sizes` (
`block_id` bigint(20) unsigned NOT NULL,
`site_id` int(10) unsigned NOT NULL,
`num_files` int(11) NOT NULL DEFAULT '0',
`size` bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (`block_id`,`site_id`),
KEY `sites` (`site_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 CHECKSUM=1;
|
<filename>src/test/resources/sql/insert/7d7a1d31.sql
-- file:numeric_big.sql ln:333 expect:true
INSERT INTO num_exp_sub VALUES (7,4,'-5329379094878203394060987.2493176598763042962983638218474234835392029728369073912422077395559134070993597006277665020465918776458161559772079838501594238976569276973998305444250354721156... |
create table T(A integer);
create table U(A integer);
insert into T values(1);
insert into T values(3);
insert into T values(5);
insert into U values(1);
insert into U values(2);
select * from T except select * from U;
select * from U except select * from T;
|
<filename>security/src/main/resources/sql/user/user.sql<gh_stars>0
#sql("login")
select * from user
where account = #para(account) and password = #para(password) and is_deleted = 0
#end
#sql("get")
select * from user where id = #para(id)
#end
#sql("list")
select * from user
where id > 1 and is_deleted = 0
#if(notBla... |
-- Solution to [Average Population](https://www.hackerrank.com/challenges/average-population)
SELECT
FLOOR(AVG(POPULATION))
FROM
CITY
; |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 14, 2021 at 01:44 PM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 8.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<filename>Industria/SQL/dados.sql
insert into produto (id_produto, id_tipo_produto, id_medida, id_receita_ativa, id_lista_ativa, descricao, cx_fechada) values
(1, 1, 1, 1, 1, '<NAME>', 50),
(2, 1, 1, 2, 2, '<NAME>', 50),
(3, 1, 1, 3, 3, '<NAME>', 50),
(4, 1, 1, 4, 4, '<NAME>', 50),
(5, 1, 1, 5, 5, '<NAME>', 50),
... |
<filename>modules/core/db/update/hsql/19/190125-2-composition-create-address-foreign-keys.sql
alter table PETCLINIC_ADDRESS add constraint FK_PETCLINIC_ADDRESS_OWNER foreign key (OWNER_ID) references PETCLINIC_OWNER(ID);
create index IDX_PETCLINIC_ADDRESS_OWNER on PETCLINIC_ADDRESS (OWNER_ID);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.