sql stringlengths 6 1.05M |
|---|
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Mer 20 Décembre 2017 à 10:43
-- Version du serveur: 5.5.57-0ubuntu0.14.04.1
-- Version de PHP: 5.5.9-1ubuntu4.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTE... |
<gh_stars>0
ALTER TABLE maps ADD issynched varchar(5) NOT NULL DEFAULT 'N'// |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 11, 2018 at 10:04 PM
-- Server version: 10.1.35-MariaDB
-- PHP Version: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- Specify database feedharvey_db for use
USE feedharvey_db;
-- Insert four entries into the food table
-- default in schema to set "devoured" to false, as this will be updated using the feed harvey application
INSERT INTO food (food_name) VALUES ("Peach cobbler");
INSERT INTO food (food_name) VALUES ("Fried grasshopp... |
<filename>CSC 430 - Software Engineering/Final Project/DataBaseScript_V4.sql
-- 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='TRADITIONAL,ALLOW_INVALID_DATES';
... |
-- MySQL Script generated by MySQL Workbench
-- Fri Mar 1 13:24:13 2019
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON... |
select ec.customer_id,ec.customer_name,ec.age,eo.product_name,eo.order_date
from ecustomer ec INNER JOIN eorders eo
ON ec.customer_id = eo.customer_id
select ec.customer_id,ec.customer_name,ec.age,eo.product_name,eo.order_date
from ecustomer ec left outer JOIN eorders eo
ON ec.customer_id = eo.customer_id
select eo... |
-- select the database
USE cst336_db026;
-- bar table
CREATE TABLE IF NOT EXISTS `cst336_db026`.`p_bars`(
`bar_id` INT(5) NOT NULL AUTO_INCREMENT,
`candy_name` VARCHAR(45) NOT NULL,
`wrap_color` VARCHAR(45) NOT NULL,
`nut` CHAR(1) NOT NULL,
`nut_type` VARCHAR(45) NOT NULL,
`size_oz` FLOAT(5,2) NOT NULL,
`kcal` FLOAT(5... |
<reponame>algamhr/websd<filename>user.sql
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 02, 2021 at 09:09 AM
-- Server version: 10.1.10-MariaDB
-- PHP Version: 5.5.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @O... |
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_WebTemplates_PrimaryPanelId]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[WebTemplate] DROP CONSTRAINT [DF_WebTemplates_PrimaryPanelId]
END
GO
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_WebTemplate_Version]') AND type = 'D')
BEG... |
<gh_stars>10-100
--
-- Author: Matticusau
-- Purpose: Provides detailed data for the DB Space Used Insights Widget
-- License: https://github.com/Matticusau/sqlops-mssql-db-insights/blob/master/LICENSE
--
-- When Who What
-- 2018-06-27 Matticusau Friendly column names
--
SELECT file_id [File Id]
... |
<filename>MS SQL/03.TableRelations/TableRelations-PartTWO.sql
--05. Online Store Database
CREATE DATABASE OnlineStore;
CREATE TABLE Cities
(
[Id] INT PRIMARY KEY IDENTITY NOT NULL
,[Name] VARCHAR(50) NOT NULL
)
CREATE TABLE Customers
(
[Id] INT PRIMARY KEY IDENTITY NOT NULL
,[Name] VARCHAR(50) NOT NUL... |
<reponame>igitee/thingsboard
--
-- Copyright © 2016-2022 The Thingsboard Authors
--
-- 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
--
--... |
<reponame>Ambal/mangos
ALTER TABLE db_version CHANGE COLUMN required_9651_01_mangos_quest_poi required_9656_01_mangos_command bit;
DELETE FROM command WHERE name IN ('list talents');
INSERT INTO command VALUES
('list talents',3,'Syntax: .list talents\r\n\r\nShow list all really known (as learned spells) talent rank sp... |
-- Si da error con un constraint ejecutar este comando
--ALTER TABLE people DROP CONSTRAINT DF__people__descr__19AACF41;
-- ALTER TABLE people ADD branch_company_id INT NULL;
-- ALTER TABLE people ADD company VARCHAR (255) NULL;
ALTER TABLE people ADD name2 VARCHAR (255) NULL;
ALTER TABLE people ADD last_name2 VARCH... |
-- auto-generated definition
CREATE TABLE agreements
(
agreement_id VARCHAR(255) NOT NULL
PRIMARY KEY,
seller_id VARCHAR(255) ... |
<reponame>Pennsieve/pennsieve-api
ALTER TABLE consortium_datasets
ADD COLUMN
name TEXT;
|
<reponame>cuishuang/tidb
create database issue410;
|
ALTER TABLE `buyer` ADD COLUMN `pin_was_locked_out` boolean NOT NULL DEFAULT 0;
|
-- @testpoint:创建函数指定参数数据类型是字符类型,不带精度
drop FUNCTION if EXISTS y_testfun3;
CREATE FUNCTION y_testfun3 (c_VARCHAR2 VARCHAR2,c_NVARCHAR2 NVARCHAR2,c_CLOB CLOB,c_TEXT TEXT) RETURNS VARCHAR2 AS $$
BEGIN
RETURN (c_VARCHAR2,c_NVARCHAR2,c_CLOB,c_TEXT);
END;
$$ LANGUAGE plpgsql;
/
call y_testfu... |
CREATE DATABASE billing;
USE billing;
create table accounts
(
id varchar(36) not null,
currency_code varchar(36) not null,
tariff_id varchar(36) not null,
name varchar(256) ... |
/*
Script: Find Jobs scheduled to run during a specific time range
Version: 1A
Author Info:
Author : <NAME>
E-Mail : sarab<AT>Sarabpreet (dot)com
website : www.sarabpreet.com
To get update on this or all my other scripts\blogs follow me at:
htt... |
UPDATE regions SET name = 'United Kingdom' where id = 'GB';
INSERT INTO regions (id, parent_id, name, created_at, updated_at) VALUES
('GB-ENG', 'GB', 'England', NOW(), NOW()),
('GB-NIR', 'GB', 'Northern Ireland', NOW(), NOW()),
('GB-SCT', 'GB', 'Scotland', NOW(), NOW()),
('GB-WLS', 'GB', 'Wales', NOW(), NOW());... |
<filename>01 Data Definition and Datatypes Lab/05. Adding Constraints.sql
/* https://dev.mysql.com/doc/refman/5.6/en/create-table-foreign-keys.html */
ALTER TABLE products
ADD FOREIGN KEY (category_id) REFERENCES categories(id); |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb4+deb9u2
-- https://www.phpmyadmin.net/
--
-- Client : localhost:3306
-- Généré le : Mar 06 Avril 2021 à 17:04
-- Version du serveur : 10.1.47-MariaDB-0+deb9u1
-- Version de PHP : 7.0.33-0+deb9u10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101... |
<reponame>launchql/utils
-- Revert schemas/measurements/tables/quantities/table from pg
BEGIN;
DROP TABLE measurements.quantities;
COMMIT;
|
<reponame>Jiyooung/ALGORITHM
/*
programmers : 입양 시각 구하기(1)
solved by JY
DATE : 2021.01.18
데이터가 있는 시간만 출력
*/
SELECT hour, count(*) count
FROM
(SELECT TO_CHAR(datetime, 'hh24') hour
FROM animal_outs) time
WHERE hour >= 9 and hour < 20
GROUP BY hour
ORDER BY hour; |
<reponame>launchql/utils<filename>packages/uuid/verify/schemas/uuids/schema.sql
-- Verify schemas/uuids/schema on pg
BEGIN;
SELECT verify_schema ('uuids');
ROLLBACK;
|
<reponame>WindyOktia/SIMAS
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 14, 2020 at 06:35 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.3.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 ... |
CREATE TABLE mindfulness_worksheet_5a (id INTEGER PRIMARY KEY, parent_id INTEGER, title TEXT, description TEXT, is_leaf INTEGER DEFAULT 0, is_deleted INTEGER DEFAULT 0);
INSERT INTO mindfulness_worksheet_5a (title, description, parent_id, id) VALUES ('Ček lista za neosuđivanje, potpunu svesnost i učinkovitost', 'Radni ... |
/*
Navicat Premium Data Transfer
Source Server : localhost_laragon
Source Server Type : MySQL
Source Server Version : 50724
Source Host : localhost:3306
Source Schema : newoa
Target Server Type : MySQL
Target Server Version : 50724
File Encoding : 65001
Date: 22/08/2... |
-- Compute the average of a double or int array
CREATE FUNCTION array_avg(anyarray) RETURNS double precision AS $$
SELECT avg(v) FROM unnest($1) g(v);
$$
LANGUAGE SQL IMMUTABLE;
COMMENT ON FUNCTION array_avg(anyarray) IS 'Compute the average of an array'; |
CREATE DATABASE IF NOT EXISTS `filer2`;
USE `filer2`;
CREATE TABLE IF NOT EXISTS `Users`(
`id` INT(8) NOT NULL AUTO_INCREMENT,
`username` VARCHAR(45) NOT NULL UNIQUE,
`email` VARCHAR(45) NOT NULL UNIQUE,
`password` VARCHAR(150) NOT NULL,
`level` ENUM("Root","Admin","Client") NOT NULL,
`dirname` VARCHAR(50) UNIQU... |
<reponame>Foxpips/LayeredArchitecture
/**********************************************************************************************************************
**
** Change Control : 21/07/2005 - <NAME> rewrote sproc - left outer join into b4nVoucherPromotionLink
** and sub select to remove the exclude... |
<gh_stars>100-1000
DROP TRIGGER IF EXISTS update_hashes;
CREATE TRIGGER update_hashes AFTER UPDATE ON predb FOR EACH ROW BEGIN IF NEW.title != OLD.title THEN UPDATE predbhash SET hashes = CONCAT_WS(',', MD5(NEW.title), MD5(MD5(NEW.title)), SHA1(NEW.title)) WHERE pre_id = OLD.id; END IF; END;
|
DROP TRIGGER trg_EntityInteractionASUserActivityLog
GO
CREATE TRIGGER trg_EntityInteractionASUserActivityLog ON EntityInteraction FOR INSERT, UPDATE
AS
-- we need to make sure something is actually edited
-- this will be null if we have a UPDATE with a WHERE clause that doesnt trigger an update
IF EXISTS(SELECT * FR... |
-- 2018-01-29T10:35:16.156
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Table_Trl WHERE AD_Table_ID=540904
;
-- 2018-01-29T10:35:16.169
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Table WHERE AD_Table_ID=540904
;
-- 2018-01-29T10:35:20.009
-- I... |
-- 2018-03-22T10:28:45.903
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,544660,0,TO_TIMESTAMP('2018-03-22 10:28:45','YYYY-MM-DD HH24:MI:SS'),100,'D',... |
<gh_stars>0
ALTER TABLE /*_*/echo_event ADD event_page_id int unsigned;
|
<gh_stars>0
-- drop this dependent view only if module enabled. The module will have to recreate the view itself...
DROP VIEW IF EXISTS list_taxa_taxon_designations;
DROP VIEW list_taxa_taxon_lists;
DROP VIEW gv_taxa_taxon_lists;
DROP VIEW detail_taxa_taxon_lists;
ALTER TABLE taxa_taxon_lists
ALTER COLUMN taxonomic... |
create database producs;
create table type (
id serial primary key,
name varchar(50) not null
);
create table product (
id serial primary key,
name varchar(50) not null,
type_id int references type(id),
expired_date date not null,
price numeric(5, 2) not null
);
insert into type (id, name) values
(1, 'сыр'), ... |
USE `vtigercrm6`;
CREATE TABLE IF NOT EXISTS `vtigercrm6`.`vtiger_projectmilestone_detail` (
`projectmilestone_detailid` INT(11) NOT NULL AUTO_INCREMENT,
`result` TINYINT(4) DEFAULT NULL,
`remark` TEXT,
`act_date` DATE DEFAULT NULL,
`projectmilestoneid` INT(11) DEFAULT NULL,
`created_by` INT(11) DEFAULT NU... |
<gh_stars>100-1000
PROMPT EXEC DBMS_SESSION.SET_IDENTIFIER('&1');
EXEC DBMS_SESSION.SET_IDENTIFIER('&1');
|
-- @author prabhd
-- @created 2014-04-01 12:00:00
-- @modified 2012-04-01 12:00:00
-- @tags dml MPP-21090 ORCA
-- @optimizer_mode on
-- @description Tests for MPP-21090
\echo --start_ignore
set gp_enable_column_oriented_table=on;
\echo --end_ignore
DROP TABLE IF EXISTS mpp21090_pttab_droplastcol_addpt_numeric;
CREATE... |
<reponame>jqueguiner/cds
-- +migrate Up
ALTER TABLE worker_model
ADD COLUMN last_spawn_err TEXT DEFAULT '',
ADD COLUMN nb_spawn_err INT DEFAULT 0,
ADD COLUMN date_last_spawn_err TIMESTAMP WITH TIME ZONE;
-- +migrate Down
ALTER TABLE worker_model
DROP COLUMN last_spawn_err,
DROP COLUMN nb_spawn_err,
DROP COLUMN date_la... |
<filename>openGaussBase/testcase/KEYWORDS/parameter_specific_catalog/Opengauss_Function_Keyword_Parameter_specific_catalog_Case0032.sql
-- @testpoint:opengauss关键字parameter_specific_catalog(非保留),作为用户名
--关键字explain作为用户名不带引号,创建成功
drop user if exists parameter_specific_catalog;
CREATE USER parameter_specific_catalog PASS... |
<gh_stars>0
CREATE OR REPLACE PACKAGE pkg_inventory_management
AS
--MENU_TYPE
procedure insert_menu_type(p_name in varchar2, p_json_tag in varchar2, p_weighted in number); --ok
procedure update_menu_type(p_mt_id in number, p_name in varchar2, p_json_tag in varchar2, p_weighted in number); --ok
procedure delete_menu... |
<reponame>calwhi/molinExercises
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jun 30, 2021 at 02:52 AM
-- Server version: 8.0.25-0ubuntu0.20.04.1
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTI... |
<reponame>LYZhelloworld/Leetcode<filename>employees-earning-more-than-their-managers/solution.sql
# Write your MySQL query statement below
SELECT e.`Name` AS `Employee`
FROM `Employee` e JOIN `Employee` m
ON e.`ManagerId` = m.`Id`
AND e.`Salary` > m.`Salary`;
|
create index concurrently sykmeldingsdokument_msgid_idx on sykmeldingsdokument((sykmelding->>'msgId'));
|
--! Previous: sha1:446e048c6aad32251590d3a36f559bdf5a90dded
--! Hash: sha1:d36be0e9232e6f631725d7be9ed2fa862155aca3
alter table app_public.lilies drop column if exists ahs_ref;
drop table if exists app_public.ahs_data;
CREATE TABLE app_public.ahs_data(
id serial primary key,
ahs_id int not null unique,
na... |
<reponame>navagigs/crudCI3<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 14, 2018 at 08:37 AM
-- Server version: 10.1.29-MariaDB
-- PHP Version: 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET tim... |
CREATE VIEW v_employees_job_titles AS
SELECT
CONCAT_WS(' ', first_name, middle_name, last_name) AS full_name,
job_title
FROM
employees;
SELECT
*
FROM
v_employees_job_titles; |
<gh_stars>0
-- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64)
--
-- Host: localhost Database: fblaquiz
-- ------------------------------------------------------
-- Server version 8.0.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER... |
SELECT SUM(d.`difference`) AS 'difference'
FROM
(SELECT wd1.`first_name` AS 'host_wizard', wd1.`deposit_amount` AS 'host_wizard_deposit', wd2.`first_name` AS 'guest_wizard', wd2.`deposit_amount` AS 'guest_wizard_deposit', wd1.`deposit_amount` - wd2.`deposit_amount` AS 'difference'
FROM `wizzard_deposits` AS wd1, `wizza... |
<reponame>hsabiu/JSF2CRUDApp
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.22)
# Database: peopleware
# Generation Time: 2018-07-27 06:46:11 +0000
# ***************... |
<reponame>CFRealEstateServices/DomoETL<filename>dbo/Views/vw_IntendedDomoGroupsWithFieldChecksum.sql
create view [dbo].[vw_IntendedDomoGroupsWithFieldChecksum]
as
select
i.*,
CHECKSUM(isDefault,name) as FieldChecksum
from dbo.IntendedDOMOGroups i |
INSERT INTO public.person
(id, name, email, password, active, email_verified, created_at, updated_at)
VALUES(uuid_generate_v4(), 'Person 1', '<PASSWORD>1', '<PASSWORD>', true, false, now(), now());
INSERT INTO public.person
(id, name, email, password, active, email_verified, created_at, updated_at)
VALUES(uuid_generat... |
DROP DATABASE IF EXISTS crowd;
CREATE DATABASE crowd CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE crowd ;
SET NAMES 'utf8';
-- INNODB locking locks only the affected row and not the whole table
-- let's create the users table
DROP TABLE IF EXISTS users;
-- nvarchar is used for unicode support
CREATE TABLE... |
drop table if exists public.gardens; |
<gh_stars>1-10
INSERT INTO kotoumi_tags VALUES (1, '青藍高校');
INSERT INTO kotoumi_tags VALUES (2, '東雲学院');
INSERT INTO kotoumi_tags VALUES (3, '千歳橋高校');
INSERT INTO kotoumi_tags VALUES (4, '青藍高校');
INSERT INTO kotoumi_tags VALUES (5, '東雲学院');
INSERT INTO kotoumi_tags VALUES (6, '千歳橋高校');
INSERT INTO kotoumi_tags VALUES (... |
CREATE INDEX idx_forms_ftype ON vetd.forms (ftype) |
<filename>src/test/resources/sql/copy/dd80a92d.sql
-- file:create_table_like.sql ln:30 expect:true
/* Doesn't copy constraint */
INSERT INTO inhg VALUES ('foo')
|
<reponame>Gigelf-evo-X/evo-X<filename>evo-X-Scriptdev2/sql/Updates/0.0.2/r386_mangos.sql
UPDATE `item_template` SET `ScriptName` = 'item_Sparrowhawk_Net' WHERE `entry` = 32321;
UPDATE `item_template` SET `ScriptName` = 'item_Blackwhelp_Net' WHERE `entry` = 31129;
UPDATE `creature_template` SET `ScriptName` = 'npc_spir... |
-- comments table
CREATE TABLE IF NOT EXISTS `comment` (
`comment_id` int(11) NOT NULL AUTO_INCREMENT,
`biblio_id` int(11) NOT NULL,
`member_id` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
`comment` text COLLATE utf8_unicode_ci NOT NULL,
`input_date` datetime DEFAULT NULL,
`last_update` datetime DEFAULT N... |
<reponame>GregEakin/NutrishSr28<gh_stars>1-10
-- This file is a support file to the Nutrient Data file. It provides the 3-digit nutrient code,
-- unit of measure, INFOODS tagname, and description.
CREATE TABLE NUTR_DEF
(
NUTR_NO CHAR(3) PRIMARY KEY NOT NULL,
UNITS CHAR(7) NOT NULL,
TAGNAME VARCH... |
-- +migrate Up
create table products (
id serial primary key,
uuid uuid not null,
document jsonb not null,
created_at_utc timestamp not null,
updated_at_utc timestamp null
);
-- +migrate Down
drop table products; |
<reponame>mosoft521/lemon<gh_stars>1000+
-------------------------------------------------------------------------------
-- disk share
-------------------------------------------------------------------------------
CREATE TABLE DISK_SHARE(
ID BIGINT NOT NULL,
SHARE_TYPE VARCHAR(50),
SHARE_TIME DATE... |
<reponame>sdepablos/bigquery-utils<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/licenses/LICENSE-2.0
... |
use master;
go
CREATE TABLE t2513(
dto datetimeoffset,
dt2 datetime2,
dt datetime,
sdt smalldatetime,
d date,
t time);
INSERT INTO t2513 values ('1900-01-01 00:00:00', '1900-01-01 00:00:00', '1900-01-01 00:00:00', '1900-01-01 00:00:00', '1900-01-01', '00:00:00'); -- all same
INSERT INTO t2513 values ('1900-01... |
<reponame>acrelle/infobot-src<gh_stars>0
--
-- Table structure for table `factoids`
--
CREATE TABLE `factoids` (
`factoid_key` varchar(64) NOT NULL,
`requested_by` varchar(100) default NULL,
`requested_time` int(11) default NULL,
`requested_count` smallint(5) unsigned NOT NULL default '0',
`created_by` varch... |
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
select sleep(0.5); -- make sure this transaction starts after the first transaction.
start transaction;
select 'sql 2: sleeping 2 seconds ...';
select 'sql 2', sleep(2);
update t_isolation set name='txn2' where id=0;
select 'sql2 updated';
select 'sql 2: commit';
commit... |
/*
IF EXISTS (SELECT name FROM sysobjects WHERE (name = 'MemberCase_Update' AND type = 'P'))
DROP PROCEDURE dbo.MemberCase_Update
GO
*/
CREATE PROCEDURE dbo.MemberCase_Update
/* STORED PROCEDURE - INPUTS (BEGIN) */
@memberCaseId BIGINT,
@memberId BIGINT,
@... |
alter table AccessRulesData drop constraint FKABB4C1DFDBBC970;
alter table AdminEntityData drop constraint FKD9A99EBCB3A110AD;
drop table if exists AccessRulesData cascade;
drop table if exists AdminEntityData cascade;
drop table if exists AdminGroupData cascade;
drop table if exists AdminPreferencesData cascade;
drop ... |
<reponame>mbilalshafiq9/MyChatapp
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 09, 2019 at 10:56 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_z... |
<gh_stars>0
--
-- Created by SQL::Translator::Producer::MySQL
-- Created on Fri May 6 02:15:44 2011
--
SET foreign_key_checks=0;
DROP TABLE IF EXISTS `person`;
--
-- Table: `person`
--
CREATE TABLE `person` (
`person_id` integer NOT NULL auto_increment,
`name` varchar(100) NOT NULL,
`password` text NOT NULL,... |
SET FOREIGN_KEY_CHECKS=0;
/*ALTER TABLE docentes ENABLE TRIGGERS ALL; */
ALTER TABLE `docentes` CHANGE `organisamohabilitante_id` `organismohabilitante_id` INT( 10 ) UNSIGNED NOT NULL;
ALTER TABLE `aud_docentes_log` CHANGE `organisamohabilitante_id` `organismohabilitante_id` INT( 10 ) UNSIGNED NOT ... |
// Uniqueness constraints.
// Constraints build indexes as well.
//
CREATE CONSTRAINT ON (i:Institution) ASSERT i.Name IS UNIQUE
CREATE CONSTRAINT ON (s:State) ASSERT s.Name IS UNIQUE
CREATE CONSTRAINT ON (c:Country) ASSERT c.Name IS UNIQUE
CREATE CONSTRAINT ON (y:Year) ASSERT y.Year IS UNIQUE
CREATE CONSTRAINT ON (m:... |
<reponame>xmiq/TheGamerPlayerManager<gh_stars>0
-- =============================================
-- Author: <NAME>
-- Create date: 1st October 2016
-- Description: Get User Details
-- =============================================
CREATE PROCEDURE [Login].[usp_GetUserDetails]
@Token uniqueidentifier
AS
BEGIN
/* SET ... |
<filename>query-all.sql
SELECT
e.id AS ID,
e.first_name AS First,
e.last_name AS Last,
e.role_id AS Role,
r.salary AS Salary,
m.last_name AS Manager,
d.name AS Department
-- JOIN EMPLOYEE to its self
FROM employee e
LEFT join employee m
ON e.manager_id = m.id
-- JOIN role to e... |
AlterInvoicesTable: alter table `invoices` add `po_number` varchar(20) null after `hospital_id`, add `special_notes` varchar(5000) null after `po_number`
AlterInvoicesTable: alter table `invoices` drop `next_step`
AlterInvoicesTable: alter table `invoices` drop `last_step`
AlterProcedureInformationTable: ALTER TABLE pr... |
<reponame>tclohm/project-pizza-api
CREATE TABLE IF NOT EXISTS venues (
id bigserial PRIMARY KEY,
name text NOT NULL,
lat double precision NOT NULL,
lon double precision NOT NULL,
address text NOT NULL
); |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 18, 2018 at 05:53 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... |
<filename>warehouse/models/prep/serious_incidents_total.sql
SELECT
"1"::numeric AS suicide_count
, "2"::numeric AS attempted_suicide_count
, "3"::numeric AS death_in_custody_count
, "4"::numeric AS escape_count
, "5"::numeric AS assault_count
, "6"::numeric AS sexual_assault_count
, "7"::num... |
<reponame>Ancymonek/gugik2osm-1
drop table if exists bdot_buildings_old;
alter table bdot_buildings rename to bdot_buildings_old;
alter index idx_bdot_buildings_geom rename to idx_bdot_buildings_geom_old;
alter table bdot_buildings_new rename to bdot_buildings;
alter index idx_bdot_buildings_geom_new rename to idx_bdot... |
alter table avtale add column gjeldende_innhold_id uuid references avtale_innhold(id);
update avtale set gjeldende_innhold_id=(select id from avtale_innhold ai where avtale.id=ai.avtale and versjon=(select max(versjon) from avtale_innhold ai2 where ai2.avtale=avtale.id)); |
--
-- PostgreSQL database dump
--
-- Dumped from database version 11.5 (Debian 11.5-1.pgdg90+1)
-- Dumped by pg_dump version 11.5
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_catalog.set_conf... |
INSERT INTO `addon_account` (`name`, `label`, `shared`) VALUES
('society_fishing','Poissonnerie',1)
;
INSERT INTO `addon_inventory` (`name`, `label`, `shared`) VALUES
('society_fishing','Poissonnerie', 1)
;
INSERT INTO `datastore` (`name`, `label`, `shared`) VALUES
('society_fishing', 'Poissonnerie', 1)
;
INSERT ... |
alter table order_detail add column location_id integer; |
/*----------------------------------------------------------------------
Name : ReportGetTrainingProviderByStatusAndManagedBy
Description : returns Learning Provider Based on Status and ManagingArea Id
History:
--------
Date V... |
<filename>membership.sql
CREATE TABLE IF NOT EXISTS `app_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`firstname` varchar(100) NOT NULL,
`lastname` varchar(100) NOT NULL,
`username` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`email` varchar(150) NOT NULL,
`server_created` timestamp NOT NUL... |
<filename>categorias/sql/postgresql/2622.sql
select c.name from customers as c
inner join legal_person as l on c.id=l.id_customers;
|
<reponame>namkyodai/2022-UrbanComputation-SUTD<gh_stars>1-10
update public.practice set remaining_lease = REPLACE (remaining_lease ,' ','');
update public.practice set remaining_lease = REPLACE (remaining_lease ,'months','');
|
-- see: https://www.postgresql.org/docs/14/ddl-constraints.html
CREATE TABLE products (
product_no integer,
name text,
price numeric CHECK (price > 0)
);
CREATE TABLE products (
product_no integer,
name text,
price numeric CONSTRAINT positive_price CHECK (price > 0)
);
CREATE TABLE products (... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 22, 2019 at 01:54 AM
-- Server version: 10.1.35-MariaDB
-- PHP Version: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: 2019-08-04 01:52:05
-- 服务器版本: 5.7.21
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 04, 2015 at 05:42 AM
-- Server version: 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_CLIENT */... |
<gh_stars>0
{{
config(
materialized='table'
)
}}
WITH product_stock AS (
SELECT
order_date,
p.product_id,
name,
price,
quantity,
quantity_sold,
quantity - quantity_sold AS quantity_available,
CASE WHEN quantity - quantity_sold > 0 THEN 'On Stock' ELSE 'Not Available' END ... |
<filename>etl/cdm_source_provenance.sql
--This is DDL for the NAACCR ETL SQL provenance format.
CREATE TABLE cdm_source_provenance(
cdm_event_id BIGINT NOT NULL,
cdm_field_concept_id INTEGER NOT NULL,
record_id varchar(255) NOT NULL
);
|
<filename>server/src/main/resources/db/bootstrap/V52__addon_natural_text_action_parameters.sql<gh_stars>100-1000
DROP TABLE IF EXISTS `addon_natural_text_action_parameters`;
CREATE TABLE `addon_natural_text_action_parameters`
(
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`addon_na... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.