sql stringlengths 6 1.05M |
|---|
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 21 Apr 2021 pada 13.30
-- Versi server: 10.4.17-MariaDB
-- Versi PHP: 7.4.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
DECLARE @Year int = 2019
DECLARE @ECNumber varchar(20) = '35117'
-- Create table of all candidates in @Year with their votes
DROP TABLE IF EXISTS #Candidates
SELECT
e.ECNumber,
c.CandidateLastName,
p.PartyNameEn,
sum(pr.Votes) as Votes
INTO #Candidates
from PollResult pr
inner join poll po on po.pollid=pr.pollid... |
DELETE FROM dob_permits WHERE geom is null;
|
-- file:date.sql ln:230 expect:true
SELECT EXTRACT(CENTURY FROM DATE '0100-12-31 BC')
|
<reponame>srahn/kvwmap<filename>plugins/xplankonverter/db/postgresql/schema/2021-06-11_14-39-40_fix_function_rechtsstand_validation.sql
BEGIN;
-- Nach Email Projekt 2021-06-11
/*Für den Rechtsstand 3000 gilt:
Planstatus ist 3000 und Pflicht ist Datum des Satzungsbeschlusses.
Für Rechtskraft gilt: Rechtsstand 4000 oder... |
select count(*) from j2 where d18 not in ( select d18 from j3) ;
|
<filename>src/DLTGatewaySolution/Database/CertiPath.BlockChainGateway.Database/dbo/Tables/ChartType.sql
CREATE TABLE [dbo].[ChartType]
(
[GUID] UNIQUEIDENTIFIER NOT NULL PRIMARY KEY,
[Name] NVARCHAR(50) NOT NULL,
[Code] NVARCHAR(50) NOT NULL,
[ChartCategoryGUID] UNIQUEIDENTIFIER NOT NULL,
[D... |
<reponame>Gymnasiast/Cyndaron
ALTER TABLE `ticketsale_concerts` ADD `deliveryCostInterface` VARCHAR(255) NOT NULL DEFAULT '' AFTER `numReservedSeats`;
ALTER TABLE `ticketsale_tickettypes` ADD `created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `price`, ADD `modified` TIMESTAMP on update CURRENT_TIMESTAMP NOT N... |
drop if exists burger_db;
CREATE DATABASE burger_db;
USE burger_db;
CREATE TABLE burgers
(
id int AUTO_INCREMENT,
burger_name varchar(255) NOT NULL,
devoured BOOLEAN default false not null,
PRIMARY KEY (id)
); |
<gh_stars>0
-- conf_label = {
-- "TopSecret" : '1',
-- "Secret" : '2',
-- "Confidential" : '3',
-- "Unclassified" : '4',
-- }
-- integrity_label = {
-- "VeryTrusted" : '1',
-- "Trusted" : '2',
-- "SlightlyTrusted": '3',
-- "Untrusted" : '4',
-- }
USE securebankingsystem
GO
SET ... |
<reponame>Anhnh99/demoShopLaravel
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th6 23, 2020 lúc 04:26 PM
-- Phiên bản máy phục vụ: 10.4.11-MariaDB
-- Phiên bản PHP: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "... |
SELECT societe, SUM(total_ht_bc)
FROM bon, fournisseur
WHERE bon.id_fournisseur = fournisseur.IDfournisseur
AND validation_etat >= 4
GROUP BY societe |
-- MySQL dump 10.19 Distrib 10.3.32-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: dbinfox
-- ------------------------------------------------------
-- Server version 10.3.32-MariaDB-0ubuntu0.20.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACT... |
CREATE TABLE sessions (
session_id VARCHAR(128) NOT NULL,
expires NUMBER(11) NOT NULL,
attributes CLOB,
PRIMARY KEY (session_id)
)
|
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 12, 2019 at 04:29 PM
-- 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... |
<reponame>cpalanca/Porfolio-webApp
DROP TABLE IF EXISTS `failed_jobs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `failed_jobs` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
`q... |
CREATE TABLE [dbo].[PostTypes] (
[Id] INT NOT NULL,
[Type] NVARCHAR (50) NOT NULL,
CONSTRAINT [PK_PostTypes__Id] PRIMARY KEY CLUSTERED ([Id] ASC)
);
|
<reponame>rhomicom-systems-tech-gh/Rhomicom-DB-Scripts
/* Formatted on 12-20-2018 1:38:29 PM (QP5 v5.126.903.23003) */
/*
"C:\Program Files (x86)\pgAdmin 4\v3\runtime\pg_dump" --host localhost --port 5432 --username postgres --verbose --table=SEC.SEC_ALLWD_OTHER_INFOS --data-only --column-inserts psdc_live > SEC.SEC_AL... |
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
--
-- Name: comments; Type: COMMENT; Schema: -; Owner: fordfrog
--
COMMENT ON DATABA... |
-- create tables
CREATE TABLE IF NOT EXISTS `[db_prefix]main` (
`id` smallint(6) NOT NULL auto_increment,
`icon` varchar(50) NOT NULL default '',
`large_icon` varchar(50) NOT NULL default '',
`membership_id` int(11) NOT NULL default '0',
`created` int(11) NOT NULL default '0',
PRIMARY KEY (`ID`)
) E... |
USE poe_currency;
DELETE FROM leagues WHERE id IN (5, 6);
|
<filename>working/packages/reference_pack/AddNewDomain.sql
/*
Adds new domain
Usage:
DO $_$
BEGIN
PERFORM vocabulary_pack.AddNewDomain(
pDomain_id =>'Condition Status',
pDomain_name =>'OMOP Condition Status'
);
END $_$;
*/
CREATE OR REPLACE FUNCTION vocabulary_pack.AddNewDomain (
pDomain_id doma... |
-------------------------------------
-- retrieve all stock transactions related to customer "100000"
-------------------------------------
connect to sample;
set current_schema="DVDEMO";
select * from stock_transactions
where custid=100000;
|
<reponame>danielleontiev/cassandra4io
create table test_data(
id bigint,
data text,
PRIMARY KEY (id)
);
insert into test_data (id, data) values (0, null);
insert into test_data (id, data) values (1, 'one');
insert into test_data (id, data) values (2, 'two');
insert into test_data (id, data) values (3, 'thr... |
<reponame>andrelashley/gcpe-hub
CREATE TABLE [dbo].[MinistryLanguage] (
[MinistryId] UNIQUEIDENTIFIER NOT NULL,
[LanguageId] INT NOT NULL,
[Name] NVARCHAR (100) NOT NULL,
CONSTRAINT [PK_OrganizationLanguage] PRIMARY KEY CLUSTERED ([MinistryId] ASC, [LanguageId] ASC),
CONSTRAINT... |
-- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: earth
-- ------------------------------------------------------
-- Server version 5.7.9
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4010... |
SELECT 1
FROM imported_reference
WHERE 1=1
AND file_or_function_id = ?
AND function_id = ?; |
<reponame>dbsteward/dbsteward-go
-- pgsql8/someapp_extracted_upgrade_stage1_schema1.sql
-- DBSteward stage 1 structure additions and modifications - generated Sun, 17 Oct 2021 11:46:38 -0400
-- Old definition: pgsql8/someapp_v2_composite.xml
-- New definition pgsql8/someapp_extracted_composite.xml
BEGIN;
-- SQL STAG... |
<filename>sql/cdj_master/2018-8/2018-8-30.sql
-- 对旧的调研项目补关联调研问卷id
update `cdj`.`question_item` set `question_id` = 3 where id not in (33, 34) |
<reponame>srikanthprathi/Segs<gh_stars>100-1000
DROP TABLE IF EXISTS "table_versions";
DROP TABLE IF EXISTS "supergroups";
DROP TABLE IF EXISTS "progress";
-- The costume table is no more, but for compatibility with older releases
-- we want to make sure to still remove it.
DROP TABLE IF EXISTS "costume";
DROP TABLE IF... |
<reponame>cristianesgarcia/aulamysql
-- Exemplo 3
SELECT Pnome,
Unome,
FUNCIONARIO.Cidade,
DEPARTAMENTO.Cidade
FROM FUNCIONARIO,
DEPARTAMENTO
WHERE Dnome = 'Pesquisa'
AND Dnumero = Dnr;
-- Seleciona os dados dos funcionários que são vinculados ao departamento 'Pesquisa'
|
-- Query the Name
-- of any student in STUDENTS who scored higher than 75 Marks. Order your output by the last three characters of each name.
-- If two or more students both have names ending in the same last three characters
-- (i.e.: Bobby, Robby, etc.), secondary sort them by ascending ID.
select name
from student... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.3.11
-- Generation Time: Jun 11, 2020 at 06:42 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... |
<reponame>Tuzosdaniel12/Eat-Da-Burger<gh_stars>0
-- add query
INSERT INTO burgers SET burger_name = "taco";
--update query
UPDATE burgers SET devoured = true WHERE id = 1;
--delete query
DELETE FROM burgers WHERE id = 1;
|
REM FILE NAME: title132.sql
REM LOCATION: SetUp
REM FUNCTION: Define a 132 column report heading. Define DB and userid parameters
REM TESTED ON: 7.3.3.5, 8.0.4.1, 8.1.5, 8.1.7, 9.0.1
REM PLATFORM: non-specific
REM REQUIRES: sys.v_$parameter
REM
REM This is a part of the Knowledge Xpert for Oracle Administrat... |
<filename>sandbox-web/src/main/resources/import.sql
-- W celu poprawnego ładowania polskich znaków konieczne jest zdefiniowanie
-- zmiennej środowiskowej name=JAVA_TOOL_OPTIONS value=-Dfile.encoding=UTF-8 .
-- Plik import.sql musi byc kodowany w UTF-8
insert into sandbox_setting (id, version, name, string_value) valu... |
<filename>prisma/migrations/20210328172551_update_user_table/migration.sql<gh_stars>0
/*
Warnings:
- The migration will add a unique constraint covering the columns `[stravaActivityId]` on the table `Activity`. If there are existing duplicate values, the migration will fail.
*/
-- AlterTable
ALTER TABLE "User" AD... |
<gh_stars>1-10
create table st_id (
t varchar(100) comment 'ID Type',
v bigint not null comment 'Current value',
primary key (t)
) comment = 'ID Holder'; |
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/current/5.0/dml/KR_DML_01_KRACOEUS-5254_B000.sql
INSERT INTO KRIM_PERM_T(PERM_ID,PERM_TMPL_ID,NMSPC_CD,NM,DESC_TXT,ACTV_IND,OBJ_ID)
VALUES(KRIM_PERM_ID_BS_S.NEXTVAL,(SELECT PERM_TMPL_ID FROM KRIM_PERM_TMPL_T WHERE NMSPC_CD = 'KR-NS' AND NM = ... |
use ota;
DROP PROCEDURE IF EXISTS stopping_candle_in_range;
DELIMITER //
CREATE PROCEDURE stopping_candle_in_range (
IN instrumentId INT UNSIGNED,
IN timeframeId INT UNSIGNED,
IN startTime DATETIME,
IN endTime DATETIME,
IN distal DECIMAL(9,5),
IN bidAsk INT UNSIGNED,
IN supplyDemand INT UNSIGNED,... |
-- POCOR-3824
-- system_patches
INSERT INTO `system_patches` (`issue`, `created`) VALUES ('POCOR-3824', NOW());
-- Table structure for table `training_need_competencies`
DROP TABLE IF EXISTS `training_need_competencies`;
CREATE TABLE IF NOT EXISTS `training_need_competencies` (
`id` int(11) NOT NULL,
`name` varcha... |
CREATE TABLE Vendors (
VendorID int not null IDENTITY(1,1),
Vendor varchar(255) not null,
PRIMARY KEY(VendorID)
);
CREATE TABLE Locations (
LocationID int NOT NULL IDENTITY(1,1),
LocationName varchar(255) not null,
StreetAddress varchar(255) not null,
City varchar(255) not null,
State varchar(2) not null,
ZipCode va... |
-- Deploy ggircs-portal:tables/application_revision_validation_function to pg
-- requires: schema_ggircs_portal
begin;
create table ggircs_portal.application_revision_validation_function (
id integer primary key generated always as identity,
validation_function_name varchar(1000) not null,
validation_descriptio... |
<reponame>qiuwenhuifx/PolarDB-for-PostgreSQL
/* src/test/modules/test_rbtree/test_bulk_read--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION test_polar_bulk_read" to load this file. \quit
CREATE FUNCTION polar_drop_relation_buffers(
IN relation tex... |
<reponame>rusher/benchbase<filename>src/main/resources/benchmarks/hyadapt/ddl-generic.sql
DROP TABLE IF EXISTS HTABLE;
CREATE TABLE HTABLE (
H_KEY INT PRIMARY KEY,
FIELD1 INT,
FIELD2 INT,
FIELD3 INT,
FIELD4 INT,
FIELD5 INT,
FIELD6 INT,
FIELD7 INT,
FIELD8 INT,
FIELD9 INT,
FIELD10 INT,
FIELD11 INT,
FIELD12... |
CREATE TABLE IF NOT EXISTS deploys(
id serial PRIMARY KEY,
service_instance_id integer REFERENCES service_instances (id),
deployed_at TIMESTAMP WITH TIME ZONE,
created_at TIMESTAMP WITH TIME ZONE default now(),
updated_at TIMESTAMP WITH TIME ZONE default now()
);
|
--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.22.0'" to load this file. \quit
DROP FUNCTION IF EXISTS cdb_dataservices_server.cdb_service_get_rate_limit(TEX... |
<gh_stars>10-100
ALTER TABLE CategoryCategoryOptionLink ADD COLUMN sortOrder INTEGER; |
create class test_class (date_col date, time_col time, timestamp_col timestamp, datetime_col datetimeltz, datetime_col1 datetimeltz);
insert into test_class values (DATE '01/01/1971', TIME '09:00:00', TIMESTAMP '01/01/1972 10:30:00', datetimeltz '1970-01-01 12:00:00.000', datetimeltz '1970-01-01 12:00:00.000');
insert... |
CREATE TABLE public.time (
time_id serial NOT NULL,
run_id serial NOT NULL,
time_step varchar(40) NOT NULL,
weight real NOT NULL,
PRIMARY KEY (time_id)
);
CREATE INDEX ON public.time
(run_id);
CREATE TABLE public.area (
area_id serial NOT NULL,
run_id serial NOT NULL,
building_typ... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 31, 2021 at 01:07 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
--
-- @lc app=leetcode id=182 lang=mysql
--
-- [182] Duplicate Emails
--
# Write your MySQL query statement below
SELECT DISTINCT a.Email AS Email
FROM Person a
INNER JOIN Person b
ON a.Id <> b.Id
AND a.Email = b.Email;
|
<filename>basededatos/V22__Create_customer22.sql
INSERT INTO ClientePrueba26
values
(
2,
'A',
'B'
);
COMMIT;
|
<reponame>Nomeriano/Cursos
create table if not exists teste(
id int,
nome varchar(20),
idade int
);
insert into teste value
('1','Maria','11'),
('2','Jose','12'),
('2','Pedro','22');
select *from teste;
drop table if exists teste; /* Exclui a tabela teste */ |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 15, 2018 at 09:59 AM
-- 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... |
<reponame>lzsyt/ruoyi_kbm
/*
Navicat Premium Data Transfer
Source Server : mycon
Source Server Type : MySQL
Source Server Version : 80013
Source Host : localhost:3306
Source Schema : ry
Target Server Type : MySQL
Target Server Version : 80013
File Encoding : 65001
Da... |
<gh_stars>0
# Write your MySQL query statement below
SELECT MAX(America) as America, Max(Asia) as Asia, Max(Europe) As Europe
From(
SELECT
CASE
WHEN Continent = 'America' Then @r1:=@r1+1
WHEN Continent = 'Asia' Then @r2:=@r2+1
WHEN Continent = 'Europ... |
<reponame>LuGeorgiev/SoftUniDBBasicMSSQL<gh_stars>0
CREATE TABLE People (
Id INT PRIMARY KEY IDENTITY(1,1),
[Name] NVARCHAR(200) NOT NULL,
Picture VARBINARY(2000),
Height DECIMAL(3,2),
[Weight] DECIMAL(5,2),
Gender CHAR(1) NOT NULL,
Birthdate DATE NOT NULL,
Biography NVARCHAR(MAX)
)
INSERT INTO People([Name]... |
<filename>src/test/resources/sql/insert/e3ae6778.sql
-- file:plpgsql.sql ln:2290 expect:true
insert into conttesttbl(v) values(10)
|
USE SoftUni
SELECT FirstName + '.' + LastName + '@<EMAIL>' AS [Full Email Adress]
FROM Employees |
<reponame>buddhika75/hims
select id, `ITEM_ID`, `DTYPE`,`CREATEDAT`, `CREATER_ID`, `HTMLTEXT`, `RETIRED`, `IXITEMTYPE`,`NAME`, `RETIREDAT` from reportitem where `ITEM_ID`=17438 order by `RETIREDAT` desc limit 40; |
--------------Start--------------------
update eg_action set displayname = 'View/Modify Contractor' where name='WorksContractorSearch' and contextroot = 'egworks';
--rollback update eg_action set displayname = 'View/Edit Contractor' where name='WorksContractorSearch' and contextroot = 'egworks';
--------------End--... |
-- 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... |
<reponame>oicr-gsi/issitoq<filename>test/migrations/V004__make_qcpassed_nullable.sql
ALTER TABLE fileqc ALTER COLUMN qcpassed DROP NOT NULL; |
<filename>sql-database/AdventureWorksLT/SalesLT/Tables/Product.sql<gh_stars>1-10
CREATE TABLE [SalesLT].[Product] (
[ProductID] INT IDENTITY (1, 1) NOT NULL,
[Name] [dbo].[Name] NOT NULL,
[ProductNumber] NVARCHAR (25) NOT NULL,
[Color] ... |
<gh_stars>1-10
USE `zg6kbqpoxrbx4hox`;
CREATE TABLE IF NOT EXISTS `Menu` (
`version` int(11) NOT NULL,
PRIMARY KEY (`version`)
);
CREATE TABLE IF NOT EXISTS `Item` (
`itemNo` int(11) NOT NULL,
`itemName` varchar(512) NOT NULL,
`itemDescription` varchar(512) DEFAULT NULL,
`itemPrice` int(11) NOT NULL,
`i... |
<gh_stars>10-100
-- Overall Overviews --
CREATE VIEW gftp_transfer_overview(
aggregation_time, aggregation_time_range,
transfers_in, transfers_out, transfers_other,
bytes_in, bytes_out, bytes_other)
AS
SELECT
aggregation_time,
aggregation_time_range,
SUM(
CASE
... |
<filename>test_and_ground/asist/prc/template/template_hk_basichousekeeping.prc
PROC $sc_$cpu_hk_basichousekeeping
;*******************************************************************************
; Test Name: hk_basichousekeeping
; Test Level: Build Verification
; Test Type: Functional
;
; Test Description
... |
<reponame>apereo-tesuto/tesuto<filename>tesuto-placement-services/tesuto-placement-core/src/flyway/resources/db.migration/V6.1__serial_key_fix.sql
ALTER TABLE college_discipline_sequence
ALTER COLUMN college_discipline_id DROP DEFAULT;
ALTER TABLE college_discipline_sequence_course
ALTER COLUMN college_discipline_id... |
/* Extra queries that may have ELM chunks used for QueryFilterParsing tests. */
library ExtraQueries version '0.0.1'
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1'
include MATGlobalCommonFunctions version '5.0.000' called Global
codesystem "EXAMPLE": 'http://example.com'
codesystem "EXAMPLE-2": 'http... |
<filename>sql/derived_tables/sup_turnaround_detail_6.sql
DROP TABLE IF EXISTS reshare_derived.sup_tat_stats;
CREATE TABLE reshare_derived.sup_tat_stats AS SELECT DISTINCT
ss_supplier AS stst_supplier,
(array_agg(ss_date_created ORDER BY ss_date_created ASC))[1] AS stst_date_created,
ss_req_id AS stst_req_i... |
set client_min_messages to WARNING;
\set VERBOSITY terse
select addtopogeometrycolumn('tt','public','feature','tg','POINT'); -- fail
select createtopology('tt') > 0;
select addtopogeometrycolumn('tt','public','feature','tg','POINT'); -- fail
create table feature(id integer);
select addtopogeometrycolumn('tt','public',... |
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND object_id = object_id('dbo.Check_OpenTransactions'))
EXEC ('CREATE PROCEDURE dbo.Check_OpenTransactions AS SELECT ''This is a stub''')
GO
ALTER PROCEDURE dbo.Check_OpenTransactions
@DurationThreshold smallint = 1,
@OnlySleepingSessions b... |
<reponame>SKalt/pg_sql_parser_tests<gh_stars>0
UPDATE sal_emp SET pay_by_quarter[1:2] = '{27000,27000}'
WHERE name = 'Carol';
|
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 03, 2021 at 08:26 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
INSERT INTO test_table(id, name, description)
VALUES
<tal:block tal:condition="python: context.check('iter_tests')" tal:repeat="i python: context.get('iter_tests')">
(
<tal:block tal:replace="python: ':id_{}'.format(repeat['i'].index)"></tal:block>,
<tal:block tal:replace="python: ':name_{}'.format(... |
<filename>mosqueregulationsystem.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 25, 2019 at 06:20 AM
-- Server version: 10.1.35-MariaDB
-- PHP Version: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTIO... |
EXEC [EST].[Proc_yjbb_Ins] @Code = N'600973',@CutoffDate = N'2017-09-30',@EPS = N'0.086',@EPSDeduct = N'0',@Revenue = N'128.94亿',@RevenueYoy = N'16.72',@RevenueQoq = N'9.57',@Profit = N'1.00亿',@ProfitYoy = N'-43.63',@ProfiltQoq = N'-17.23',@NAVPerUnit = N'2.9621',@ROE = N'2.63',@CashPerUnit = N'-3.2926',@GrossProfitRat... |
-- upgrade --
ALTER TABLE "subreports" DROP COLUMN "report_id";
-- downgrade --
ALTER TABLE "subreports" ADD "report_id" INT NOT NULL;
ALTER TABLE "subreports" ADD CONSTRAINT "fk_subrepor_medicalr_ddd7e6e8" FOREIGN KEY ("report_id") REFERENCES "medicalreports" ("id") ON DELETE CASCADE;
|
<filename>src/SFA.DAS.LoginService.Database/Script.PostDeployment.sql
-- START OF: Apply to be setup for RoATP
UPDATE LoginService.Clients
SET ServiceDetails = JSON_MODIFY(JSON_MODIFY(ServiceDetails,'$.ServiceName','Register of apprenticeship training providers service'),'$.ServiceTeam','The Apprenticeship Service')
W... |
CREATE TABLE IF NOT EXISTS region (
id uuid,
regionName text,
PRIMARY KEY(id)
);
|
<reponame>luis1ribeiro/LEI-MIEI
USE TestesClinicos;
SET GLOBAL log_bin_trust_function_creators = 1;
/* FUNCAO CALCULA NUMERO DE TESTES FEITOS POR UM MEDICO */
DROP FUNCTION IF EXISTS numeroTestes;
DELIMITER $$
CREATE FUNCTION numeroTestes (medico INT) RETURNS INT
BEGIN
DECLARE numero INT;
SET numero = (S... |
<gh_stars>0
UPDATE addresses
SET
country = CASE
WHEN country LIKE 'B%' THEN 'Blocked'
WHEN country LIKE 'T%' THEN 'Test'
WHEN country LIKE 'P%' THEN 'In Progress'
ELSE country
END
|
<filename>database/booking_info.sql
CREATE TABLE IF NOT EXISTS `booking_info` (
`id` int(11) NOT NULL,
`user_id` int(11) DEFAULT NULL,
`program_type` int(11) DEFAULT NULL,
`service_id` int(11) DEFAULT NULL,
`slot_id` int(11) DEFAULT NULL,
`booking_date` datetime DEFAULT NULL,
`amount` varchar(255) COLLATE u... |
<reponame>stdpmk/news_sample
insert into author(name) values
('<NAME>'),
('<NAME>'),
('<NAME>'),
('<NAME>.'),
insert into news(title, text, tags , date, id_author) values
('Европарламент присудил Сахаровскую премию Олегу Сенцову',
'За свое мужество и решительность, подвергая свою жизнь опасности, режиссер Олег Сенц... |
<gh_stars>0
CREATE PROCEDURE [dspUtil].[SetIfChanged_Time]
@IsUpdated BIT OUT, @OldValue DATETIME OUT, @NewValue DATETIME, @ExceptionId INT = NULL, @ExceptionMessage TSTRING = NULL, @NullAsNotSet BIT = 0
AS
BEGIN
IF (dspUtil.IsParamChanged(@OldValue, @NewValue, @NullAsNotSet) = 0)
RETURN;
IF (@ExceptionId IS NOT... |
DROP TABLE IF EXISTS Transportation_System.StopPoint;
DROP TABLE IF EXISTS Transportation_System.WorksOn;
DROP TABLE IF EXISTS Transportation_System.Ticket;
DROP TABLE IF EXISTS Transportation_System.Trip;
DROP TABLE IF EXISTS Transportation_System.Tube;
DROP TABLE IF EXISTS Transportation_System.Bus;
DROP TABLE IF EX... |
BEGIN;
CREATE SEQUENCE "dom"."account_id_seq" INCREMENT BY 1 MINVALUE 1 START WITH 1 OWNED BY "dom"."Account"."Id";
CREATE SEQUENCE "dom"."application_id_seq" INCREMENT BY 1 MINVALUE 1 START WITH 1 OWNED BY "dom"."Application"."Id";
CREATE SEQUENCE "dom"."emailrequest_id_seq" INCREMENT BY 1 MINVALUE 1 START WITH 1 OWNE... |
use world;
desc city;
use ssac;
create table number1(data tinyint);
show tables;
desc ;
insert into number1 value(127);
select * from number1;
create table number2(data tinyint unsigned);
insert into number2 value(128);
select * from number2;
create table number3(data float);
create table number4(data double);... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 29-12-2017 a las 13:36:51
-- Versión del servidor: 10.1.21-MariaDB
-- Versión de PHP: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
create procedure [dbo].[dnn_DeleteModuleSetting]
@ModuleId int,
@SettingName nvarchar(50)
as
DELETE FROM dbo.dnn_ModuleSettings
WHERE ModuleId = @ModuleId
AND SettingName = @SettingName
|
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Hôte: localhost (MySQL 5.6.35)
# Base de données: harmony
# Temps de génération: 2017-12-12 15:51:38 +0000
# ************************************... |
<gh_stars>10-100
ALTER TABLE `invoices`
ADD COLUMN `project_id` INT NULL; |
<filename>SQLServer/2008/ZGWSecurity/Stored Procedures/Set_Function_Roles.sql
/*
Usage:
DECLARE
@P_Function_SeqID int = 1,
@P_Security_Entity_SeqID INT = 1,
@P_Roles VARCHAR(MAX) = 'EveryOne',
@P_Permissions_NVP_Detail_SeqID INT = 1,
@P_Added_Updated_By INT = 1,
@P_Debug INT = 1
exec ZGWSecurity.Set_Fu... |
<filename>_src/sls_db.sql<gh_stars>0
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
DROP SCHEMA IF EXISTS `sls_dma` ;
CREATE SCHEMA IF NOT EXISTS `sls_dma` DE... |
insert into employee(emp_id, first_name, last_name, age) values(1,'Karthik', 'Prasad', 29);
insert into employee(emp_id, first_name, last_name, age) values(2,'Sachin', 'Prasad', 43);
insert into employee(emp_id, first_name, last_name, age) values(3,'SC', 'Ganguly', 43);
insert into employee(emp_id, first_name, l... |
<filename>clipper-cli/src/test/scripts/v_Subj11Department.sql
DROP VIEW v_Subj11Department CASCADE;
CREATE OR REPLACE VIEW v_Subj11Department AS
SELECT innerRel.x1 AS att1
FROM (
SELECT ca_0.individual AS x1
FROM concept_assertion ca_0
WHERE ca_0.concept=42
) as innerRel
|
<filename>tests/queries/0_stateless/02188_parser_dictionary_primary_key.sql
DROP TABLE IF EXISTS 02188_test_dictionary_source;
CREATE TABLE 02188_test_dictionary_source
(
id UInt64,
value String
)
ENGINE=TinyLog;
INSERT INTO 02188_test_dictionary_source VALUES (0, 'Value');
DROP DICTIONARY IF EXISTS 02188_tes... |
<filename>luciddb/test/sql/VI/tbs/qin.sql
--
-- qin.sql - test in lists
--
set schema 's';
-- indexed
SELECT KSEQ FROM BENCH100 WHERE K4 IN (1,2) ORDER BY 1;
-- non indexed
SELECT KSEQ FROM BENCH100 WHERE K25 IN (1,2,5,7) ORDER BY 1;
-- both
SELECT KSEQ FROM BENCH100 WHERE K4 IN (3,4) or K10 IN (9,4,7) ORDER BY 1;
... |
<gh_stars>1-10
-- +goose Up
-- +goose StatementBegin
CREATE TABLE stocks (
id bigint unsigned NOT NULL PRIMARY KEY,
stock_id varchar(8) NOT NULL,
name varchar(32) NOT NULL,
country varchar(2) NOT NULL,
site varchar(16),
created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at datet... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.