sql stringlengths 6 1.05M |
|---|
<reponame>de-jcup/eclipse-sql-editor<gh_stars>1-10
SELECT
Customers.CustomerName,
Orders.OrderID
FROM
Customers FULL
OUTER
JOIN Orders ON Customers.CustomerID= Orders.CustomerID
ORDER BY
Customers.CustomerName;
|
ALTER TABLE public.textlines ADD annotated boolean NOT NULL DEFAULT false;
ALTER TABLE public.documents ADD COLUMN annotated_line_count integer NOT NULL DEFAULT 0;
ALTER TABLE public.documents ADD COLUMN line_count integer NOT NULL DEFAULT 0;
UPDATE textlines
SET annotated = true
FROM annotations
WHERE textlines.id =... |
<filename>src/metalnx-tools/src/main/resources/migrations/V1.0.3__RemoveGroup.sql
--
-- Name: users users_username_key; Type: CONSTRAINT; Schema: public; Owner: irodsext
--
ALTER TABLE ONLY users
DROP CONSTRAINT users_username_key; |
INSERT INTO `district` (`id`, `division_id`, `district`) VALUES
(1, 1, 'Comilla'),
(2, 1, 'Feni'),
(3, 1, 'Brahmanbaria'),
(4, 1, 'Rangamati'),
(5, 1, 'Noakhali'),
(6, 1, 'Chandpur'),
(7, 1, 'Lakshmipur'),
(8, 1, 'Chattogram'),
(9, 1, 'Coxsbazar'),
(10, 1, 'Khagrachhari'),
(11, 1, 'Bandarban'),
(12, 2, 'Sirajganj'),
(1... |
<reponame>LimNoah/Qna_Repo
insert into MEMBER(userid, password, name, role) values('yuseon', '<PASSWORD>', 'choiyuseon', 'admin');
insert into MEMBER(userid, password, name, role) values('jwlim', '321', 'limjeongwoo', 'member');
insert into BOARD(id, title, writer, content) values(null, '게시판프로젝트1', '최유선', '프로젝트1');
in... |
<filename>woocommerce_flyfoxpay_gateway_settings.sql
INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES
('woocommerce_flyfoxpay_gateway_settings', 'a:9:{s:7:\"enabled\";s:3:\"yes\";s:5:\"title\";s:12:\"翔狐支付\";s:11:\"description\";s:12:\"您可以選擇翔狐支付以使用微信或是支付寶結帳\";s:12:\"instructions\";s:12:\"感謝你使... |
---------------------------------------------------------------
-- table: marc. load data
---------------------------------------------------------------
truncate marc;
copy marc from 'c:\dbdata\symphony\marc.txt' delimiter '|'; |
<reponame>malharlakdawala/DevelopersInstitute
--Exc1
--select * from items order by item_price asc
--select * from items where item_price>=80 order by item_price desc
--select*from customers order by first_name asc
--select last_name from customers order by last_name desc
--ALter table customers ADD Column cust_id SE... |
<reponame>SkillsFundingAgency/DC-Data-ULN
CREATE TABLE [Staging].[UniqueLearnerNumbers] (
[ULN] BIGINT NOT NULL,
[IsDelete] BIT CONSTRAINT [def_Staging_UniqueLearnerNumbers_IsDelete] DEFAULT ((0)) NOT NULL,
[LoadTime] DATETIME CONSTRAINT [def_Staging_UniqueLearnerN... |
<reponame>dzungtran/simple-restful<gh_stars>0
-- -------------------------------------------------------------
-- TablePlus 3.6.1(320)
--
-- https://tableplus.com/
--
-- Database: simple
-- Generation Time: 2020-06-24 20:19:24.5120
-- -------------------------------------------------------------
/*!40101 SET @OLD_CHA... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 18, 2019 at 12:06 AM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... |
UPDATE t_parametros a
SET a.valor = '5'
WHERE a.id_parametro = 'CANTIDAD_MAXIMA_SESIONES_USUARIO';
|
DROP DATABASE IF EXISTS bamazon;
CREATE DATABASE bamazon;
USE bamazon;
CREATE TABLE products(
id INT(10) AUTO_INCREMENT NOT NULL,
product_name VARCHAR(50) NOT NULL,
department_name VARCHAR(50) NOT NULL,
price DECIMAL(10,3) NOT NULL,
stock_quantity INT(10) NOT NULL,
PRIMARY KEY (id)
);
SELECT * ... |
/*
Deployment script for ObservationsTest
This code was generated by a tool.
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
*/
GO
SET ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CONCAT_NULL_YIELDS_NULL, QUOTED_IDENTIFIER ON;
SET NUMERIC_ROUNDABORT OFF;
GO
:... |
CREATE TABLE [dbo].[dnn_EasyGalleryRSSFeedImport] (
[RSSID] INT IDENTITY (1, 1) NOT NULL,
[PortalID] INT NOT NULL,
[RSSURL] NVARCHAR (1000) NOT NULL,
[UserID] INT NOT NULL,
[CategoryID] IN... |
CREATE TABLE subdivision_PK (id VARCHAR(6) NOT NULL, name VARCHAR(255) NOT NULL, level VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
INSERT INTO `subdivision_PK` (`id`, `name`, `level`) VALUES ('PK-JK', 'Azad Kashmir', 'pakistan administered area');
INSERT I... |
-- valid query
with downloads as
(
select count(*) as n -- adding comments throughout file
from `{{ params.project }}.samples.github_timeline` -- to make sure
where repository_has_downloads is true -- that it doesn't break anything
)
,nested as
(
select count(*) as n
from `{{ params.project }}.samples.github_neste... |
SELECT book_issued AS "Book", name AS "Customer", address
FROM customer
WHERE (branch_id=265 OR branch_id=266) AND address LIKE "%BL%";
SELECT category,publisher_id AS "ID",publish_year AS "YEAR"
FROM publisher
WHERE retail_price > 800;
SELECT book_id,issue_id,staus
FROM issue_status
WHERE staus
LIKE "_e%";
S... |
begin;
ALTER TABLE IF EXISTS server_log DROP COLUMN IF EXISTS payload;
ALTER TABLE IF EXISTS server_log ADD COLUMN IF NOT EXISTS weapon smallint;
ALTER TABLE IF EXISTS server_log ADD COLUMN IF NOT EXISTS damage smallint;
ALTER TABLE IF EXISTS server_log ADD COLUMN IF NOT EXISTS attacker_position geometry(POINTZ);
ALTE... |
CREATE TABLE `spotify_auth` (
`user_id` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT 'ユーザID',
`access_token` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT 'Spotify OAuth2のアクセストークン',
`refresh_token` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT 'Spotify OAuth2のリフレッシュトークン',
`expiry` datetime NOT NULL... |
-- 2018-02-10T08:14:42.040
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsRangeFilter='Y',Updated=TO_TIMESTAMP('2018-02-10 08:14:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=550561
;
|
insert into donations (donor, donee, amount, donation_date,
donation_date_precision, donation_date_basis, cause_area, url,
donor_cause_area_url, notes, affected_countries, affected_states,
affected_cities, affected_regions) values
('F.M. Kirby Foundation','Action on Smoking and Health',10000... |
CREATE PROCEDURE DeleteFournisseur
@idFournisseur int
AS
DELETE from fournisseurs where fournisseur_id =@idFournisseur
|
/****** Object: StoredProcedure [dbo].[RefreshCachedMTSJobMappingPeptideDBs] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE RefreshCachedMTSJobMappingPeptideDBs
/****************************************************
**
** Desc: Updates the data in T_MTS_PT_DB_Jobs_Cached using MTS
... |
<reponame>bazaarvoice/hive-release<filename>metastore/scripts/upgrade/oracle/upgrade-2.1.0-to-2.1.1000.oracle.sql
SELECT 'Upgrading MetaStore schema from 2.1.0 to 2.1.1000' AS Status from dual;
@038-HIVE-10562.oracle.sql;
UPDATE VERSION SET SCHEMA_VERSION='2.1.1000', VERSION_COMMENT='Hive release version 2.1.1000' wh... |
select title, tenant_id
from oci.oci_core_instance
where id = '{{ output.resource_id.value }}'; |
<gh_stars>100-1000
ALTER TABLE github_pull_requests DROP COLUMN title;
ALTER TABLE github_pull_requests DROP COLUMN author;
ALTER TABLE github_pull_requests DROP COLUMN updated_at;
|
<gh_stars>1000+
alter table tag_definitions add column applicable_object_types varchar(500) after name;
alter table tag_definition_history add column applicable_object_types varchar(500) after name;
|
DROP TABLE IF EXISTS memos;
CREATE TABLE memos (
id integer,
title text
);
INSERT INTO memos VALUES (2, 'Groonga');
INSERT INTO memos VALUES (3, 'PGroonga');
INSERT INTO memos VALUES (1, 'PostgreSQL');
CREATE INDEX grnindex ON memos USING pgroonga (id);
SET enable_seqscan = off;
SET enable_indexscan = on;
SET en... |
GRANT USAGE ON *.* TO 'vincent'@'localhost' IDENTIFIED BY PASSWORD '*<PASSWORD>';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `gema\_radio`.* TO 'vincent'@'localhost'; |
<gh_stars>1-10
CREATE TABLE [dbo].[DataStore] (
[Id] UNIQUEIDENTIFIER NOT NULL,
[Name] VARCHAR (130) NOT NULL,
[ConnectionString] VARCHAR (1000) NOT NULL,
[ProviderName] VARCHAR (130) NOT NULL,
CONSTRAINT [PK__DataStor__3214EC070E4B2A4B] PRIMARY KEY CLUSTERED (... |
<filename>dbv-1/data/schema/prc_UpdatePendingJobToCanceled.sql
CREATE DEFINER=`neon-user`@`172.16.58.3` PROCEDURE `prc_UpdatePendingJobToCanceled`(IN `p_JobID` INT, IN `p_UserName` VARCHAR(500))
BEGIN
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
/*
This procedure used to Cancel a job.
*/
UP... |
<gh_stars>0
-- Adminer 4.6.3 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `barang`;
CREATE TABLE `barang` (
`id_barang` int(11) NOT NULL AUTO_INCREMENT,
`nama_barang` varchar(50) NOT NULL,
`harga_satuan` int(11) NOT... |
<filename>distinct/select-job-id-from-employees.sql
select distinct department_id
from employees; |
<filename>sqlite3/test3.sql
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE person(
id INTEGER PRIMARY KEY,
first_name TEXT,
last_name TEXT,
age INTEGER
, dead INTEGER, phone_number INTEGER, salary FLOAT, dob DATETIME);
INSERT INTO "person" VALUES(0,'tasdik','rahman',20,0,9929,123123.0,'2015-12-09');
IN... |
<reponame>yurim7896/EtecCT-BD
CREATE DATABASE escola;
USE escola
CREATE TABLE tbaluno (
codAluno INT PRIMARY KEY IDENTITY(100,1),
nomeAluno varchar(40),
dataNascAluno DATE,
rgAluno BIGINT,
naturalAluno varchar(50)
)
CREATE TABLE tbmatricula (
codMatricula INT PRIMARY KEY IDENTITY(1,1),
dataMatricula DA... |
<reponame>SkifUA/bz-salad
#
# Database Structure of Skeleton application
#
# Tables
# Users
# - PRIMARY UNIQUE email
# - UNIQUE login
# - status - pending > active > disabled > deleted
CREATE TABLE users
(
id BIGINT(20) UNSIGNED PRIMARY KEY NOT NULL AUTO_INCREMENT,
login VARCHAR(255),
email VARCHAR(255),
create... |
<gh_stars>0
-- $$mskey$$ /^[0-9]+$/
(
SELECT TOP 1000 Auditflag_ID, semaphorename, updtime, mcmv_task_audit, history = 0
FROM mcmv_semstatus WITH(nolock)
WHERE mskey = $$mskey$$
)
UNION
(
SELECT TOP 1000 Auditflag_ID, semaphorename, updtime, mcmv_task_audit = NULL, history = 1
FROM mxpv_flaghistory... |
<reponame>mrc-rius/computational_marketing_master_thesis<filename>src/tmp_files/sql/cluster_insurance.sql
select * from cluster_insurance;
INSERT INTO cluster_insurance(insurance_name, insurance_price, insurance_level,insurance_tariff,insurance_customer_type, deleted) VALUES('Emergencia Hogar',2.5,3,'2.0 A','Domestico'... |
<filename>assets/modelo.sql
CREATE table logins(id INTEGER PRIMARY KEY,
usuario varchar(64) NOT NULL UNIQUE,
senha varchar(64) NOT NULL
);
CREATE table anuncios(id INTEGER PRIMARY KEY,
titulo varchar(64) NOT NULL UNIQUE... |
<reponame>ArizagaJose/SLTA
grant dba to "jarizaga";
create role "administrador" ;
create role "opatio" ;
create role "opuerto" ;
create role "transportista" ;
grant "administrador" to "jarizaga" ;
grant "opuerto" to "cdebethencourt" ;
grant "opatio" to "lgiffuni" ;
grant "transportista" to "acaballero" ;
grant defa... |
-- 12
SELECT CountryName, IsoCode FROM Countries
WHERE CountryName LIKE '%a%a%a%'
ORDER BY IsoCode
-- there must be a better way
-- 13
WITH CTE AS (
SELECT P.PeakName, R.RiverName, LOWER(SUBSTRING(P.PeakName, 1, LEN(P.PeakName) - 1) + R.RiverName) As Mix FROM Peaks AS P
RIGHT JOIN Rivers AS R
ON RIGHT(P.PeakName,... |
<reponame>fujiawei-dev/mysql-notes<gh_stars>1-10
create table Stocks
(
stock_name varchar(255) null,
operation enum ('Sell', 'Buy') null,
operation_day int null,
price int null
);
INSERT INTO leetcode_medium.Stocks (stock_name, operation, operati... |
SELECT
GENERATE_DATE_ARRAY(
DATE '2010-01-01', DATE '2010-01-31', INTERVAL '7' DAY
) AS my_array
|
-- Ancient Protector
SET @ENTRY := 2041;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flag... |
<reponame>bhagvank/AI-Coder
CREATE TABLE Area( AreaID INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY,AreaNAME VARCHAR(30) NOT NULL,AreaADDRESS VARCHAR(30) NOT NULL,AreaCITY VARCHAR(30) NOT NULL,AreaSTATE VARCHAR(30) NOT NULL,AreaCOUNTRY VARCHAR(30) NOT NULL,AreaZIPCODE VARCHAR(30) NOT NULL)
|
INSERT INTO recommendations (name, version, severity,
title_de, title_fr, title_it, title_en,
description_de, description_fr, description_it, description_en)
VALUES
('RECOMMENDATION_E3', 'v4_kid_high', 'MEDIUM',
'<div style=\"color: black\"><p><strong><span styl... |
/*
Navicat MySQL Data Transfer
Source Server : test_linux
Source Server Version : 50644
Source Host : 192.168.3.11:10001
Source Database : xixie0001user
Target Server Type : MYSQL
Target Server Version : 50644
File Encoding : 65001
Date: 2019-07-07 10:10:28
*/
SET FOREIGN_KEY_CHEC... |
select
akas,
id,
tags
from
aws_route53_health_check
where id = '{{ output.health_check_id.value }}'; |
<filename>app/src/main/java/com/example/mapjournal/model/MapJournalDb.sql<gh_stars>0
-- Copyright 2014 <NAME>
--
-- 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.... |
CREATE TABLE IF NOT EXISTS transactions (
transaction_hash VARCHAR(255) NOT NULL,
transferred_at DATETIME NOT NULL,
sender_wallet VARCHAR(255) NOT NULL,
receiver_wallet VARCHAR(255) NOT NULL,
... |
<gh_stars>1-10
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE `user` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
, `version` INTEGER NOT NULL
, `login` TEXT NOT NULL
, `email` TEXT NOT NULL
, `name` TEXT NULL
, `password` TEXT NULL
, `salt` TEXT NULL
, `rands` TEXT NULL
, `company` TEXT NULL
, `org_id` ... |
/****** Object: Table [T_Reading_Frame_Types] ******/
/****** RowCount: 6 ******/
SET IDENTITY_INSERT [T_Reading_Frame_Types] ON
INSERT INTO [T_Reading_Frame_Types] (Reading_Frame_Type_ID, Name, Description) VALUES (1,'F1','Sense (Forward) Strand, Frame 1')
INSERT INTO [T_Reading_Frame_Types] (Reading_Frame_Type_I... |
<reponame>malagu-org/multitenant
CREATE DATABASE IF NOT EXISTS ${databaseName} DEFAULT CHARSET utf8 COLLATE utf8_general_ci; |
BEGIN;
-- We don't remove the out of band migration when moving down.
ALTER TABLE
external_services
DROP COLUMN IF EXISTS
has_webhooks;
COMMIT;
|
<reponame>goldmansachs/obevo-kata<gh_stars>10-100
CREATE FUNCTION func564() RETURNS integer
LANGUAGE plpgsql
AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE437);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE62);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARG... |
<filename>presto-product-tests/src/main/resources/sql-tests/testcases/insert/insert_constant_and_column_from_table.sql<gh_stars>1000+
-- database: presto; groups: insert; mutable_tables: datatype|created; tables: datatype
-- delimiter: |; ignoreOrder: true;
--!
insert into ${mutableTables.hive.datatype} select 1, c_do... |
-- DHIS2-10642
update datastatisticsevent set eventtype='VISUALIZATION_VIEW' where eventtype='CHART_VIEW';
|
CREATE TABLE IF NOT EXISTS users(
username varchar(255) PRIMARY KEY NOT NULL,
password text NOT NULL,
role varchar(255) NOT NULL DEFAULT 'user'
);
INSERT IGNORE INTO users(
username,
password,
role
) VALUES(
'samsonasik',
<PASSWORD>',
'user'
);
INSERT IGNORE INTO users(
usernam... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 18, 2016 at 06:17 PM
-- Server version: 5.5.49-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.17
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
--
-- Module of commom basic functions.
-- This schema can be dropped (DROP SCHEMA tlib CASCADE) without direct side effect.
--
-- Copyright by <EMAIL> 2016, MIT license.
--
-- NOTES: usual user adaptations occurs in jrpc.*(), normalizeterm() and score() functions.
-- To rebuild system with functional changes (p... |
CREATE TABLE IF NOT EXISTS users (
uid int PRIMARY KEY,
username varchar(256) UNIQUE NOT NULL,
password varchar(256),
roles varchar(256),
created_at timestamp with time zone,
updated_at timestamp with time zone,
access_token varchar(256),
expires_at timestamp with time zone
);
-- password:<PASSWORD>... |
<reponame>manasama77/andonpolymodel
/*
Navicat Premium Data Transfer
Source Server : Mysql Local
Source Server Type : MySQL
Source Server Version : 50724
Source Host : localhost:3306
Source Schema : andon_polymodel
Target Server Type : MySQL
Target Server Version : 50724
File ... |
<gh_stars>0
/*
* create_varray2.sql
* Chapter 6, Oracle10g PL/SQL Programming
* by <NAME>, <NAME> and <NAME>
*
* This defines a varray with a null element constructor and extends it one element at a time.
*/
SET ECHO ON
SET SERVEROUTPUT ON SIZE 1000000
DECLARE
-- Define a varray of integer with 3 rows.
TYP... |
-- MySQL dump 10.13 Distrib 5.7.21, for osx10.13 (x86_64)
--
-- Host: localhost Database: test_db
-- ------------------------------------------------------
-- Server version 5.7.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... |
<filename>INFO/Books Codes/Oracle Wait Interface A Practical Guide to Performance Diagnostics & Tuning/Chapter5_page130_1.sql
select event, time_waited, average_wait
from v$system_event
where event in ('db file parallel write','free buffer waits',
'write complete waits');
|
SET SESSION SQL_MODE=ANSI_QUOTES;
--
DROP PROCEDURE IF EXISTS SET_VENDOR_TYPE_MAPPINGS;
--
DELIMITER $$
--
CREATE PROCEDURE SET_VENDOR_TYPE_MAPPINGS(P_TYPE_MAPPINGS JSON)
BEGIN
create temporary table if not exists TYPE_MAPPINGS (
VENDOR_TYPE VARCHAR(256)
,MYSQL_TYPE VARCHAR(256)
);
delete fr... |
SET LINESIZE 300
SET PAGESIZE 200
COLUMN partition_name FORMAT A10
COLUMN subpartition_name FORMAT A15
SELECT t1.owner, t1.table_name, t2.partition_name, t3.subpartition_name,
t1.blocks, t1.num_rows, t1.avg_row_len, t1.pct_free, DECODE(NVL(t1.blocks, 0) * 8192, 0, 1, 1-((t1.avg_row_len * t1.num_rows)/(t1.block... |
<reponame>jdial1/MAWDSlideTracker<filename>Database/MySQL/BlockCountReports/qryBlockCountByTimes.sql<gh_stars>1-10
/*Total Block Count: Previous Busines Day Plus 18 Hours*/
SELECT DATE_ADD(DATE_FORMAT(DATE(
CASE WEEKDAY(CURRENT_DATE)
WHEN 0 THEN SUBDATE(CURRENT_DATE,3)
WHEN 6 THEN SUB... |
<reponame>LowlyDBA/ExpressSQL<filename>uninstall_dba-multitool.sql
SET ANSI_NULLS ON;
GO
SET QUOTED_IDENTIFIER ON;
GO
SET NOCOUNT ON;
GO
/* Drop sp_doc */
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_doc]') AND [type] IN (N'P', N'PC'))
BEGIN;
DROP PROCEDURE [dbo].[sp_doc];... |
<reponame>pradeepkumarcm-egov/DIGIT-Dev<filename>finance/egov/egov-collection/src/main/resources/db/migration/main/V20170514165532__collection_branchuser_map.sql
CREATE TABLE EGCL_BRANCHUSER_MAP
(id bigint NOT NULL,
bankbranch bigint NOT NULL,
bankuser bigint NOT NULL,
isactive boolean default true,
CREATEDBY bigint NO... |
INSERT INTO `migrations` VALUES (5, '2014_10_12_000000_create_users_table', 1);
INSERT INTO `migrations` VALUES (6, '2014_10_12_100000_create_password_resets_table', 1);
INSERT INTO `migrations` VALUES (7, '2019_08_19_000000_create_failed_jobs_table', 1);
INSERT INTO `migrations` VALUES (8, '2020_11_22_003955_laratrust... |
CREATE TYPE arrangor_rolle AS ENUM (
'KOORDINATOR',
'VEILEDER'
);
CREATE TABLE nav_ansatt
(
id uuid PRIMARY KEY,
personlig_ident varchar NOT NULL UNIQUE,
telefonnummer varchar,
epost varchar,
navn VARCHAR NOT NULL
);
CREATE TABLE nav_kontor
(
id ... |
<filename>src/test/resources/thread002.test_10.sql
-- thread002.test
--
-- execsql {SELECT count(*) FROM t1}
SELECT count(*) FROM t1 |
-- file:insert_conflict.sql ln:84 expect:true
explain (costs off) insert into insertconflicttest values(0, 'Crowberry') on conflict (key) do update set fruit = excluded.fruit where excluded.fruit != 'Elderberry'
|
<gh_stars>0
CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE burgers (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
burger_name VARCHAR(255),
devoured BOOLEAN DEFAULT FALSE
); |
GRANT ALL PRIVILEGES ON testbench.* TO 'grantfail'@'%'; |
-- ======================= CREATE DATABASE =======================
CREATE DATABASE users_items;
\c users_items postgres
-- ======================= CREATE TABLES =======================
CREATE TABLE roles (-- possible roles of users
role_id INTEGER PRIMARY KEY,
role_name VARCHAR(10) UNIQUE NOT NULL
);
CREATE TA... |
<filename>DMS5/T_Organism_DB_File_Data.sql
/****** Object: Table [T_Organism_DB_File] ******/
/****** RowCount: 7028 ******/
SET IDENTITY_INSERT [T_Organism_DB_File] ON
INSERT INTO [T_Organism_DB_File] (ID, FileName, Organism_ID, Description, Active, NumProteins, NumResidues, Valid, OrgFile_RowVersion, File_Size_KB... |
<gh_stars>1-10
Select * from (
select
username,
count(InjectionLog_injectionlog.id) as LogEntries,
cast(julianday(max(InjectionLog_injectionlog.injection_time)) - julianday(min(InjectionLog_injectionlog.injection_time)) as int) as days_from_logs,
cast(julianday(date('now')) - julianday(min(InjectionLog_injection... |
@oms-run ./oms-recreate-mview.sql mv_oa_client Install/Schema/Last/ReserveDb/MViewSchema/mv_oa_client.snp
|
SELECT
st_collect (geom), route_id
FROM
mta
WHERE
time > now() - interval '1 day'
AND vid = 'MTA NYCT_1062'
GROUP BY route_id |
<reponame>stonooaks/Shuttle<filename>HermesDB/HermesDB/dbo/Tables/Additional.sql<gh_stars>0
CREATE TABLE [dbo].[Additional] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[AdditionalTypeId] INT NOT NULL,
[Name] NVARCHAR (50) NOT NULL,
[Cost] DECIMAL... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Máy chủ: localhost
-- Thời gian đã tạo: Th12 28, 2021 lúc 03:55 AM
-- Phiên bản máy phục vụ: 10.4.22-MariaDB
-- Phiên bản PHP: 7.4.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
ALTER TABLE job
DROP CONSTRAINT fk_job_last_execution;
ALTER TABLE job
ADD CONSTRAINT fk_job_last_execution
FOREIGN KEY (last_execution_id) REFERENCES job_execution
ON DELETE SET NULL;
|
<reponame>celestial-bodies/Celestial-Body-Server
create table operator
(
operator_id CHAR(16) FOR BIT DATA not null,
auth bigint,
created timestamp not null,
profile varchar(1024) not null,
rating bigint,
primary key (operator_id)
);
create table star
(
star_id ... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: pedro
* Created: 23-ago-2020
*/
create view group_members_views as
select m.*, u.name, u.email from members m join ... |
{# Fetch privileges for schema #}
SELECT
'nspacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(b.privilege_type) AS privileges,
array_agg(b.is_grantable) AS grantable
FROM
(SELECT
(d).grantee AS grantee, (d).grantor AS grantor,
(d).is_grantable A... |
------------------START------------------
ALTER TABLE EGW_CONTRACTORBILL ADD CONSTRAINT pk_egw_contractorbill PRIMARY KEY (ID);
ALTER TABLE EGW_MB_HEADER DROP COLUMN PREPARED_BY;
ALTER TABLE EGW_MB_HEADER DROP COLUMN document_number;
ALTER TABLE EGW_MB_HEADER DROP CONSTRAINT fk_mbh_billregister;
ALTER TABLE EGW_MB_HE... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 04, 2020 at 09:58 PM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
<reponame>ManishParyani/cmc-claim-store
CREATE SEQUENCE damages_claims_reference_number_seq MAXVALUE 999999 NO CYCLE;
/**
* Returns a new reference number from a 000DC001...999DC999 range.
*/
CREATE FUNCTION next_damages_claims_reference_number() RETURNS TEXT AS $$
SELECT
regexp_replace(
to_char(
nextval... |
<filename>docs/sql/category.sql<gh_stars>1-10
create table category (
id int auto_increment comment '主键自增' primary key,
name varchar(256) not null comment '分类名称',
user_id int not null comment '所属用户',
k varchar(128) not null comment '分类唯一标识'
) comment '任务分类'; |
-- randexpr1.test
--
-- db eval {SELECT 17 | case case when exists(select 1 from t1 where (not t1.d between a and f)) then t1.e when not (b=coalesce((select ~t1.c-case when (select (count(*))*(count(distinct t1.f)) from t1)>=11 then b else 19 end from t1 where not not (13<=e) and t1.b=t1.b),13)) then coalesce((select ... |
-- Copyright (c) 2017-2021, Mudit<NAME>.o.o. All rights reserved.
-- For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
CREATE TABLE IF NOT EXISTS sms
(
_id INTEGER PRIMARY KEY,
thread_id INTEGER,
contact_id INTEGER,
date INTEGER,
error_code INTEGER,
body TEXT ... |
<filename>database/rest/drop_tables.sql
drop table if exists activity_log;
drop table if exists actors;
drop table if exists actors_addresses;
drop table if exists beelduitwisselaar_batches;
drop table if exists characteristics;
drop table if exists characteristics_chargroups;
drop table if exists characteristics_label... |
<filename>poseidon/dags/cip/sql/cip-view.sql
CREATE VIEW ECP.SP_PROJECT_CASH_FLOW_FIN
(COMMENTS,
EXPEND_A1,
EXPEND_A2,
EXPEND_A3,
EXPEND_A4,
EXPEND_A5,
EXPEND_A6,
EXPEND_A7,
EXPEND_A8,
EXPEND_A9,
EXPEND_A10,
EXPEND_A11,
EXPEND_A12,
EXPEND_AYTD,
SP_NEIGHBORHOODS,
SP_COMMUNITY_PLANS,
SP_H... |
<reponame>y-ok/gsp-dba-maven-plugin<filename>src/test/resources/jp/co/tis/gsp/tools/dba/mojo/GenerateDdlMojo_test/specifiedSchemaInEdm/postgresql/expected/ddl/20_CREATE_TEST_UNIQ2.sql
CREATE UNIQUE INDEX TEST_UNIQ2 ON SCHEMA_TEST.INDEX_TEST2
(
SUB_ID_1,
SUB_ID_2
); |
<filename>importer/src/main/resources/scripts/file-centric/file-centric-snapshot-inferred-relationship-valid-destinationid.sql
/********************************************************************************
file-centric-snapshot-inferred-relationship-valid-destinationid
Assertion:
All destination ids found in t... |
<reponame>egetman/jes
-- schemaName is alias. It will be replaced with actual types in runtime
CREATE SCHEMA IF NOT EXISTS schemaName;
CREATE TABLE IF NOT EXISTS schemaName.offsets
(
id BIGSERIAL PRIMARY KEY,
offset_key VARCHAR NOT NULL UNIQUE,
value BIGINT NOT NULL DEFAULT 0
);
CREATE INDEX... |
alter table "public"."services" rename column "mesures_last_update" to "last_update";
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.