sql stringlengths 6 1.05M |
|---|
CREATE TABLE test (
id int primary key,
name text
);
|
drop table if exists sensor_clustering_src;
create temp table sensor_clustering_src(
id int,
data float[]
);
with sensor as (
select id, time, stepcounter,
json_array_elements(rotationdeg) as r
from dynamoitem
),
accel as (
select id,
json_array_elements(accelometer) as a
from dynamoitem
)
insert into ... |
<filename>DMS5/V_Analysis_Job_Backlog_Crosstab.sql
/****** Object: View [dbo].[V_Analysis_Job_Backlog_Crosstab] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[V_Analysis_Job_Backlog_Crosstab]
AS
SELECT PivotData.Posting_Time,
IsNull([Sequest], 0) AS [Sequest],
IsNu... |
create table department
(
id int primary key auto_increment,
name varchar(255) not null
);
create table employee
(
id int primary key auto_increment,
name varchar(255) not null,
department_id int not null,
foreign key (department_id) references department (id)
);... |
<filename>source/Energinet.DataHub.MeteringPoints.ApplyDBMigrationsApp/Scripts/Model/202110011345 Add ConnectionType.sql
ALTER TABLE [dbo].[MarketMeteringPoints]
ADD
ConnectionType [NVARCHAR](50) NULL
GO
ALTER TABLE [dbo].[ConsumptionMeteringPoints]
DROP COLUMN ConnectionType; |
<reponame>nenadnoveljic/tpt-oracle
-- Copyright 2018 <NAME>. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
--------------------------------------------------------------------------------
--
-- Author: <NAME>
-- Co... |
/* -----------------------------------------------------------------------------
Delete all data from the PIMS_LEASE_LICENSE_TYPE table and repopulate.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Author Date Comment
------------ ----------- -------------------------... |
<reponame>SKalt/pg_sql_parser_tests
ALTER PROCEDURE check_password(text) SET search_path = admin, pg_temp;
|
BEGIN TRANSACTION;
ALTER TABLE "conference"."Configuration" DROP CONSTRAINT IF EXISTS "Configuration_pkey";
ALTER TABLE "conference"."Configuration"
ADD CONSTRAINT "Configuration_pkey" PRIMARY KEY ("key", "conferenceId");
COMMIT TRANSACTION;
|
<filename>openGaussBase/testcase/KEYWORDS/resource/Opengauss_Function_Keyword_Resource_Case0018.sql
-- @testpoint:opengauss关键字resource(非保留),作为数据库名
--关键字不带引号-成功
drop database if exists resource;
create database resource;
drop database resource;
--关键字带双引号-成功
drop database if exists "resource";
create database "resourc... |
create table audit_error_log
(
id bigint GENERATED ALWAYS AS IDENTITY
constraint error_log_pk
primary key,
type text not null,
message text,
exception_message text,
ip inet,
country_code text,
method text,
path text,
parameters text,
body text,
exception_t... |
<gh_stars>0
declare @sometimestamp float = 1540876569.36803 -- 1540753197.89603
--select top 1 *
--from acquisition_v.ShotInfo
--order by NEWID()
---- This is BAD
--select count(*) from acquisition_v.ShotInfo
--select count(distinct shottime) from acquisition_v.ShotInfo
--select shottime, count(*) duplicatetimes fr... |
DROP DATABASE IF EXISTS burgers_db;
CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE burger_data (
id int AUTO_INCREMENT,
burger_name VARCHAR(30) NOT NULL,
devoured BOOLEAN DEFAULT FALSE,
PRIMARY KEY(id)
);
INSERT INTO burger_data (burger_name)
VALUES ("bacon cheese burger"), ("chicken burger"), ("vegg... |
<filename>sql/collect_table.sql
/*
Navicat MariaDB Data Transfer
Source Server : lamp
Source Server Version : 100116
Source Host : localhost:3306
Source Database : shopproject
Target Server Type : MariaDB
Target Server Version : 100116
File Encoding : 65001
Date: 2017-03-23 20:03:5... |
<reponame>TinuMurani/FastTrackITFinalProject
CREATE PROCEDURE [dbo].[spAppointments_DeleteById]
@Id INT
AS
BEGIN
SET NOCOUNT ON;
DELETE FROM Appointments
WHERE Id = @Id;
END
|
CREATE PROCEDURE [dbo].[dnn_GetModuleSetting]
@ModuleId Int, -- not null!
@SettingName nVarChar(50) -- not null or empty!
AS
BEGIN
SELECT
MS.SettingName,
CASE WHEN Lower(MS.SettingValue) LIKE 'fileid=%'
THEN dbo.dnn_FilePath(MS.SettingValue)
ELSE MS.SettingValue END AS Sett... |
insert into contact_info_expression values ('email',
'[a-z0-9!#$%&*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?')
insert into contact_info_expression values ('phone',
'^([0-9]( |-)?)?(\(?[0-9]{3}\)?|[0-9]{3})( |-)?([0-9]{3}( |-)?[0-9]{4}|[a-z... |
<reponame>BrenPatF/plsql_profiling<filename>install_prereq/c_user.sql
DEFINE DEMO_USER=&1
CREATE USER &DEMO_USER IDENTIFIED BY &DEMO_USER
DEFAULT TABLESPACE "USERS"
TEMPORARY TABLESPACE "TEMP";
GRANT CREATE SESSION TO &DEMO_USER;
GRANT ALTER SESSION TO &DEMO_USER;
GRANT CREATE TABLE TO &DEMO_USER;
GRANT CREATE TYPE T... |
-- phpMyAdmin SQL Dump
-- version 3.5.8
-- http://www.phpmyadmin.net
--
-- Máquina: localhost
-- Data de Criação: 08-Set-2014 às 21:09
-- Versão do servidor: 5.5.32
-- versão do PHP: 5.4.17
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *... |
<gh_stars>1-10
DROP INDEX index_skill_name ON skills;
DROP TABLE job_skill;
DROP TABLE pc_skill_proficiency;
DROP TABLE skills;
|
<reponame>MohammedAl-Mahdawi/bnkr
ALTER TABLE
jobs DROP CONSTRAINT IF EXISTS fk_jobs_backups; |
select json_text from test_cs.json_data where id = 2 into @s;
SELECT
json_to_xml(@s)
;
|
begin;
create table account(
id int primary key
);
select graphql.resolve($$
{
account(id: "WyJhY2NvdW50IiwgMV0=") {
id
shouldFail
}
}
$$);
rollback;
|
<reponame>bxf12315/jbpm
create table TaskVariableImpl (
id bigint identity not null,
modificationDate datetime2,
name varchar(255),
processId varchar(255),
processInstanceId bigint,
taskId bigint,
type int,
value varchar(4000),
primary key (id)
);
create table QueryDefinitionStore (... |
<reponame>aravi5/drill-test-framework<filename>framework/resources/Functional/cttas/cttas_02_wopby.sql
CREATE TEMPORARY TABLE temp_tbl_2wop
AS
SELECT * FROM typeall_l;
SELECT col_int FROM temp_tbl_2wop;
DROP TABLE temp_tbl_2wop;
|
<gh_stars>1-10
SELECT @@test; -- { serverError 36 }
|
CREATE SEQUENCE IF NOT EXISTS order_id_seq;
CREATE TABLE IF NOT EXISTS orders(
id integer NOT NULL DEFAULT nextval('order_id_seq'),
trx_id VARCHAR (50) UNIQUE NOT NULL,
payment_trx_id VARCHAR (50) NOT NULL,
lock_items JSON NOT NULL,
status VARCHAR (30) NOT NULL,
customer_name VARCHAR (50) NOT NULL,... |
CREATE TABLE IF NOT EXISTS `kwc_wirecard_log` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`data` text NOT NULL,
`custom_order_id` varchar(200) NOT NULL,
PRIMARY KEY (`id`),
KEY `custom_order_id` (`custom_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=ut... |
<reponame>kalvinkrishna/CartAppLaravel
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Oct 21, 2018 at 05:42 AM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET ti... |
<filename>src/database.sql
CREATE DATABASE IF NOT EXISTS viomedo;
USE viomedo;
CREATE TABLE IF NOT EXISTS applications (
id int(11) NOT NULL AUTO_INCREMENT,
firstname varchar(50) NOT NULL,
lastname varchar(50) NOT NULL,
email varchar(255) NOT NULL,
age int(99) NOT NULL,
phone varchar(50) NOT NULL,
zip in... |
<reponame>meliuz/slack-dones
CREATE TABLE user (
id INTEGER PRIMARY KEY AUTOINCREMENT,
slack_id INTEGER NOT NULL,
name VARCHAR NOT NULL
);
|
<gh_stars>0
CREATE TABLE `db_batch`.`student_CSV` (
`ID` INT NOT NULL AUTO_INCREMENT,
`FIRSTNAME` VARCHAR(45) NOT NULL,
`LASTNAME` VARCHAR(45) NOT NULL,
`EMAIL` VARCHAR(45) NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE INDEX `ID_UNIQUE` (`ID` ASC),
UNIQUE INDEX `EMAIL_UNIQUE` (`EMAIL` ASC)); |
<gh_stars>0
a)
SELECT "imie", "nazwisko" FROM "kandydaci" WHERE "matematyka" + "informatyka" + "fizyka" + "jezykobcy" >= 400 ORDER BY "nazwisko"
b)
SELECT "kierunek", COUNT( * ) FROM "zgloszenia" WHERE "kierunek" = 'matematyka' OR "kierunek" = 'informatyka' OR "kierunek" = 'fizyka' GROUP BY "kierunek"
c)
SELECT "i... |
<gh_stars>0
USE BarDG;
SELECT * FROM MENU;
SELECT * FROM SHEET_ORDER; |
<filename>ecoref07092020.sql
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 07-09-2020 a las 04:35:10
-- Versión del servidor: 5.7.31-0ubuntu0.18.04.1
-- Versión de PHP: 7.3.19-1+ubuntu18.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VAL... |
-- phpMyAdmin SQL Dump
-- version 4.0.10.7
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 27, 2015 at 09:44 AM
-- Server version: 5.5.45-37.4-log
-- PHP Version: 5.4.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... |
SELECT ASSERT({in:DATE:input} IS NULL);
|
<reponame>MichaelKappel/SpeedCube<gh_stars>1-10
-- =============================================
-- Author: <NAME>, MCTS
-- Create date: 6/6/2018
-- Description: Get pattern info based on Pattern Content
/*
EXAMPLE:
EXEC PatternGet 'BBBBBBBBBbbbbbbbbbCCCCCCCCCcccccccccaaaaaaaaaAAAAAAAAA'
BBBBBBBBBYYYYYYYYYCCCC... |
<gh_stars>1-10
select group_id from user_group_assignments where user_id = #{opts['user'].to_i}
|
Alter Table OilSamplesImport
ADD CONSTRAINT PK_histNo_imp PRIMARY KEY CLUSTERED (histNo);
-- ALTER COLUMN labTrackingNo VARCHAR(100) NOT NULL;
GO
-- OilSamplesImport
-- OilSamples
-- Alter Table OilSamplesImport
-- ADD PRIMARY KEY (labTrackingNo);
-- Alter Table EmailList
-- Add CONSTRAINT PK_UserGroup_MineSite_Ema... |
<filename>data/en/postgres/subdivisions_NZ.postgres.sql
CREATE TABLE subdivision_NZ (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision_NZ" ("id", "name", "level") VALUES (E'NZ-AUK', E'Auckland', E'regional council');
INSERT INTO "subdivision_NZ" ("id", "n... |
<reponame>SaraVieira/movie-mash<gh_stars>10-100
/*
Warnings:
- The primary key for the `Movies` table will be changed. If it partially fails, the table could be left without primary key constraint.
*/
-- DropForeignKey
ALTER TABLE "Genre" DROP CONSTRAINT "Genre_moviesId_fkey";
-- AlterTable
ALTER TABLE "Genre" A... |
/*
Navicat MySQL Data Transfer
Source Server : test01
Source Server Version : 50555
Source Host : localhost:3306
Source Database : school_oa_manager_system
Target Server Type : MYSQL
Target Server Version : 50555
File Encoding : 65001
Date: 2017-12-26 16:55:02
*/
SE... |
CREATE DATABASE "reform-database";
|
<filename>db/askip.sql
/*
SQLyog Ultimate v11.11 (64 bit)
MySQL - 5.5.49-0ubuntu0.14.04.1 : Database - askip
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;... |
-- Routine VL
IF exists(select * from LookupItem where Name = 'routine')
BEGIN
UPDATE LookupItem SET Name = 'Routine VL',DisplayName='Routine VL' WHERE Name = 'routine'
END
GO
IF exists(select * from LookupMasterItem where DisplayName = 'routine' and LookupMasterId = (SELECT Id FROM LookupMaster WHERE Name = 'La... |
<reponame>azusa/hatunatu
SELECT emp.*, dept.dname dname_0, dept.loc loc_0 FROM emp, dept
WHERE emp.deptno = dept.deptno |
/*
Navicat MySQL Data Transfer
Source Server : 192.168.11.156
Source Server Version : 50719
Source Host : 192.168.11.156:3306
Source Database : user
Target Server Type : MYSQL
Target Server Version : 50719
File Encoding : 65001
Date: 2018-06-30 22:13:39
*/
SET FOREIGN_KEY_CHECKS=0... |
<reponame>mygreen/sqlmapper<filename>sqlmapper-parent/sqlmapper-core/src/test/resources/script/h2/insert_data_embedded.sql
insert into test_embedded values ('001', 1, '001-1@embedded', false);
insert into test_embedded values ('001', 2, '001-2@embedded', false);
insert into test_embedded values ('002', 1, '002-1@embedd... |
<filename>tools/stress-testing/add_fresh_start_data.sql
/*
* This Script takes a database cleared by clear_server.sql and sets
* up initial data required for a start at Kailahun.
* It will also double checks some data that should already be present
* and adds it if missing.
*
* Bear in mind this assume you are w... |
<gh_stars>1-10
/* ---------------------------------------------------------------------- */
/* Script generated with: DeZign for Databases 11.1.0 */
/* Target DBMS: MS SQL Server 2017 */
/* Project file: APP_HMR.dez ... |
<reponame>ajw0100/professional-services-data-validator<gh_stars>100-1000
-- Copyright 2020 Google LLC
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/lice... |
SET search_path = pg_catalog;
-- DEPCY: This TABLE depends on the TABLE: public.t1
ALTER TABLE public.t2
NO INHERIT public.t1;
DROP TABLE public.t1; |
select
'All'
union select sub.name
from (
select distinct r.alias as name,
count(distinct e.id) as cnt
from
gha_repos r,
gha_events e
where
r.alias is not null
and e.repo_id = r.id
group by
r.alias
order by
cnt desc,
alias asc
limit {{lim}}
) sub
;
|
<gh_stars>0
update tb_ordem_servico set tp_situacao = 2 where nu_ordem_servico in (1219,
1221,
1222,
1223,
1224,
1225,
1229,
1230,
1232,
1233,
1235,
1236,
1237,
1240,
1241,
1242,
1243,
1244);
|
<gh_stars>10-100
ALTER TABLE "EventProgramPersonRole" SET SCHEMA "schedule";
|
<filename>openGaussBase/testcase/KEYWORDS/serializable/Opengauss_Function_Keyword_Serializable_Case0022.sql
-- @testpoint:opengauss关键字serializable(非保留),作为用户组名
--关键字不带引号-成功
drop group if exists serializable;
create group serializable with password '<PASSWORD>';
drop group serializable;
--关键字带双引号-成功
drop group if exi... |
<reponame>wotchin/openGauss-server<gh_stars>100-1000
/*
* This file is used to test the function of ExecCstoreIndexAnd()/ExecCstoreIndexOr()--vec_bitmap, for ordinary table
*/
----
--- Create Table and Insert Data
----
set current_schema=vector_bitmap_engine;
set enable_indexscan=off;
set enable_seqscan=off;
\parall... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 15 Des 2020 pada 16.07
-- Versi Server: 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_C... |
<filename>db/init.sql
CREATE DATABASE employeeData;
use employeeData;
select * from employeeInfo;
CREATE TABLE IF NOT EXISTS employeeInfo (
`id` int AUTO_INCREMENT,
`Name` VARCHAR(25) CHARACTER SET utf8,
`Sex` VARCHAR(10) CHARACTER SET utf8,
`Age` INT,
`Height_in` INT,
`Weight_lbs` INT,
PR... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 05, 2017 at 06:50 PM
-- 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... |
<reponame>penggan666/index_selection_evaluation
SELECT MIN(lt.link) AS link_type, MIN(t1.title) AS first_movie, MIN(t2.title) AS second_movie FROM keyword AS k, link_type AS lt, movie_keyword AS mk, movie_link AS ml, title AS t1, title AS t2 WHERE k.keyword ='character-<PASSWORD>-in-<PASSWORD>' AND mk.keyword_id = k.id... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50524
Source Host : 127.0.0.1:3306
Source Database : miao
Target Server Type : MYSQL
Target Server Version : 50524
File Encoding : 65001
Date: 2016-09-21 22:57:14
*/
SET FOREIGN_KEY_CHECKS = 0;
-- --... |
drop table if exists gh_ost_test;
create table gh_ost_test (
id int auto_increment,
i int not null,
primary key(id)
) auto_increment=1;
insert into gh_ost_test values (null, 101);
insert into gh_ost_test values (null, 102);
insert into gh_ost_test values (null, 103);
insert into gh_ost_test values (nul... |
create table
test_normalization.`non_nested_stream_wit__lting_into_long_names__dbt_tmp`
as (
with __dbt__CTE__non_nested_stream_wit_1g_into_long_names_ab1 as (
-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema
select
j... |
<reponame>JohnCale47/el_monitorro
DROP INDEX telegram_subscriptions_last_delivered_at_index;
|
-- We know that these are these because their product_id is 0.
INSERT INTO `orders` VALUES (1, 1, 0, 0, 0, '127.0.0.1', 0, '', 'Other', UNIX_TIMESTAMP(), 0);
INSERT INTO `orders` VALUES (2, 1, 0, 0, 0, '127.0.0.1', 0, '', 'Debt', UNIX_TIMESTAMP(), 0);
INSERT INTO `orders` VALUES (3, 1, 0, 0, 0, '127.0.0.1', 0, '', 'Pro... |
<gh_stars>1000+
-- 2018-09-11T08:25:53.816
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DDL_NoForeignKey,Description,EntityType,FieldLength,IsActive,IsAdvancedText,IsAll... |
DROP FUNCTION IF EXISTS report.saldobilanz_summary_Report (IN Date, IN defaultAcc character varying, IN showCurrencyExchange character varying, IN ad_org_id numeric(10,0), IN p_IncludePostingTypeStatistical char(1));
DROP FUNCTION IF EXISTS report.saldobilanz_summary_Report (IN Date, IN defaultAcc character varying, IN... |
<filename>Database/Schemata/upgrade-0030.sql
ALTER TABLE `OutboundComms`
CHANGE COLUMN `ResolverClassId` `ResolverDataXml` TEXT NOT NULL
#
DROP procedure IF EXISTS `CreateOutboundComm`
#
CREATE PROCEDURE `CreateOutboundComm`(
IN senderPersonId INT,
IN fromPersonId INT,
IN organizationId INT,
IN resolve... |
<reponame>tharindusathis/sourcecodes-of-CodeReadingTheOpenSourcePerspective<gh_stars>10-100
This document shall describe how to set up a relational database to use with ArgoUML. This document is maintained by <NAME>, for any hints please send an email to <EMAIL>.
TESTED SYSTEMS:
So far only MySQL vers. 3.22 is tested ... |
/*
Copyright Astronomer, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dis... |
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more information.
PRINT N'Creating primary key [StaffIdentificationD... |
select * from imDev..FileImportView with (nolock)
select * from imDev..LotEventStatistics with (nolock)
select * from imDev..ProcessBatch with (nolock)
select * from imDev..LOGRECORD where LEVEL = 'SEVERE'
select top 100 * from imDev..LotEvent where FILEIMPORTID = 14490333
select top 100 * from imDev..LotMea... |
<reponame>aehrc/release-validation-framework
/********************************************************************************
release-type-SNAPSHOT-delta-validation-Description
Assertion:
The current data in the Definition snapshot file are the same as the data in
the current delta file.
**********************... |
<reponame>schurch/ferry-services-server-v2
DELETE FROM service_locations WHERE service_id = 39 AND location_id = 56;
DELETE FROM service_locations WHERE service_id = 39 AND location_id = 58;
DELETE FROM locations WHERE location_id = 58; |
-- MySQL dump 10.13 Distrib 5.7.20, for Linux (x86_64)
--
-- Host: localhost Database: banthecan-demo
-- ------------------------------------------------------
-- Server version 5.7.20-0ubuntu0.17.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARA... |
CREATE TABLE student (
student_id SERIAL PRIMARY KEY,
student_name VARCHAR(64),
student_email VARCHAR(64),
student_oit_id integer NOT NULL
); |
<filename>src/main/resources/db/migration/V001__criatabela.sql
create table cliente(
id bigint not null auto_increment,
nome varchar(60) not null,
email varchar(255) not null,
telefone varchar(25) not null,
primary key(id)
); |
DELIMITER $$
CREATE FUNCTION ufn_is_word_comprised(set_of_letters VARCHAR(50), word VARCHAR(50))
RETURNS BIT
BEGIN
RETURN word REGEXP (concat('^[', set_of_letters, ']+$'));
END $$
DELIMITER ;
SELECT ufn_is_word_comprised('oistmiahf', 'halves'); |
<gh_stars>0
CREATE USER codetriage_development SUPERUSER; |
<filename>sql/columns.sql
col sid format 9999
col directory_path format a60
col blocks format 99,999,999 head 'BLOCKS'
col db_link format a30 head 'DB LINK'
col db_link_instance format a30 head 'DB LINK|INSTANCE'
col db_link_username format a10 head 'DB LINK|USERNAME'
col empty_blocks format 99,999,999 head 'EMPTY BLO... |
<filename>dev-tools/db_types/sqlite.sql
CREATE TABLE IF NOT EXISTS auto_continue (
id INTEGER PRIMARY KEY,
file_path TEXT NOT NULL,
subject TEXT NOT NULL,
status TEXT NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
modified TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UNIQUE(file_path, subje... |
<reponame>alfandovs/PEMWEB
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 21 Bulan Mei 2020 pada 08.24
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 S... |
<gh_stars>0
drop database if exists OrderbookDB;
create database OrderbookDB;
use OrderbookDB;
CREATE TABLE Client (
ClientID int AUTO_INCREMENT,
FirstName VARCHAR(255) NOT NULL,
LastName VARCHAR(255) NOT NULL,
Balance DECIMAL(65, 2) NOT NULL,
PRIMARY KEY (ClientID)
);
CREATE TABLE Portfolio (
... |
<reponame>mostafab/neg5
SELECT match_information.*, COALESCE(match_phases.phases, '{}') as phases
FROM
(
SELECT
M.id as match_id,
M.tournament_id,
M.round,
M.room,
M.moderator,
M.packet,
M.tossups_heard,
M.notes,
M.added_by,
M.serial_id,
match_teams.teams
FROM
... |
<gh_stars>1-10
insert into teme_incarcate values(1,'321sl326',1,SYSDATE()-1);
insert into teme_incarcate values(2,'321sl322',5,SYSDATE()-1);
insert into teme_incarcate values(3,'321sl332',2,SYSDATE()-1);
insert into teme_incarcate values(4,'321sl321',3,SYSDATE()-1);
insert into teme_incarcate values(5,'321sl336',4,... |
-- Revert schemas/faker/tables/cities/fixtures/1602987351008_fixture from pg
BEGIN;
COMMIT;
|
-- Step 1: Clear the cache, set dbcompat to 130 just to prove it works, and warm the cache
USE WideWorldImportersDW
GO
ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE_CACHE
GO
ALTER DATABASE WideWorldImportersDW SET COMPATIBILITY_LEVEL = 130
GO
SELECT COUNT(*) FROM Fact.OrderHistoryExtended
GO
-- Step 2:... |
<reponame>gianadda/ZenPRM<gh_stars>1-10
IF EXISTS (select * from dbo.sysobjects where id = object_id(N'uspSetEntityAsCustomerByIdent') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE uspSetEntityAsCustomerByIdent
GO
/*
*
* uspSetEntityAsCustomerByIdent
*
*
*/
CREATE PROCEDURE uspSetEntityAsCustomerB... |
alter type transaction_type add value 'allocation'; |
-- etldoc: layer_ski_area[shape=record fillcolor=lightpink, style="rounded,filled",
-- etldoc: label="layer_ski_area | <z10_> z10+" ] ;
DROP FUNCTION IF EXISTS layer_ski_area(geometry, integer);
CREATE OR REPLACE FUNCTION layer_ski_area(bbox geometry, zoom_level integer)
RETURNS TABLE(
osm_id bigint,
geometry ... |
CREATE TABLE student (
id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
name VARCHAR(100) NOT NULL,
middle_name VARCHAR(100),
surname VARCHAR(100) NOT NULL,
nationality VARCHAR(100) NOT NULL
);
CREATE TABLE document (
id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
student_id... |
/**
* @author <NAME>
* Matéria Laboratorio de Engenharia
* FATEC ZL 5º ADS - Tarde
* 11/11/2016
*/
DROP DATABASE IF EXISTS ael;
CREATE DATABASE ael;
USE ael;
CREATE TABLE `cliente` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`nome` VARCHAR(300) NOT NULL,
`telefone` VARCHAR(20) NOT NULL,
`endereco` VARCHAR(... |
-- ----------------------------------------------
-- **********************************************
-- IR metadata schema
-- **********************************************
-- ----------------------------------------------
CREATE SCHEMA ir_metadata_dublin_core AUTHORIZATION ir_plus;
CREATE TABLE i... |
drop materialized view mv_works_for_lanes;
-- Create the materialized view with no data.
create materialized view mv_works_for_lanes
as
SELECT
works.id AS works_id,
editions.id AS editions_id,
licensepools.data_source_id,
licensepools.identifier_id,
editions.sort_title,
editions.permanent_wor... |
alter table LDAP_MATCHING_RULE add ACCESS_GROUP_NAME varchar2(255) ;
|
<filename>spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/jdbc/lexical-schema-bbb.sql
ALTER TABLE FOO DROP COLUMN todrop;
ALTER TABLE FOO ADD COLUMN name VARCHAR(30);
|
CREATE DATABASE <DATABASE NAME>;
USE <DATABASE NAME>;
CREATE TABLE Student (
StudentID INT(10) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
EmailAddress VARCHAR(255) NOT NULL,
Password VARCHAR (100) NOT NULL,
FirstName VARCHAR(50) NOT NULL,
LastName VARCHAR(50) NOT NULL,
SixthFormYear VARCHAR... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 04, 2019 at 07:52 PM
-- Server version: 5.7.24
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.