sql stringlengths 6 1.05M |
|---|
--
-- PostgreSQL database dump
--
-- Dumped from database version 11.1
-- Dumped by pg_dump version 11.1
-- Started on 2019-04-30 09:58:40
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalo... |
<reponame>jasoncable/medicalreference
CREATE TABLE [dbo].[Drug]
(
[Id] INT NOT NULL IDENTITY,
[Ingredient] VARCHAR(MAX) NOT NULL,
[DosageFormId] INT NOT NULL,
[RouteOfAdminId] INT NOT NULL,
[DrugTypeId] INT NOT NULL,
[DrugScheduleId] INT NULL,
[StartMarketingDate] DATETIME NULL,
[EndMar... |
GRANT ALL PRIVILEGES ON ninja.* TO 'ninja'@'%' IDENTIFIED BY 'ninja';
GRANT ALL PRIVILEGES ON douitsu.* TO 'douitsu'@'%' IDENTIFIED BY 'douitsu';
FLUSH PRIVILEGES;
CREATE DATABASE IF NOT EXISTS `douitsu`;
USE `douitsu`
CREATE TABLE sys_entity (
id varchar(255) NOT NULL,
zone varchar(255) DEFAULT NULL,
base var... |
<filename>Assessment/Scripts/Netezza/_v_sys_object_data_V1.sql
select * from admin._v_sys_object_data;
|
-- file:tsrf.sql ln:161 expect:true
select generate_series(1,3) as x, generate_series(1,3) + 1 as xp1
|
ALTER TABLE COI_DISCL_PROJECTS
ADD CONSTRAINT FK_COI_ISCLOSURE_PROJECTS
FOREIGN KEY (COI_DISCLOSURE_ID)
REFERENCES COI_DISCLOSURE (COI_DISCLOSURE_ID)
/
|
<gh_stars>0
ALTER TABLE samples ADD parent_id INT;
COMMENT ON COLUMN samples.parent_id IS 'In cases where sampling data is gathered in a hierarchical fashion, this allows samples to be linked to a parent sample. For example, a sample linear transect may have several quadrat samples taken along it''s length.'; |
# standardSQL
# Count Open Graph types
CREATE TEMP FUNCTION getOpenGraphTypes(rendered STRING)
RETURNS ARRAY<STRING>
LANGUAGE js AS """
try {
rendered = JSON.parse(rendered);
return rendered.opengraph.map(opengraph => opengraph.property.toLowerCase());
} catch (e) {
return [];
}
""";
WITH
rendered_da... |
<reponame>Ed-Fi-Alliance-OSS/Ed-Fi-MigrationUtility
-- 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.... |
-- Drop table Friends
DROP TABLE Friends; |
<filename>TestDatabases/SQLServer/EfrpgTest (manually created).sql
-- This database will contain all the horrible edge cases this generator has to cope with
/*CREATE DATABASE [EfrpgTest] ON PRIMARY
( NAME = N'EfrpgTest', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\Efrp... |
<filename>sql/data-design.sql
-- drop table statements go here
DROP TABLE IF EXISTS strainFavorite;
DROP TABLE IF EXISTS strainLeafRating;
DROP TABLE IF EXISTS strainReview;
DROP TABLE IF EXISTS dispensaryFavorite;
DROP TABLE IF EXISTS dispensaryLeafRating;
DROP TABLE IF EXISTS dispensaryReview;
DROP TABLE IF EXISTS st... |
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50720
Source Host : localhost:3306
Source Database : math
Target Server Type : MYSQL
Target Server Version : 50720
File Encoding : 65001
Date: 2019-05-30 16:53:50
*/
SET FOREIGN_KEY_CHECKS=0;
--... |
<filename>scripts/schema/ccpv1/093-event-instance.sql
/* Copyright (c) 2006-2012 Regents of the University of Minnesota.
For licensing terms, see the file LICENSE. */
/* Make sure event tables (at least those in the public/shared schema) record
which instance the event happened under. */
BEGIN TRANSACTION;
SET ... |
ALTER TABLE nodes DROP COLUMN IF EXISTS address;
|
<reponame>YangHao666666/hawq
DROP TABLE IF EXISTS test_parquet_types_varchar10;
CREATE TABLE test_parquet_types_varchar10 (c0 varchar(10)) with (appendonly=true, orientation=parquet, compresstype=none, rowgroupsize=8388608, pagesize=1048576, compresslevel=0);
INSERT INTO test_parquet_types_varchar10 values ('123456789a... |
/*******************
*RESET THE DATABASE*
*******************/
DROP TABLE Attachments;
DROP TABLE ReimbursementNotes;
DROP TABLE NoteReasons;
DROP TABLE Reimbursements;
DROP TABLE ApprovalDates;
DROP TABLE Employees;
DROP TABLE EmployeeTypes;
DROP TABLE Events;
DROP TABLE EventTypes;
DROP TABLE Grades;
DROP TABLE Gradi... |
<filename>createdatabase.sql
CREATE DATABASE `laratasks`;
|
--SELECT MIN("TrainsUK2_2"."Target Amount Minutes") AS "TEMP(Calculation_8390609132022332)(2549172019)(0)", "TrainsUK2_2"."TOC" AS "TOC" FROM "TrainsUK2_2" WHERE (("TrainsUK2_2"."TOC" = 'HY') AND ("TrainsUK2_2"."Target Type Name" = 'PPM')) GROUP BY 2;
|
<filename>pruebadesa_Cristia_Aparicio.sql
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 1172.16.17.32
-- Tiempo de generación: 05-02-2022 a las 01:46:08
-- Versión del servidor: 10.4.20-MariaDB
-- Versión de PHP: 7.4.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;... |
<gh_stars>0
CREATE TABLE sys.conversation_groups
(
conversation_group_id uniqueidentifier NOT NULL,
service_id int NOT NULL,
is_system bit
); |
-- # Problem: https://www.hackerrank.com/challenges/japan-population/problem
-- # Score: 10
SELECT SUM(Population) FROM City WHERE COUNTRYCODE = 'JPN';
|
{% sql 'users_by_country', note='counts users' %}
SELECT count(*) AS count
FROM user
WHERE country_code = 'UA'
{% endsql %}
{% sql 'select_all' %}
SELECT * FROM user
{% endsql %}
{% sql 'select_all_with_comment' %}
-- select all users with all fields, really
SELECT * FROM user
{% endsql %}
{%... |
-- Mar 6, 2017 10:26 PM
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_TIMESTAMP('2017-03-06 22:26:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=3792
;
|
<gh_stars>0
CREATE DATABASE notes_app;
USE [notes_app]
GO
/****************************** USERS INFORMATION ****************************************/
CREATE SCHEMA NotesUsers AUTHORIZATION dbo;
GO
CREATE TABLE [NotesUsers].[User](
id uniqueidentifier CONSTRAINT DFT_user_id DEFAULT NEWID(),
username NVARCHAR(28) N... |
<reponame>bsanchezdev/p_solvencia
ALTER TABLE `deuda`
DROP COLUMN `FECHA_ENVIO`,
DROP COLUMN `ROL`,
DROP COLUMN `PAGADO`;
|
/*
SQLyog Ultimate v11.24 (32 bit)
MySQL - 5.6.46 : Database - otasos
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_K... |
<gh_stars>0
Copy (select u.id, u.username, ud.email from "user" u join user_detail ud on u.id = ud.id order by u.id) To '/tmp/users.csv' With CSV;
|
/* For GVCO Project with status of Done for Issue Type Content Batch */
SELECT (CAST(p.pkey as varchar) + CAST(' - ' as varchar) + CAST(ji.issuenum as varchar)) as issuekey,ji.issuenum,ci.FIELD,ci.OLDSTRING,ci.NEWSTRING,ji.CREATED,cg.CREATED as transitiontime,cg.AUTHOR, DATEDIFF(DAY,ji.CREATED,cg.CREATED) as resolutio... |
CREATE TABLE guestbook_message (
id BIGINT NOT NULL AUTO_INCREMENT,
name CHAR(128) NOT NULL,
message CHAR(255),
image_uri CHAR(255),
PRIMARY KEY (id)
); |
<filename>db/migrations/sqlite/000041_drop_operations_member.up.sql
ALTER TABLE operations DROP COLUMN member; |
-- Copyright 2021 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/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in ... |
INSERT INTO Type
SELECT id + 1, 'mds.field.description.relationship','mds.field.relationship','relationshipName','org.motechproject.mds.domain.Relationship'
FROM Type
ORDER BY id DESC
LIMIT 1;
INSERT INTO Type
SELECT id + 1, 'mds.field.description.relationship.oneToMany','mds.field.relationship.oneToMany','oneToManyRe... |
insert into waffle_switch (name, active, note)
values ('soft_delete', 0,
'Set addons/webapps to STATUS_DELETED instead of removing them');
|
<reponame>AaronFeickert/tari
CREATE TABLE outputs (
spending_key BLOB PRIMARY KEY NOT NULL,
value INTEGER NOT NULL,
flags INTEGER NOT NULL,
maturity INTEGER NOT NULL,
status INTEGER NOT NULL,
tx_id INTEGER NULL
);
CREAT... |
<gh_stars>0
CREATE DATABASE M_OpFlix;
USE M_OpFlix;
create table Midias(
IdMidia int primary key identity
,Nome varchar(200) not null
);
create table Generos(
IdGenero int primary key identity
,Nome varchar(200) not null
);
create table Plataformas(
IdPlataforma int primary key identity
,Nome ... |
use mysql;
create user 'gergas'@'localhost' identified by "gergas2021";
create database bd_gergas;
use bd_gergas;
create table bd_gergas(codi smallint, nom varchar(20), cognoms varchar(50), email varchar (50));
alter table tl_gergas add primary key(codi);
grant select,insert,delete, update on bd_gergas.tl_gergas to 'ge... |
<filename>sql/Robna Kartica/RobnaK.sql
--select * from
--(
Select --+ INDEX( STAVKA_DOK STAVKA_DOK_PROIZVOD ) INDEX( DOKUMENT DOKUMENT_PK )
Proizvod, Datum_Dok, sd.Godina, sd.Broj_Dok,
sd.Vrsta_Dok, K_Robe, Kolicina, Faktor,
Kontrola, Realizovano, Kolicina_Kontrolna,sd.Cena1,
D.Tip_Dok... |
CREATE TABLE [dbo].[ProjectBugs]
(
[Id] INT NOT NULL IDENTITY(1,1)
,[Title] NVARCHAR(250) NOT NULL
,[WorkItemId] INT NOT NULL
,[ProjectId] INT NOT NULL
,[OriginDateOffset] DATETIMEOFFSET NOT NULL
,[DateCreatedOffset] DATETIMEOFFSET NOT NULL
CONSTRAINT [PK_ProjectBugs] PRIMARY KEY ... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 2017-12-18 14:43:08
-- 服务器版本: 5.7.18
-- PHP Version: 5.6.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... |
-- malloc.test
--
-- db eval {INSERT INTO abc VALUES(randstr(100,100), randstr(1000,1000))}
INSERT INTO abc VALUES(randstr(100,100), randstr(1000,1000)) |
-- =============================================
-- Drop extended property
-- =============================================
EXEC sp_dropextendedproperty N'<property_name, sysname, n1>',
N'<level0type, , user>', N'<level0name, sysname, dbo>',
N'<level1type, , table>', N'<level1name, sysname, authors>'... |
<gh_stars>1000+
-- 2017-11-20T12:00:14.710
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET DefaultValue='@SQL=select c_uom_id from m_product where M_product_ID=@M_Product_ID@',Updated=TO_TIMESTAMP('2017-11-20 12:00:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5492... |
/*
Navicat MySQL Data Transfer
Source Server : mysql
Source Server Version : 80018
Source Host : localhost:3306
Source Database : oa_db
Target Server Type : MYSQL
Target Server Version : 80018
File Encoding : 65001
Date: 2020-09-22 08:05:00
*/
SET FOREIGN_KEY_CHECKS... |
CREATE TABLE types (
id serial PRIMARY KEY,
name text
);
CREATE TABLE products (
id serial PRIMARY KEY,
name text,
type_id serial REFERENCES types (id),
expired_date date,
price money
);
--1. Написать запрос получение всех продуктов с типом "СЫР"
SELECT products.*
FROM products, types
WHERE products.type_id = (SE... |
<gh_stars>10-100
startcode PostgreSql_SubscriptionGetSubscribersSql
select distinct "Subscriber", "Endpoint"
from "public"."EndpointNameSubscriptionData"
where "MessageType" in (@type0)
endcode
|
-- Name: GetPatientStatus
-- Schema: posda_files
-- Columns: ['status']
-- Args: ['patient_id']
-- Tags: ['NotInteractive', 'PatientStatus', 'Update']
-- Description: Get Patient Status
select
patient_import_status as status
from
patient_import_status
where
patient_id = ?
|
<filename>migrations/20201128074827_view_blocks_hash_btree_index.up.sql
CREATE INDEX view_blocks_hash_btree_index ON view_blocks USING btree (hash);
|
CREATE FUNCTION [dbo].[netsqlazman_DBVersion] ()
RETURNS nvarchar(200) AS
BEGIN
return '3.6.0.x'
END
GO
GRANT EXECUTE
ON OBJECT::[dbo].[netsqlazman_DBVersion] TO [NetSqlAzMan_Readers]
AS [dbo];
|
<reponame>coryschwartz/nebula-crawler<filename>migrations/000026_create_visits_table.down.sql
DROP TABLE visits;
|
<reponame>databeast/apicore
use flypost;
BEGIN;
CREATE TABLE flyers (
flyer_id INT NOT NULL UNIQUE DEFAULT unique_rowid() PRIMARY KEY ,
created_unix INT NOT NULL DEFAULT CAST(current_timestamp() AS INT),
updated_unix INT NOT NULL DEFAULT CAST(curren... |
CREATE TABLE ballots (id BIGINT NOT NULL,
results_id BIGINT REFERENCES results (id) NOT NULL,
PRIMARY KEY (results_id, id),
referendum_id BIGINT,
custom_ballot_id BIGINT,
write_in BOOLEAN,
... |
#standardSQL
--
-- Compute the number of all transcripts and mitochondrial transcripts per cell.
--
SELECT
cell,
SUM(trans_cnt) AS alltrans,
SUM(IF(gene LIKE "mt-%",
trans_cnt,
0)) AS mttrans,
COUNT(DISTINCT gene) AS gene_cnt
FROM
`{{ RAW_DATA_TABLE }}`
WHERE
trans_cnt > 0
GROUP BY
cell
|
--
-- AGGREGATES
--
SELECT avg(four) AS avg_1 FROM onek;
SELECT avg(a) AS avg_32 FROM aggtest WHERE a < 100;
-- In 7.1, avg(float4) is computed using float8 arithmetic.
-- Round the result to 3 digits to avoid platform-specific results.
SELECT avg(b)::numeric(10,3) AS avg_107_943 FROM aggtest;
SELECT avg(gpa) AS a... |
<reponame>opengauss-mirror/Yat<gh_stars>0
-- @testpoint: 条件语句if ...then ...else
drop table if exists table_if_else_006;
create table table_if_else_006(id int not null,name varchar2(32),job varchar2(32));
insert into table_if_else_006 values (1,'kobe','player'),(2,'lucy','singer'),(3,'tom','doctors');
create or replac... |
drop table if exists entries;
create table entries (
id integer primary key autoincrement,
time timestamp not null,
name text not null,
email text not null,
position text not null,
years text not null,
'task_1' text not null,
'task_2' text not null,
'task_3' text not null,
'sq_1' text not null,
'sq_2' text not null,
's... |
SELECT * FROM people LIMIT 10;
SELECT * FROM people FETCH FIRST 10 ROWS ONLY;
|
USE gamebar
ALTER TABLE employees
MODIFY COLUMN middle_name VARCHAR(100); |
<filename>actual/views/temporal_employee.sql
CREATE OR REPLACE VIEW temporal_employee AS
SELECT
id
,departmentid
,locationid
,email
,status
,compensation
,hiredate
,createdate
,tsrange(COALESCE
(
(SELECT createdate FROM temporal.employee WHERE modelid = t.id ORDER BY create... |
<reponame>lucasnapolilapenda/dvd
/***** Table studios *****/
IF OBJECT_ID('production.Studios', 'U') is not NULL
DROP TABLE production.Studios
;
GO
/***** Table studios Creation *****/
CREATE TABLE production.Studios
(
StID SMALLINT IDENTITY(1,1) NOT NULL PRIMARY KEY,
StValue NVARCHAR(20) NOT NULL,
) |
-- 1 up
create table if not exists packages (
id integer primary key autoincrement,
arch text,
code text,
errors text,
package text,
project text,
repository text,
updated text not null default current_timestamp,
warnings text
);
create table if not exists staging (
... |
SELECT ' pg_dump --table='||table_name||' --data-only --column-inserts sakila >'|| table_name ||'.sql' table_name FROM information_schema.tables WHERE table_schema='public'
CREATE EXTENSION plperl
select name, default_version, installed_version from pg_available_extensions |
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50505
Source Host : localhost:3306
Source Database : house
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2020-06-19 07:48:33
*/
SET FOREIGN_KEY_CHECKS=0;
-... |
<gh_stars>10-100
DROP TABLE if exists ims_new_feature;
CREATE TABLE ims_new_feature
(
item_code char(18),
mps_code varchar(25),
grade varchar(20),
status ... |
<gh_stars>1-10
ALTER TABLE posts DROP COLUMN IF EXISTS author_id;
|
<reponame>rahulbelokar/SSIO2017Samples<filename>Chapter 13 - Managing and monitoring SQL Server/12 - Using xevents to detect autogrowth events.sql
--##############################################################################
--
-- SAMPLE SCRIPTS TO ACCOMPANY "SQL SERVER 2017 ADMINISTRATION INSIDE OUT"
--
-- © 20... |
<reponame>easydaniel/loan<gh_stars>10-100
CREATE TABLE IF NOT EXISTS users (
username varchar(255) NOT NULL UNIQUE primary key,
password varchar(255) NOT NULL
);
|
<reponame>chengwenxin/sqlite-parser<filename>test/sql/official-suite/savepoint5-1.sql
-- original: savepoint5.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
SAVEPOINT sp1;
CREATE TABLE t1(x);
INSERT INTO t1 VALUES(1);
SELECT count(*) FROM sqlite_master;
SELECT * FROM t1
;ROLLBACK T... |
<gh_stars>0
-- $Id: acs-sc-msg-types-create.sql,v 1.4 2015/12/04 13:50:05 cvs Exp $
begin
acs_object_type.create_type (
supertype => 'acs_object',
object_type => 'acs_sc_msg_type',
pretty_name => 'ACS SC Message Type',
pretty_plural => 'ACS SC Message Types',
table_name => 'acs_sc_... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 20 Des 2020 pada 19.50
-- Versi server: 10.4.16-MariaDB
-- Versi PHP: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
CREATE TABLE configurationkpi (
id CHAVE NOT NULL,
id_shop_group CHAVE,
id_shop CHAVE,
name CHARACTER VARYING(64) NOT NULL,
value TEXT,
date_add TIMESTAMP WITH TIME ZONE NOT NULL,
date_upd TIMESTAMP WITH TIME ZONE NOT NULL,
CONSTRAINT pk_... |
<reponame>rrickgauer/api.tasks
DELIMITER $$
CREATE FUNCTION `get_start_date_monthly`(
starts_on DATE,
occurrence_day INT
) RETURNS DATE
DETERMINISTIC
BEGIN
DECLARE firstInterval INT;
DECLARE startDate DATE;
SET firstInterval = occurrence_day - EXTRACT(DAY FROM starts_on);
SET startDate = DA... |
-- MySQL dump 10.13 Distrib 5.1.54, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: opf_ref
-- ------------------------------------------------------
-- Server version 5.1.54-1ubuntu4
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER... |
USE [master]
GO
/****** Object: Database [TP-20201C] Script Date: 4/12/2020 9:23:33 PM ******/
--DECLARE @dbname nvarchar(128)
--SET @dbname = N'TP-20201C'
--IF (EXISTS (SELECT name
--FROM master.dbo.sysdatabases
--WHERE ('[' + name + ']' = @dbname
--OR name = @dbname)))
--DROP database [TP-20201C]
GO
CREATE ... |
SELECT fn_db_add_column('host_device', 'driver', 'VARCHAR(255)');
|
<reponame>MCZbase/DDL
CREATE OR REPLACE FUNCTION "CONCATNAME" (p_key_val in varchar2 )
-- unused? No references in DDL or coldfusion
-- given a publication id, obtain a list of last names of authors, in order and year of publication.
-- @param p_key_val a publication id for which to lookup author names and year.
-... |
SELECT
1101 AS layer_code, 'boundary' AS layer_class, 'admin_level1' AS layer_name, feature_type AS gdal_type, osm_id, osm_way_id, osm_timestamp, all_tags, geometry
FROM `openstreetmap-public-data-prod.osm_planet.features`
WHERE EXISTS(SELECT 1 FROM UNNEST(all_tags) AS tags WHERE tags.key = 'boundary' AND tags.value=... |
<filename>DB_Basics_MS_SQL_Server/Exam Preparation/Washing Machine Service/10. Hard Earners.sql<gh_stars>0
SELECT TOP (3) m.FirstName + ' ' + m.LastName AS Mechanic,
COUNT(*) AS Jobs
FROM Mechanics AS m
JOIN Jobs AS j ON J.MechanicId = M.MechanicId
WHERE j.Status <> 'Finished'
GROUP BY m.MechanicId, m.FirstNa... |
### Schema
DROP DATABASE IF EXISTS dogs_db;
CREATE DATABASE dogs_db;
USE dogs_db;
CREATE TABLE dogs
(
id int NOT NULL AUTO_INCREMENT,
dog_name varchar(255) NOT NULL,
petted BOOLEAN DEFAULT false,
PRIMARY KEY (id)
);
|
insert into Contact (email, instagram, facebook, phone)
values ('<EMAIL>','@pedruxo_fah','@pedruxo_fah','77-9999-8888'),
('<EMAIL>','@ravenna','@ravenna','77 8888-7777'),
('<EMAIL>','@cairinho0','@cairinho0','77 3443-4334'),
('<EMAIL>','@cris_ag','@cris_ag','77 8888-2233'),
('<EMAIL>','@elme... |
<gh_stars>0
/* admin / pass */
insert into Users(firstname,login,email,userRole,pass) VALUES("Administrator","admin","<EMAIL>","admin","<KEY>");
insert into Users(firstname,login,email,userRole,pass) VALUES("User","user","<EMAIL>","user","<KEY>");
insert into Events(targetDate,description) VALUES(STR_TO_DATE('2019-04... |
<reponame>Flibo/discord-bot<gh_stars>0
-- Verify discordbot:botschema on pg
BEGIN;
SELECT 1/COUNT(*) FROM information_schema.schemata WHERE schema_name = 'bot';
ROLLBACK;
|
<reponame>diogocapela/isep-bddad
--eliminar tabelas (eventualmente) existentes
DROP TABLE cd CASCADE CONSTRAINTS PURGE ;
DROP TABLE musicas CASCADE CONSTRAINTS PURGE ;
DROP TABLE editoras CASCADE CONSTRAINTS PURGE ;
--criar tabelas
CREATE TABLE editoras (
id_editora INTEGER CONSTRAINT pk_editoras_id_iditora... |
<reponame>HHeyhat/module-whmcs
--
-- Table structure for table `pw_delivery_data`
--
CREATE TABLE IF NOT EXISTS `pw_delivery_data` (
`id` int(11) NOT NULL,
`reference_id` varchar(50) DEFAULT NULL,
`username` varchar(50) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`invoice_id` int(11) DEFAULT NULL,... |
USE [DataQualityDB]
GO
IF EXISTS (SELECT 1 FROM [INFORMATION_SCHEMA].[ROUTINES]
WHERE SPECIFIC_NAME = 'sExecuteStandAloneRule'
AND SPECIFIC_SCHEMA = 'DQ')
BEGIN
DROP PROC [DQ].[sExecuteStandAloneRule]
END
GO
CREATE PROC [DQ].[sExecuteStandAloneRule]
@RuleEntityAssociationCode VARCHAR (10) = 29
, @Par... |
<reponame>seijim/cloud-robotics-azure-platform-v1-sdk
--
-- Conversation API (Conversation State)
--
CREATE TABLE [RBApp].[ConversationState]
(
[SeqId] int IDENTITY NOT NULL,
[DeviceId] NVARCHAR(100) NOT NULL,
[AppId] NVARCHAR(100) NOT NULL,
[State] VARCHAR(MAX) NULL,
[Description] NVARCHAR(1000) ... |
<reponame>RoseRocket/db-muffler<filename>example/sample.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.13
-- Dumped by pg_dump version 9.6.13
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_s... |
<reponame>aviv/sqlfluff<filename>test/fixtures/dialects/mysql/delete_multitable.sql
DELETE a FROM a JOIN b USING (id) WHERE b.name = 'example';
DELETE FROM somelog WHERE user = 'jcole'
ORDER BY timestamp_column LIMIT 1;
DELETE LOW_PRIORITY QUICK IGNORE a FROM a JOIN b USING (id) WHERE b.name = 'example';
DELETE FROM... |
<filename>Databases/Commerce.Database/Schema Objects/Schemas/dbo/Programmability/Stored Procedures/GetOutstandingPartnerRedeemedDealRecords.sql
--
-- Copyright (c) Microsoft Corporation. All rights reserved.
-- Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
--
CR... |
-- IFS-8980 remove state aid column
ALTER TABLE competition DROP COLUMN state_Aid; |
<gh_stars>1-10
-- APR-2654 - Increase website domain length from upto 5 to upto 13 in Question YO-41
-- WORKFLOW: ROATP
-- DATE: 2021-08-10
UPDATE appSection
SET appSection.QnAData = REPLACE(appSection.QnAData, '.[a-z]{2,5}(:[0-9]{1,5})', '.[a-z]{2,13}(:[0-9]{1,5})')
FROM ApplicationSections appSection
INNER JOIN Appl... |
<reponame>danieldiamond/gitlab-analytics<filename>transform/snowflake-dbt/models/staging/gitlab_dotcom/xf/gitlab_dotcom_label_states_xf.sql
WITH resource_label_events AS (
SELECT *
FROM {{ref('gitlab_dotcom_resource_label_events')}}
WHERE label_id IS NOT NULL
),
aggregated AS (
SELECT
label_id,
... |
<filename>Databases Advanced - Entity Framework Core/DB Apps Introduction/ADO.NET Fetching Resultsets/SQL/SelectVillainIdByName.sql
SELECT Id
FROM Villains
WHERE Name = @name; |
<reponame>vdvorak83/2021-11-otus-spring-Vaselev<filename>07_DAO_Spring_JDBC/src/main/resources/schema.sql<gh_stars>1-10
DROP TABLE IF EXISTS author CASCADE;
CREATE TABLE author(
id BIGSERIAL,
name CHARACTER VARYING(255),
CONSTRAINT author_pk PRIMARY KEY (id)
);
DROP TABLE IF EXISTS genre CASCADE;
CREATE TA... |
<reponame>EuPathDB/ApiCommonData
create table ApiDBUserDatasets.InstalledUserDataset (
user_dataset_id number(20) not null,
name varchar(100) not null,
is_invalid number(1),
invalid_reason varchar2(1000),
primary key (user_dataset_id)
);
GRANT insert, select, update, delete ON ApiDBUserDatasets.I... |
SELECT * FROM VIEW_HISTORIES
ORDER BY INSERT_DATETIME %s
LIMIT ? OFFSET ?;
|
-- DISCLAIMER:
-- This script is provided for educational purposes only. It is
-- NOT supported by Oracle World Wide Technical Support.
-- The script has been tested and appears to work as intended.
-- You should always run new scripts initially
-- on a test instance.
set timing off
set echo off
set lines 400 pages ... |
--+ holdcas on;
set names utf8;
CREATE TABLE Çç_Ğğ_İı_Öö_Şş_Üü(col INT NOT NULL AUTO_INCREMENT);
CREATE TABLE Sevinç(col INT NOT NULL AUTO_INCREMENT);
CREATE TABLE _Şükran(col INT NOT NULL AUTO_INCREMENT);
CREATE TABLE İlhan(col INT NOT NULL AUTO_INCREMENT);
--test
SHOW FULL TABLES LIKE '%Çç%';
--test
SHOW FULL TABLES... |
--TEST: test with tables with triggers
create table variance_trigger(
col1 bit(20),
col2 bit varying,
col3 blob,
col4 clob,
col5 short
);
create table variance_action(
id int auto_increment,
str char(20)
);
--create trigger
create trigger aft_ins after insert on variance_trigger
execute inse... |
/*
SQLyog Community v13.1.5 (64 bit)
MySQL - 10.1.38-MariaDB : Database - absensi
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.