sql stringlengths 6 1.05M |
|---|
<filename>sql/new_bbg_buildings_preserve.sql
-- by: iElden
-- This file is created to allow BBG to boot on people that didn't have Kublai Vietnam DLC
INSERT INTO District_TradeRouteYields(DistrictType, YieldType, YieldChangeAsOrigin, YieldChangeAsDomesticDestination, YieldChangeAsInternationalDestination) VALUES
... |
<filename>src/test/resources/randexpr1.test_1414.sql
-- randexpr1.test
--
-- db eval {SELECT ~coalesce((select b from t1 where b between e and case when t1.c+coalesce((select 11 from t1 where (a in (+d-11,t1.f-a,b)) and t1.c in (select t1.f from t1 union select c from t1) or b between 13 and t1.b and t1.e<(c) and a>=t... |
-- file:numeric.sql ln:210 expect:true
INSERT INTO num_exp_mul VALUES (4,6,'732381731243.745115764094')
|
<reponame>flexsocialbox/una<filename>modules/boonex/persons/updates/11.0.2_12.0.0/install/sql/install.sql<gh_stars>100-1000
-- TABLES
CREATE TABLE IF NOT EXISTS `bx_persons_cmts_notes` (
`cmt_id` int(11) NOT NULL AUTO_INCREMENT,
`cmt_parent_id` int(11) NOT NULL DEFAULT '0',
`cmt_vparent_id` int(11) NOT NULL D... |
<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50553
Source Host : localhost:3306
Source Database : crm
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-08-13 19:01:47
*/
SET FOREIGN_KEY_CHECKS=... |
<gh_stars>0
insert into books_schema.books (uid, name, author)
values ('8e7e4b0a-6ccd-4dea-b50c-cc4a68596b15', 'dev_book_name1', 'dev_author_name1'); |
<reponame>suddenlyGiovanni/petition
DROP TABLE IF EXISTS signatures;
DROP TABLE IF EXISTS user_profiles;
DROP TABLE IF EXISTS users;
CREATE TABLE users(
id SERIAL PRIMARY KEY,
email VARCHAR(300) NOT NULL UNIQUE,
password VARCHAR(200) NOT NULL,
"firstName" VARCHAR(200) NOT NULL,
"lastName" VARCHAR (... |
CREATE TABLE IF NOT EXISTS locations
(
id SERIAL PRIMARY KEY,
search_query VARCHAR(255),
formatted_query VARCHAR(255),
latitude NUMERIC(8,6),
longitude NUMERIC(9,6)
);
CREATE TABLE IF NOT EXISTS weathers
(
id SERIAL PRIMARY KEY,
forecast VARCHAR(255),
time VARCHAR(255),
created_at B... |
/*
Navicat MySQL Data Transfer
Source Server : LOCALHOST
Source Server Version : 50714
Source Host : localhost:3306
Source Database : laravel_dev
Target Server Type : MYSQL
Target Server Version : 50714
File Encoding : 65001
Date: 2017-04-04 18:31:54
*/
SET FOREIGN_KEY_CHECKS=0;
... |
CREATE FOREIGN TABLE core.sd_account_use (
id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
f_org bigint,
f_user bigint NOT NULL,
d_date_modify timestamp without time zone,
n_period date NOT NULL
)
SERVER master_db
OPTIONS (schema_name 'blg', table_name 'sd_account_use');
ALTER FOREIGN TABLE core.sd_account_us... |
<filename>prisma/migrations/20211222032348_create_deliverymen/migration.sql<gh_stars>0
-- CreateTable
CREATE TABLE "deliverymen" (
"id" TEXT NOT NULL,
"username" TEXT NOT NULL,
"password" TEXT NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL ... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 24, 2020 at 02:56 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 31-07-2021 a las 00:24:15
-- Versión del servidor: 10.4.6-MariaDB
-- Versión de PHP: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... |
-- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 31, 2015 at 11:26 PM
-- Server version: 5.6.16
-- PHP Version: 5.5.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
<reponame>nobobobo/project2
USE watcher;
INSERT INTO Posts VALUES (1, "User1", "HELP!", 39.807222, -76.984722, "2020-07-07T02:44:32.603", "2020-07-07T02:44:32.603");
INSERT INTO Posts VALUES (2, "User2", "Hi", 40.807222, -76.904722, "2020-07-07T02:44:32.603", "2020-07-07T02:44:32.603");
INSERT INTO Posts VALUES (3, "U... |
<gh_stars>1-10
-- INVOICED
INSERT INTO EstParts VALUES (2,2,1,44.04);
INSERT INTO EstParts VALUES (3,2,1,44.04);
INSERT INTO EstParts VALUES (9,2,1,44.04);
INSERT INTO EstParts VALUES (22,2,1,44.04);
INSERT INTO EstParts VALUES (24,2,1,44.04);
INSERT INTO EstParts VALUES (27,2,1,44.04);
INSERT INTO EstParts VALUES (32,... |
<gh_stars>1-10
RENAME TABLE `engine_module_zxprod_language` TO `engine_zxitem_language`;
INSERT IGNORE INTO `engine_zxitem_language`(`elementId`, `value`) SELECT `elementId`, `value` FROM `engine_module_zxrelease_language`;
DROP TABLE `engine_module_zxrelease_language`; |
select NAME from STUDENTS where Marks > 75 order by substring(NAME,-3), ID; |
<filename>apex/page/10020/validation/At least One Feedback Required/At least One Feedback Required[valPlsqlFuncBoolean].sql
if :P10020_FEEDBACK is null and :P10020_RATING is null then
return false;
else
return true;
end if; |
SELECT 'init';
|
<reponame>sangecz/SL
DROP TABLE users2;
DROP TABLE shop_list;
DROP TABLE recipe_list;
DROP TABLE item;
DROP TABLE recipe; |
--
-- Trigger recursion test
--
-- test the maximum recursion level to be less than 16
create table t1 (x int);
create table t2 (x int);
create table t3 (x int);
create table t4 (x int);
create table t5 (x int);
create table t6 (x int);
create table t7 (x int);
create table t8 (x int);
create table t9 (x ... |
<filename>upgrade/1.15.0/30_hostlinks_parents.sql
ALTER TABLE hostlink MODIFY(target NULL);
CREATE TABLE hostlink_parent_map (
resource_id INTEGER NOT NULL,
parent VARCHAR2(32 CHAR) NOT NULL,
CONSTRAINT hostlink_parent_map_pk PRIMARY KEY (resource_id, parent),
CONSTRAINT hl_prnt_map_res... |
<reponame>ravwojdyla/ensembl-genes
SELECT
old_stable_id AS old_ensembl_gene_id,
new_stable_id AS new_ensembl_gene_id
FROM stable_id_event
WHERE
NOT (old_stable_id IS NULL OR new_stable_id IS NULL)
AND type="gene"
AND old_stable_id != new_stable_id
|
<filename>jeecg-p3-biz-qywx/src/main/java/com/jeecg/qywx/account/sql/QywxAgentDao_getListByProperty.sql<gh_stars>100-1000
SELECT * FROM qywx_agent AS qa where 1=1
<#include "QywxAgentDao_condition.sql"> |
<filename>workspace/testdata/simple/subscriptions.sql<gh_stars>1000+
CREATE TABLE `subscriptions` (
`user_id` bigint(20) unsigned NOT NULL,
`post_id` bigint(20) unsigned NOT NULL,
`subscribed_at` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`post_id`,`user_id`),
KEY `user_post` (`user_id`,`post_id`)
) ENGINE=I... |
create table employee(
id int,
name varchar(50),
birtday date,
email varchar(100)
);
insert into employee (id, name, birtday, email) values (1, 'Roma', '13/04/2021', '<EMAIL>');
insert into employee (id, name, birtday, email) values (2, 'Bailie', '09/01/2018', '<EMAIL>');
insert into employee (id, name, birtday, e... |
<filename>machineprod.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : mar. 26 avr. 2022 à 16:30
-- Version du serveur : 10.4.17-MariaDB
-- Version de PHP : 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 16, 2021 at 09:40 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<gh_stars>0
CREATE DATABASE Bamazon;
USE Bamazon;
CREATE TABLE products(
item_id INTEGER UNIQUE NOT NULL AUTO_INCREMENT,
product_name VARCHAR(30) NOT NULL,
department_name VARCHAR(30) NULL,
price DECIMAL (10, 2) NOT NULL,
quantity INTEGER(50) NULL,
PRIMARY KEY (item_id)
);
#Mock Data
INSERT INTO Bamaz... |
<gh_stars>0
-- Ex1: Quantos produtos temos da categoria 'artes'?
-- conta quantas linhas foram retornadas
SELECT
count(*) as qtde_linhas,
count(product_id) as qtde_produtos,
count(DISTINCT product_id) as qtde_produtos_distintos,
count(DISTINCT product_category_name) as qtde_categorias
FROM tb_pr... |
SELECT title FROM people
JOIN stars ON people.id = stars.person_id
JOIN movies ON stars.movie_id = movies.id
JOIN ratings ON movies.id = ratings.movie_id
WHERE name = "<NAME>" AND title != "Message from the King" ORDER BY rating DESC; |
SET DEFINE OFF;
CREATE UNIQUE INDEX AFW_14_FORMT_PK ON AFW_14_FORMT
(SEQNC)
LOGGING
/
|
<reponame>fibo/SQL92-JSON
SELECT *
FROM mytable
WHERE yyyymmdd = 20170101
AND country IN ( 'IT', 'US' )
|
SELECT
requestDomain,
COUNT(*) as numberOfPages,
SUM(requestsOnPage) as totalRequests
FROM (
SELECT
page AS pageUrl,
NET.HOST(url) AS requestDomain,
COUNT(*) as requestsOnPage
FROM
`httparchive.requests.2019_07_01_mobile`
GROUP BY pageUrl, requestDomain
)
GROUP BY requestDomain
HAVING numb... |
<reponame>hawkwang/BeyondMDM<filename>SymmetricDS/symmetric-server/src/test/resources/test-integration-root-setup.sql
--
-- Licensed to JumpMind Inc under one or more contributor
-- license agreements. See the NOTICE file distributed
-- with this work for additional information regarding
-- copyright ownership. JumpM... |
DROP SCHEMA IF EXISTS "<NOMBRE ESQUEMABD>";
CREATE SCHEMA "<NOMBRE ESQUEMABD>";
|
DELETE
FROM inn_reach_location;
|
INSERT INTO kiestze_gemeente (naam, postcode, nis) VALUES
('Aartselaar', 2630, 11001),
('Antwerpen', 2000, 11002),
('Boechout', 2530, 11004),
('Boom', 2850, 11005),
('Borsbeek', 2150, 11007),
('Brasschaat', 2930, 11008),
('Brecht', 2960, 11009),
('Edegem', 2650, 11013),
('Essen', 2910, 11016),
('Hemiksem', 2620, 11018)... |
<filename>hammer-sqldb/src/test/resources/test.sqlite.sql
DROP TABLE IF EXISTS `role`;
CREATE TABLE "role" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"name" text(20),
"descp" TEXT(36),
"create_time" INTEGER
);
-- ----------------------------
-- Records of role
-- ----------------------------
... |
/*
Revision: schema/20211023122824
Author: <NAME> <<EMAIL>>
Initial revision for Djinn CI
*/
CREATE TYPE visibility AS ENUM ('private', 'internal', 'public');
CREATE TYPE status AS ENUM ('queued', 'running', 'passed', 'passed_with_failures', 'failed', 'killed', 'timed_out');
CREATE TYPE driver_type AS ENUM ('ssh', ... |
-- The asterisk is used to reference all columns
select * from employees;
--We can specify columns if we do not need all data
select emp_id, emp_name from examples.employees;
/* WHERE STATEMENT */
select * from employees where emp_salary > 70000;
select emp_name, emp_title from employees where emp_id = 1000;
/* GRO... |
<gh_stars>0
-- Non-bulk dense content header with RLE compression
-- This will insert more rows than a small content header can accommodate in the same insert statement
drop table if exists nonbulk_rle_tab;
create table nonbulk_rle_tab (a int) with (appendonly=true, orientation=column, compresstype='rle_type', checksu... |
<reponame>simnim/nh_website
-- name: search_show_names_in_full_text_index
-- Search against the show name full text index using the search string.
-- label and value to satisfy https://api.jqueryui.com/autocomplete/#option-source
SELECT
( b.primaryTitle
|| ' ['
|| b.startYear
|| '-'
... |
<gh_stars>0
DELETE FROM `sys_objects_actions` WHERE `Type` = 'bx_poll' AND `Caption` = '{featured_cpt}';
INSERT INTO `sys_objects_actions` (`Caption`, `Icon`, `Url`, `Script`, `Eval`, `Order`, `Type`, `bDisplayInSubMenuHeader`) VALUES
('{featured_cpt}', 'star-o', '', 'getHtmlData(''ajaxy_popup_result_div_{ID}'', ''{b... |
<filename>ER/statement5/script.ddl
CREATE TABLE armado (
parte_idparte INTEGER NOT NULL,
etapa_idetapa INTEGER NOT NULL
);
ALTER TABLE armado
ADD CONSTRAINT armado_etapa_fk FOREIGN KEY ( etapa_idetapa )
REFERENCES etapa ( idetapa);
ALTER TABLE armado
ADD CONSTRAINT armado_parte_fk FOREIGN KE... |
<reponame>TonyDeplanque/antigaspi-back
-- CreateTable
CREATE TABLE "Aliment" (
"codebarre" TEXT NOT NULL,
"nom" TEXT NOT NULL,
"imageUrl" TEXT,
"categorie" TEXT,
"marque" TEXT,
PRIMARY KEY ("codebarre")
);
-- CreateTable
CREATE TABLE "Produit" (
"id" SERIAL NOT NULL,
"codebarre" TEXT N... |
<reponame>MatthewMcD/SPSearchReports
USE [AbleBlue_Auditing]
GO
/****** Object: Table [dbo].[SrxReportSummary] Script Date: 3/7/2017 9:18:16 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SrxReportSummary](
[ID] [int] IDENTITY(1,1) NOT NULL,
[BatchTimeStamp] [datetime] NULL,
[... |
<gh_stars>0
/*┌─────────────────────────────────────────────────────────────────────────────────────────────┐*\
│ TITLE: Install RegEx SQL CLR Functions │
├─────────────────────────────────────────────────────────────────────────────────────────────┤
│ DESCRIP... |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Servidor: mysql:3306
-- Tiempo de generación: 25-11-2019 a las 18:47:06
-- Versión del servidor: 5.7.28
-- Versión de PHP: 7.2.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
<filename>DATA BASE SQL/drop_down.sql
/*
Navicat Premium Data Transfer
Source Server : Localhost
Source Server Type : MySQL
Source Server Version : 50724
Source Host : localhost:3306
Source Schema : drop_down
Target Server Type : MySQL
Target Server Version : 50724
File Encodi... |
CREATE TABLE [dbo].[Telefones]
(
[IdCliente] INT NOT NULL,
[Ordem] INT NOT NULL,
[Telefone] VARCHAR(MAX) NOT NULL,
CONSTRAINT [FK_Telefones_Clientes] FOREIGN KEY ([IdCliente]) REFERENCES [Clientes]([Id]),
CONSTRAINT [PK_Telefones] PRIMARY KEY ([IdCliente], [Ordem])
)
|
-- Insert dummy data into snippets table
INSERT INTO snippet (title, content, expires) VALUES (
("This is a dummy snippet", "Hello, this is my dummy snippet. and this is it's content", DATE_ADD(UTC_TIMESTAMP(), INTERVAL 365 DAY)),
("Over the wintry forest", "Over the wintry\nforest, winds howl in rage\nwith no leav... |
UPDATE Employees
SET Salary *= 1.10;
SELECT Salary
FROM Employees;
|
<gh_stars>0
-- 部门表
CREATE TABLE IF NOT EXISTS t_department (
id varchar(50) primary key,
department_name varchar(100) default null,
department_code varchar(100) default null,
type int default 0,
status int default 0,
duty_desc varchar(500) default null,
parent_id varchar(500) default null,
... |
CREATE DATABASE cartaroom;
CREATE TABLE host(
company_id int(10) NOT NULL,
company_name varchar(255) NOT NULL,
company_email varchar(255) NOT NULL,
company_address varchar(255) NOT NULL,
PRIMARY KEY (company_id)
);
INSERT INTO host (company_id, company_name, company_email,company_address) VALUES (1234567890, "waves co... |
/* leave this
l:see LICENSE file
g:utility
v:151106\s.zaglio: added collate database_default
v:111205\s.zaglio: added ?varchar(max)
v:100710\s.zaglio: orderred by number
v:100228\s.zaglio: a remake more simple & faster (as fn__flds_convert)
v:091018\s.zaglio: a bug on double size of nvarch... |
<filename>JobExecutionFramework/SSISDB/catalog/Stored Procedures/get_parameter_values.sql<gh_stars>1-10
CREATE PROCEDURE [catalog].[get_parameter_values]
@folder_name nvarchar(128),
@project_name nvarchar(128),
@package_name nvarchar(260),
@reference_id bigint = NULL
AS
SET NOCOUNT ON
DECLARE ... |
DROP DATABASE IF EXISTS `velocitydb`;
CREATE DATABASE `velocitydb`; |
SELECT
TABLE_NAME, TABLE_TYPE
FROM INFORMATION_SCHEMA.TABLES
|
-- pagerfault2.test
--
-- execsql {
-- BEGIN;
-- SELECT * FROM t1;
-- INSERT INTO t1 VALUES(5, 6);
-- SAVEPOINT abc;
-- UPDATE t1 SET a = a||'x' WHERE rowid<3700;
-- }
BEGIN;
SELECT * FROM t1;
INSERT INTO t1 VALUES(5, 6);
SAVEPOINT abc;
UPDATE t1 SET a = a||'x' WHERE rowid<3700; |
-- file:insert_conflict.sql ln:155 expect:true
drop index expr_part_comp_key_index
|
-- file:misc_functions.sql ln:16 expect:true
SELECT num_nulls(NULL::text)
|
<reponame>NathanHowell/sqlfluff
{{ config(enabled=false) }}
select 1
|
# rank-scores
# https://leetcode.com/problems/rank-scores/description/
/*
Write a SQL query to rank scores. If there is a tie between two scores, both should have the same ranking. Note that after a tie, the next ranking number should be the next consecutive integer value. In other words, there should be no "holes"... |
CREATE PROCEDURE [tSQLt].[NullTestResultFormatter]
AS
BEGIN
RETURN 0;
END; |
<filename>mysql/scripts/slow.sql
SELECT start_time, user_host, MICROSECOND(query_time) AS 'query_time_microseconds', MICROSECOND(lock_time) AS 'lock_time_microseconds', rows_sent, rows_examined, db, last_insert_id, insert_id, server_id, CONVERT(sql_text USING utf8) as sql_text, thread_id FROM mysql.slow_log;
TRUNCATE m... |
ALTER TYPE coverage_status ADD VALUE IF NOT EXISTS 'registered' AFTER 'persistent failure';
update coveragerecords
set
status = 'registered',
exception = null
where
status = 'transient failure' and exception like 'No work done yet%';
|
<gh_stars>1-10
/*
The current full MRCM Domain Refset file consists of the previously published full file and the changes for the current release
*/
insert into qa_result (runid, assertionuuid, concept_id, details)
select
<RUNID>,
'<ASSERTIONUUID>',
a.referencedcomponentid,
concat('Mrcm Domain Refset: id=',a... |
START TRANSACTION ;
CREATE OR REPLACE FUNCTION check_sg_exists() RETURNS trigger
LANGUAGE plpgsql AS
$$
DECLARE
security_group_id text;
BEGIN
FOREACH security_group_id IN ARRAY NEW.security_groups
LOOP
PERFORM id FROM security_groups WHERE group_id = security_group_id;
IF NOT... |
<reponame>DSoLetsDev/hets
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET client_min_messages = warning;
-- HETS-908 (BVT: Printed Rental Agreement)
-- Ad... |
DELIMITER $$
CREATE TRIGGER after_insert_orders_item AFTER insert ON `orders_item` FOR EACH ROW
BEGIN
#///////////////////////////////////////////////////////////////////////////
DECLARE sub_product_id,product_id,quantity INT;
select `orders_item`.`sub_product_id`, `orders_item`.`orders_item`,`orders_ite... |
-- MySQL Script generated by MySQL Workbench
-- 10/28/15 16:03:44
-- 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='TRADITION... |
<reponame>PRAKASHBOSCO/travel-booking
INSERT INTO `gmz_earnings` (`id`, `user_id`, `total`, `balance`, `net_earnings`, `created_at`, `updated_at`) VALUES
(1, 1, 5682.60, 4261.95, 4261.95, '2021-02-01 09:22:46', '2021-03-25 07:32:24'); |
<gh_stars>0
SELECT sj.name AS [JobName], sj.[description] AS [JobDescription], SUSER_SNAME(sj.owner_sid) AS [JobOwner],
FORMAT(sj.date_created, 'ENTER_DATE_FORMAT') AS date_created, sj.[enabled], sj.notify_email_operator_id, sj.notify_level_email, sc.name AS [CategoryName],
js.next_run_date, js.next_run_time
FROM msdb.... |
<filename>db/seed.sql
USE employee_DB;
-- INSERT INTO employee_department (name)
-- VALUES ("IT");
-- INSERT INTO employee_role (name)
-- VALUES ("Boston College");
-- INSERT INTO employee (name)
-- VALUES ("Harvard");
-- /* OR */
-- INSERT INTO employee (name)
-- VALUES update("Emerson"), ("Northeastern"), ("MIT")... |
CREATE EVENT SESSION [SampleProcedureCall] ON SERVER
ADD EVENT sqlserver.module_start
(
SET collect_statement = 1
ACTION
(
sqlserver.client_app_name
, sqlserver.client_hostname
, sqlserver.server_instance_name
, sqlserver.server_principal_name
)
WHERE
[object_name]=N'Caller1' /* change to your tr... |
<reponame>andersonaddo/compliance-by-design-benches
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.3
-- Dumped by pg_dump version 12.3
-- Started on 2020-06-30 14:12:41 EDT
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8'... |
<reponame>ByBordex/SocialNetwork
/*
* $Id: sqlarray.sql 5406 2014-10-13 20:53:18Z unsaved $
*
* Tests basic usage of SQL Arrays
*/
CREATE TABLE a (i BIGINT PRIMARY KEY, ar INTEGER ARRAY);
INSERT INTO a VALUES (1, array [11, null, 13]);
INSERT INTO a VALUES (2, null);
INSERT INTO a VALUES (3, array [21, 22]);
* R... |
-- file:enum.sql ln:180 expect:true
DROP INDEX enumtest_hash
|
<gh_stars>10-100
-- file:comments.sql ln:26 expect:false
*/
SELECT /* Deeply nested comment.
This includes a single apostrophe to make sure we aren't decoding this part as a string.
SELECT 'deep nest' AS n1
|
<filename>resources/db/patches/mysql/0454~settings.sql
# Make sure 'indexer', 'ppa', 'innerfileblacklist' exists in Settings table.
REPLACE INTO settings (section, subsection, name, value, hint, setting) VALUES ('indexer', 'ppa',
'innerfileblacklist', '/setup\.exe|password\.url/i', 'You can add a regex here to set rele... |
<filename>sql/pgq_ext/functions/pgq_ext.upgrade_schema.sql
create or replace function pgq_ext.upgrade_schema()
returns int4 as $$
-- updates table structure if necessary
-- ----------------------------------------------------------------------
-- Function: pgq_ext.upgrade_schema()
--
-- Upgrades tables to have col... |
CREATE TABLE FIN_ENTITIES_DATA_MATRIX (
COLUMN_NAME VARCHAR2(30) NOT NULL,
COLUMN_LABEL VARCHAR2(30) NOT NULL,
GUI_TYPE VARCHAR2(30) NOT NULL,
LOOKUP_ARGUMENT VARCHAR2(30),
DATA_GROUP_ID NUMBER(3,0) NOT NULL,
STATUS_FLAG VARCHAR2(1) NOT NULL,
COLUMN_SORT_ID NUMBER(3,0) NOT NULL,
... |
DROP TABLE IF EXISTS `AUDUSD_M5`;
CREATE TABLE IF NOT EXISTS `AUDUSD_M5`(
`id` int(5) NOT NULL,
`open` varchar(30) NOT NULL,
`high` varchar(30) NOT NULL,
`close` varchar(30) NOT NULL,
`low` varchar(30) NOT NULL,
`time` varchar(30) NOT NULL);
ALTER TABLE `AUDUSD_M5` ADD PRIMARY KEY (`id`);
ALTER TABLE `AUDUSD_M... |
<reponame>JeromeRocheteau/emit<filename>emit-monitoring/emit-services/src/main/resources/fr/icam/emit/queries/callbacks/topics/update.sql
UPDATE `topic_callbacks`
SET `topic` = ?
WHERE `id` = ?; |
CREATE TABLE krateowner (
krate_id INTEGER NOT NULL,
owner_id INTEGER NOT NULL,
PRIMARY KEY (krate_id, owner_id),
foreign key (krate_id) references krate(id),
foreign key (owner_id) references owner(id)
);
|
<gh_stars>0
create database paradam
default character set utf8 default collate utf8_unicode_ci;
create database paradam_test
default character set utf8 default collate utf8_unicode_ci; |
-- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64)
--
-- Host: localhost Database: qacinema_prototype
-- ------------------------------------------------------
-- Server version 8.0.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESU... |
<gh_stars>0
CREATE FUNCTION [dbo].[SplitIdOnDelim] (
@List NVARCHAR(MAX),
@SplitOn NVARCHAR(5))
RETURNS @Results TABLE (Id NUMERIC)
AS
BEGIN
DECLARE @Value NVARCHAR(100);
WHILE (CHARINDEX(@SplitOn, @List) > 0)
BEGIN
SELECT @Value = LTRIM(
RTRIM(
SUBSTRI... |
<filename>openwpm-sql/anotherone.sql
alter table results change `access-control-allow-origin` `access-control-allow-origin` VARCHAR(1024);
create table my_table_copy as
select * from my_table
COPY tor_hostname_rev_map FROM '/home/ubuntu/tor/revdns.txt' WITH (FORMAT csv); |
<reponame>andcrypt/kelompok7<filename>event (1).sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 21, 2018 at 06:16 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
... |
-- SELECT *
-- FROM information_schema.tables
-- WHERE table_schema = 'public'
--
-- create or replace procedure export_to_json(fname text) as
-- $$
-- declare
-- tb_name text;
-- cur1 CURSOR FOR (
-- SELECT table_name
-- FROM information_schema.tables
-- WHERE table_schema = 'public');
... |
-- ***************************************************************************
-- File: 16_21.sql
--
-- Developed By TUSC
--
-- Disclaimer: Neither Osborne/McGraw-Hill, TUSC, nor the author warrant
-- that this source code is error-free. If any errors are
-- found in this source code, please rep... |
CREATe DATABASE `online_store`;
USE `online_store`;
CREATE TABLE IF NOT EXISTS `cities`
(
`city_id` INT(11) PRIMARY KEY AUTO_INCREMENT,
`name` VARCHAR(50)
);
CREATE TABLE IF NOT EXISTS `customers`
(
`customer_id` INT(11) PRIMARY KEY AUTO_INCREMENT,
`name` VARCHAR(50),
`birthday` DATE,
`city_id` INT(11),
CONSTRAINT `f... |
CREATE TABLE prueba( id INTEGER );
DROP TABLE departamento;
CREATE TABLE departamento
(
idDepartamento VARCHAR(36) PRIMARY KEY ON CONFLICT ROLLBACK
NOT NULL
UNIQUE,
nombreDepartamento VARCHAR(100) NOT NULL,
presupuesto DOUBLE NOT NULL,
historialJefes TEXT,
... |
CREATE TYPE [dbo].[QtyType]
FROM INT NULL;
|
<reponame>mihawk13/sia-sudiarsa
/*
SQLyog Ultimate v12.5.1 (64 bit)
MySQL - 10.4.10-MariaDB-log : Database - sia_sudiarsa
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 *... |
<gh_stars>0
RENAME TABLE AD TO ads;
RENAME TABLE ADPayment TO ad_payments;
RENAME TABLE ADType TO ad_types;
RENAME TABLE Activity TO activities;
RENAME TABLE Comment TO comments;
RENAME TABLE Config TO configs;
RENAME TABLE ConfigGroup TO config_groups;
RENAME TABLE FFAttendee TO ff_attendees;
RENAME TABLE FFComment TO... |
USE DBJOINS
GO
SELECT *
FROM TABLA_A
INTERSECT
SELECT * FROM TABLA_B
SELECT * FROM TABLA_A
EXCEPT
SELECT * FROM TABLA_B |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.