sql stringlengths 6 1.05M |
|---|
CREATE PROC [dbo].[procAcessoConsolidadoTotal_Criar]
AS
BEGIN TRAN tranAcessoCosolidadoTotal
BEGIN
DELETE acessoConsolidadoTotal
INSERT INTO acessoConsolidadoTotal
SELECT
chave,
COUNT(chave) AS Quantidade
FROM
acesso WITH(NOLOCK)
GROUP BY
chave
END
IF @@ERROR = 0
BEGIN
CO... |
<reponame>pandzel/Demeter<gh_stars>0
// create keyspace 'demeter'
DROP KEYSPACE demeter;
CREATE KEYSPACE demeter
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
// create tables
USE demeter;
CREATE TABLE counter (
table_name TEXT PRIMARY KEY,
counter COUNTER
);
CREATE TABLE config (... |
<filename>question-pay/src/main/resources/pay.sql
CREATE TABLE Card
(
id CHAR(20) NOT NULL,
money DOUBLE DEFAULT 0.00,
del INT DEFAULT 1,
version INT DEFAULT 1,
create_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
modify_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIM... |
<reponame>chidakiyo/templa-cms<gh_stars>0
-- articles
create table articles (
name varchar(255) not null primary key,
article text,
created_at timestamp not null
);
-- members
-- create table members (
-- id serial not null primary key,
-- name varchar(64),
-- created_at timestamp not null
-- ); |
<reponame>MCZbase/DDL
CREATE INDEX "IDX_SCINAME_AUTHORSHIP" ON "TAXONOMY" ("SCIENTIFIC_NAME", "AUTHOR_TEXT")
|
<gh_stars>100-1000
/*
* Calls all the SQL scripts needed to create the entire conditions DB
* Note: Does not include the CHANNELVIEW and VIEWDESCRIPTION tables/data!
*/
@create_conddb_procedures
@create_run_core
@create_run_data
@create_monitoring_core
@create_monitoring_data
@create_dcu_core
@create_dcu_data
... |
<reponame>Axway/ats-testexplorer
GO
/****** Object: User [AtsUser] ******/
IF NOT EXISTS ( SELECT * FROM sys.database_principals WHERE name = 'AtsUser' )
BEGIN
CREATE USER [AtsUser] FOR LOGIN [AtsUser] WITH DEFAULT_SCHEMA=[AtsUser]
END
GO
/****** Object: Schema [AtsUser] ******/
IF NOT EXISTS ( SELECT ... |
<reponame>ukrocks007/retraced<gh_stars>10-100
create type environment as (
id text,
name text
);
create table project (
id text not null primary key,
created timestamp,
environments environment[],
name text
);
|
<reponame>jeanadrianza/postgres<filename>src/test/modules/unsafe_tests/sql/alter_system_table.sql
--
-- Tests for things affected by allow_system_table_mods
--
-- We run the same set of commands once with allow_system_table_mods
-- off and then again with on.
--
-- The "on" tests should where possible be wrapped in BEG... |
create temporary table gtfs_feed_info as (
SELECT
'OVapi'::text as feed_publisher_name,
'NL'::text as feed_id,
'http://www.ovapi.nl'::text as feed_publisher_url,
'nl'::text as feed_lang,
replace(cast(date 'today' as text),'-','') as feed_start_date,
replace(max(todate)::text,'-','') as feed_end_date,
nextval('gtfs_vers... |
ALTER TABLE employee
ADD FOREIGN KEY (manager_id)
REFERENCES employee(id);
|
/* For problems from 1 to 11 (inclusively) use "soft_uni" database and for the other – "geography". */
USE soft_uni;
/* 1. Employee Address
Write a query that selects:
• employee_id
• job_title
• address_id
• address_text
Return the first 5 rows sorted by address_id in ascending order.
Example:
employee_id job_title... |
<filename>imdbquery/query/23b.sql
SELECT MIN(kt.kind) AS movie_kind, MIN(t.title) AS complete_nerdy_internet_movie FROM complete_cast AS cc, comp_cast_type AS cct1, company_name AS cn, company_type AS ct, info_type AS it1, keyword AS k, kind_type AS kt, movie_companies AS mc, movie_info AS mi, movie_keyword AS mk, titl... |
ALTER TABLE Users
ADD CONSTRAINT CK_Password
CHECK (LEN(Password) >= 5) |
DROP TABLE IF EXISTS sample_db.user;
|
-- MariaDB dump 10.17 Distrib 10.4.10-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: test
-- ------------------------------------------------------
-- Server version 10.4.10-MariaDB-1:10.4.10+maria~bionic
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CH... |
INSERT INTO public.header_archive (arc_name,filtered,per_id) VALUES
('V1.csv',false,620)
,('MLII.csv',false,620)
,('V1.csv',false,644)
,('MLII.csv',false,644)
,('V5.csv',false,623)
,('MLII.csv',false,623)
,('V1.csv',false,607)
,('MLII.csv',false,607)
,('V1.csv',false,630)
,('MLII.csv',false,630)
;
INSERT INTO public.h... |
UPDATE measvalues
SET unit=$unit
WHERE dsid=(SELECT dsid FROM datasets WHERE code=$code) |
<filename>a.sql
create view "viu" AS
(select nome,cpf from cliente)
select * from "viu" where
cpf in (select cpf
from funcionario)
create index "iaiDex" ON cliente(cpf)
drop index "iaiDex"
select * from cliente
insert into cliente (nome,cpf,email) values ('teste deleteme denovo pfvr julia','7896541230','<EMAIL>'... |
<reponame>TayabKhan420/Tayab-IMS-Project
INSERT INTO `customer` (`firstName`, `surName`) VALUES ('jordan', 'harrison');
INSERT INTO `item` (`name`, `value`) VALUES ('Eggplant', 22);
INSERT INTO `orders` (`CustomerID`, `Order_ItemsID`) VALUES (1, 1);
INSERT INTO `order_itemsID` (`itemID`, `OrdersID`) VALUES (1, 1);
|
<reponame>sufhani/belajar-kod<filename>schema.sql<gh_stars>0
DROP TABLE if exists guides;
CREATE TABLE guides (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT,
body TEXT,
timestamp TIMESTAMP
); |
delete from tiles t
using prg.delta d
where 1=1
and z >= 13
and t.bbox && st_transform(d.geom, 3857)
and d.lokalnyid in %s
;
|
<filename>SQL/SQL_exercise_04/4_questions.sql
-- https://en.wikibooks.org/wiki/SQL_Exercises/Movie_theatres
-- 4.1 Select the title of all movies.
-- 4.2 Show all the distinct ratings in the database.
-- 4.3 Show all unrated movies.
-- 4.4 Select all movie theaters that are not currently showing a movie.
-- 4.5 Select... |
<reponame>alfianbastami/quiz2<filename>yoloo.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 25, 2018 at 05:40 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:0... |
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 17, 2018 at 01:10 PM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- phpMyAdmin SQL Dump
-- version 3.4.10.1deb1
-- http://www.phpmyadmin.net
--
-- ホスト: localhost
-- 生成時間: 2015 年 10 月 27 日 07:37
-- サーバのバージョン: 5.5.44
-- PHP のバージョン: 5.5.30-1+deb.sury.org~precise+1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_C... |
SET DEFINE OFF;
ALTER TABLE AFW_36_VUE_ATRIB ADD (
CONSTRAINT AFW_36_VUE_ATRIB_PK
PRIMARY KEY
(SEQNC)
ENABLE VALIDATE)
/
|
<filename>analyzer/src/benchmarks/test/test.sql
CREATE TABLE Accounts (
id INT ,
balance INT ,
name VARCHAR(10),
PRIMARY KEY (id)
);
CREATE TABLE anotherTable (
id INT ,
balance INT ,
name VARCHAR(10),
PRIMARY KEY (id)
);
|
<reponame>ansegura7/Graphs_ArangoDB
USE [OVS_DEVOPS_WFS]
GO
DECLARE @cols NVARCHAR(MAX)
WITH cte_data AS (
SELECT [index], [country], [region], [flag], [value]
FROM
(SELECT [country], [date], [total_deaths] AS [value],
ROW_NUMBER() OVER (PARTITION BY [country] ORDER BY [date]) AS [index]
FROM ... |
-- file:numeric.sql ln:859 expect:true
select div(12345678901234567890, 123)
|
-- Up
CREATE TABLE IF NOT EXISTS "artists" (
"artistId" integer PRIMARY KEY AUTOINCREMENT NOT NULL,
"name" text NOT NULL COLLATE NOCASE,
"nameNorm" text NOT NULL COLLATE NOCASE
);
CREATE UNIQUE INDEX IF NOT EXISTS idxNameNorm ON "artists" ("nameNorm" ASC);
CREATE TABLE IF NOT EXISTS "media" (
mediaId integer ... |
CREATE TABLE NOTIFICATION (
NOTIFICATION_ID DECIMAL(20,0) NOT NULL,
NOTIFICATION_TYPE_ID DECIMAL(6,0) NOT NULL,
DOCUMENT_NUMBER VARCHAR(40) NOT NULL,
SUBJECT VARCHAR(1000),
MESSAGE VARCHAR(4000),
UPDATE_USER VARCHAR(60) NOT NULL,
UPDATE_TIMESTAMP DATE NOT N... |
<reponame>Shiam-Cse-Ru/Custom-MVC-Framework
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 19, 2017 at 09:56 PM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @... |
<gh_stars>0
/**
# Ahjo - Database deployment framework
#
# Copyright 2019, 2020, 2021 ALM Partners Oy
# SPDX-License-Identifier: Apache-2.0
*/
SELECT
s.[TABLE_SCHEMA] AS [schema_name]
,s.[TABLE_NAME] AS [object_name]
,'table' AS [object_type]
,CONVERT(VARCHAR(8000), e.[name]) AS [property_name]
,... |
<filename>mysql/select/order-by.sql
select * from prisma.HashTag order by hash_tag_count DESC, popularity_score DESC limit 30;
|
<gh_stars>1-10
-- MySQL dump 10.16 Distrib 10.1.8-MariaDB, for Win32 (AMD64)
--
-- Host: localhost Database: rate_db
-- ------------------------------------------------------
-- Server version 10.1.8-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@... |
<reponame>shunyuchu/dbt5-0.1.0
/*
* This file is released under the terms of the Artistic License. Please see
* the file LICENSE, included in this package, for details.
*
* Copyright (C) 2007 <NAME>
*/
CREATE OR REPLACE FUNCTION TradeResultFrame1 (
IN trade_id BIGINT,
OUT acct_id BIGINT,
OUT charge NUMERIC... |
-- @testpoint:opengauss关键字specifictype(非保留),作为数据库名
--关键字不带引号-成功
drop database if exists specifictype;
create database specifictype;
drop database specifictype;
--关键字带双引号-成功
drop database if exists "specifictype";
create database "specifictype";
drop database "specifictype";
--关键字带单引号-合理报错
drop database if exists 's... |
DROP TABLE IF EXISTS DisciplinasCursadas;
DROP TABLE IF EXISTS matricula;
DROP TABLE IF EXISTS curriculo;
DROP TABLE IF EXISTS curso;
DROP TABLE IF EXISTS preRequisito;
DROP TABLE IF EXISTS disciplina;
DROP TABLE IF EXISTS aluno;
DROP TABLE IF EXISTS campus;
CREATE TABLE IF NOT EXISTS campus(
id tinyint unsigned a... |
<gh_stars>0
-- Sample employee database
-- See changelog table for details
-- Copyright (C) 2007,2008, MySQL AB
--
-- Original data created by <NAME> and <NAME>
-- http://www.cs.aau.dk/TimeCenter/software.htm
-- http://www.cs.aau.dk/TimeCenter/Data/employeeTemporalDataSet.zip
--
-- Current schema by <NAME>
... |
<filename>assets/dwh-sql-codegen/dw.dim_customer_main.sql
-- ETL code for loading stage.customer to dw.dim_customer_main
drop table if exists stage.dim_customer_main_batch; -- Won't drop to avoid unnoticed collisions
create table stage.dim_customer_main_batch as
select
current_timestamp as batch_date,
... |
<filename>src/main/java/com/gitee/passerr/leetcode/problem/database/page1/601.sql<gh_stars>0
# 表:Stadium
# +---------------+---------+
# | Column Name | Type |
# +---------------+---------+
# | id | int |
# | visit_date | date |
# | people | int |
# +---------------+---------+
# vis... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 22, 2021 at 11:43 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
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.8.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 27, 2018 at 12:34 PM
-- Server version: 10.1.33-MariaDB
-- PHP Version: 7.1.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 16, 2016 at 03:19 PM
-- Server version: 10.1.9-MariaDB
-- PHP Version: 5.5.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
-- https://github.com/locationtech/jts/blob/master/modules/core/src/main/java/org/locationtech/jts/triangulate/quadedge/Vertex.java#L313
CREATE OR REPLACE FUNCTION ${schema_name}.interpolateZValue(p geometry, p0 geometry, p1 geometry, p2 geometry) RETURNS double precision AS
'
DECLARE
x0 DOUBLE PRECISION;
y0 DOUBLE... |
<reponame>Jai-Chaudhary/intro-data-course
SELECT A.docid, B.docid, SUM(A.count * B.count)
FROM frequency AS A,frequency AS B
-- WHERE A.term = B.term AND A.docid = '10080_txt_crude' AND B.docid = '17035_txt_earn'
GROUP BY A.docid, B.docid;
|
CREATE TABLE CensusSnapshots (
CensusSnapshotId BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
SectionId INT NOT NULL,
SnapshotCode VARCHAR(12) NOT NULL,
CurrentAvailableSeatCount INT NOT NULL,
CurrentEnrollmentCount INT NOT NULL,
MaxEnrollmentCount INT NOT NULL,
StudentCount INT NOT NULL,
WaitCou... |
<reponame>liupangzi/codekata<filename>leetcode/Database/196.DeleteDuplicateEmails/solution.sql
DELETE FROM Person WHERE Id NOT IN (
SELECT minID FROM (
SELECT Min(Id) AS minID FROM Person
WHERE Email In (SELECT DISTINCT Email FROM Person)
GROUP BY Email
) Q
)
-- OR:
-- DELETE p1 FROM Person p1, Pe... |
-- CREATE INDEX votes_entry_id_foreign ON votes (entry_id);
-- CREATE INDEX votes_user_id_foreign ON votes (user_id);
-- CREATE INDEX password_reminders_email_index ON password_reminders (email);
-- CREATE INDEX password_reminders_token_index ON password_reminders (token);
-- CREATE INDEX users_username_unique ON users... |
<gh_stars>1-10
ALTER TABLE beacon
ADD COLUMN last_modified_date timestamp;
UPDATE beacon
SET last_modified_date = created_date;
ALTER TABLE beacon
ALTER COLUMN last_modified_date SET NOT NULL; |
/*********************************************************************************************************************
**
** Procedure Name : dbo.threeBusinessOrderSearch
** Author : <NAME>
** Date Created :
**
********************************************************... |
<filename>sql/destructions.sql
DROP TABLE IF EXISTS destructions;
CREATE TABLE destructions (
tx_index INTEGER UNSIGNED,
-- tx_hash TEXT,
tx_hash_id INTEGER UNSIGNED, -- id of record in index_transactions
block_index INTEGER UNSIGNED,
-- source TEXT,
source_id INTEGER UNSIGNED, -- id of... |
<gh_stars>1-10
CREATE PROCEDURE [ml].[upsert_model]
@name NVARCHAR(50)
, @model VARBINARY(max)
, @training_n INT = NULL
, @test_n INT = NULL
, @key_metric VARCHAR(50) = NULL
, @key_metric_val FLOAT = NULL
, @metrics VARCHAR(MAX) = NULL
, @info VARCHAR(MAX) = NULL
AS
WITH MySource as (
SELECT
@name ... |
MATCH (u1:Users)-[:WATCHED]->(m3:Movies)
WHERE u1.userId=8
WITH [i in m3.movieId | i] as movies
MATCH path = (u:Users)-[:WATCHED]->(m1:Movies)-[s:SIMILAR]->(m2:Movies),
(m2)-[:GENRES]->(g:Genres),
(u)-[:FAVORITE]->(g)
WHERE u.userId =8 and not m2.movieId in movies
RETURN distinct u.userId as userId, g.genres as genres,... |
/*
* File: 19_epirf_mirror_sth.sql
* File Created: Tuesday, 12th May 2020 6:14:20 pm
* Author: <NAME>
* Last Modified: Thursday, 2nd July 2020 8:42:46 pm
* Modified By: <NAME>
* -----
* (c) 2020, WHO/AFRO/UCN/ESPEN
*/
SELECT
'cartographie' "Type d'enquête",
municipio "Nom de l'unité",
code_school "Code ... |
<reponame>Alexandre-Caetano-eng/TrabalhoBD
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 19-Jun-2021 às 03:31
-- Versão do servidor: 5.7.25
-- versão do PHP: 7.1.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time... |
--
--
-- Kills the session specified with the SID as argument.
--
-- SQLPLUS> @kill 190
--
-- whereas the required SID can be determined with a
--
-- SQLPLUS> select SID, .., ... from v$session where ...
--
declare
sid_ number := &1;
serial_ number;
begin... |
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.6.20)
# Database: dhweb
# Generation Time: 2016-05-25 07:27:21 +0000
# *************************************************... |
DROP FUNCTION set_updated_at();
|
<reponame>jankytara2/dbt
-- update records 11 - 21. Change email and updated_at field
update {schema}.seed set
updated_at = updated_at + interval '1 hour',
email = case when id = 20 then '<EMAIL>' else 'new_' || email end
where id >= 10 and id <= 20;
-- invalidate records 11 - 21
update {schema}.snapsh... |
<gh_stars>1-10
drop keyspace if exists json_test;
create keyspace if not exists json_test
with replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
use json_test;
drop table if exists documents;
create table if not exists documents (
id uuid,
object text,
primary key (id)
);
insert into document... |
<reponame>Ghvstcode/customers<filename>migrations/007_create_customer_ssn.up.sql
create table customer_ssn(
customer_id varchar(40) primary key,
ssn BLOB,
ssn_masked varchar(9),
created_at datetime
);
|
-- Copyright 2018 <NAME>. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
--------------------------------------------------------------------------------
--
-- File name: smem.sql
-- Purpose: Show process memory ... |
<filename>FoodDataSQL/src/main/resources/sql/admin/category_contents_subcategories_headers.sql
WITH v AS(
SELECT (SELECT code FROM categories WHERE code={category_code}) AS category_code,
(SELECT id FROM locales WHERE id={locale_id}) AS locale_id
)
SELECT v.locale_id, v.category_code, subcategory_code AS cod... |
-- script that creates the database hbtn_0d_2 and the user user_0d_2.
CREATE DATABASE IF NOT EXISTS hbtn_0d_2;
CREATE USER IF NOT EXISTS 'user_0d_2'@'localhost' IDENTIFIED BY 'user_0d_2_pwd';
GRANT SELECT ON hbtn_0d_2.* TO 'user_0d_2'@'localhost'; |
-- --------------------------------------------------------
-- 호스트: 127.0.0.1
-- 서버 버전: 10.3.11-MariaDB - mariadb.org binary distribution
-- 서버 OS: Win64
-- HeidiSQL 버전: 9.4.0.5125
-- -------------------------------------------... |
-- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: estore
-- ------------------------------------------------------
-- Server version 8.0.15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4... |
<reponame>dacm26/amazon-laravel
USE amazon;
DELETE FROM carts WHERE customer_id = 1 AND product_id = 1; |
<gh_stars>0
DROP DATABASE IF EXISTS restaurants;
CREATE DATABASE restaurants;
USE restaurants;
CREATE TABLE banners (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(100),
logo_img VARCHAR(100),
bg_img VARCHAR(100),
address VARCHAR(100),
ph_number VARCHAR (100),
rating INT,
no_of_ratings INT,
bookmark BOOLE... |
<reponame>berdichevskyivan/thesilentplanet
select es.equipment_slot_id,
es.equipment_slot_name,
items.item_id,
items.item_name,
items.item_text,
items.item_effect_type,
items.item_effect_modified_stat,
items.item_effect_impact
from equipment_slots es
left outer join items on es.equipment_slot_id=items.equipment_slot_id... |
ALTER TABLE users DROP COLUMN city
|
CREATE PROCEDURE [dbo].[usp_sqlwatch_internal_get_data_collection_snapshot_xml]
@snapshot_type_id tinyint,
@snapshot_data_xml xml output,
@debug bit = 0
as
begin
set nocount on;
declare @sql nvarchar(max),
@prep_sql nvarchar(max),
@sql_header nvarchar(max),
@parameters nvarchar(128),
@sql_version sm... |
COPY
{{tableName}}(
prv_db,
id_prv,
prv_name,
prv_url,
prs_manager,
prv_type_id,
prv_type,
prs_state_id,
prs_state,
accept_status_id,
accept_status,
shema_id,
shema,
prv_add_date,
contract_date_from,
agregator,
prv_global_name,
prv_merch_name,
prv_first_txn_dat... |
<reponame>zalexa19/OpenU<gh_stars>0
--Question A
--<NAME>
create table customer
(cid numeric(5,0),
name varchar(30),
address varchar(50),
primary key (cid));
create table magazine
(title varchar(30),
publisher varchar(30),
topic varchar(30) not null,
frequency varchar(10),
url varchar(100),
primary key ... |
set feed off
set markup html on
spool on
spool C:\Users\Purushottam\Pictures\jhjhj.xls
select hq_no,hq_txt,hopt1,hopt2,hopt3,hopt4,hans_txt,hans_no,hq_expln from holdimport;
spool off
set markup html off
commit;
exit;
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET... |
-- counts unique libs listed in the pypi_dependencies column. takes a while.
select jsonb_array_elements(pypi_dependencies) as deps, count(jsonb_array_elements(pypi_dependencies)) as count
from github_repo where pypi_dependencies is not NULL
group by deps
order by count desc
limit 100;
|
<reponame>yollelaw/FiiiCoin
--
-- 由SQLiteStudio v3.1.1 产生的文件 周二 7月 31 16:56:44 2018
--
-- 文本编码:System
--
PRAGMA foreign_keys = off;
BEGIN TRANSACTION;
-- 表:Accounts
CREATE TABLE IF NOT EXISTS Accounts (
Id VARCHAR (64) NOT NULL
PRIMARY KEY,
PrivateKey VARCHAR (64),
P... |
<gh_stars>10-100
-- file:alter_table.sql ln:1400 expect:true
ANALYZE check_fk_presence_2
|
-- file:foreign_data.sql ln:272 expect:true
CREATE FOREIGN TABLE ft1 () SERVER no_server
|
UPDATE application_event
SET eventdata = jsonb_set(eventdata, '{workflow/type}', '"workflow/dynamic"')
WHERE eventdata ->> 'event/type' = 'application.event/created'
AND eventdata ->> 'workflow/type' = 'workflow/default';
--;;
UPDATE workflow
SET workflowbody = jsonb_set(workflowbody, '{type}', '"workflow/dynamic"')
... |
<reponame>dram/metasfresh<gh_stars>1000+
alter table C_Invoice_Candidate_Recompute set with oids;
create index C_Invoice_Candidate_Recompute_oid on C_Invoice_Candidate_Recompute(oid);
|
<reponame>jlow-usgs/earthquake-event-ws
delimiter //
DROP PROCEDURE IF EXISTS getProductProperty//
CREATE PROCEDURE getProductProperty(IN in_productid INT,
IN in_name VARCHAR(255), OUT out_value TEXT CHARACTER SET 'utf8')
READS SQL DATA
BEGIN
DECLARE done INT DEFAULT 0;
DECLARE cur_property CURSOR FOR
SELEC... |
<reponame>fiser-tinhpt5/issue-management-app
DROP TABLE IF EXISTS `issue`;
CREATE TABLE `issue` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`issue` varchar(200) NOT NULL,
`raised_date` datetime NOT NULL,
`challenge` varchar(200) DEFAULT NULL,
`status` varchar(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEF... |
ALTER TABLE equipments ADD COLUMN q_in_q_selectable_by_vlan_if_capability boolean;
ALTER TABLE nodes ADD COLUMN q_in_q_type text;
ALTER TABLE vlan_ifs ADD COLUMN q_in_q boolean;
|
insert into Books (isbn, title, author) values ('1234567890', 'Spring in Action, 5th Edition', '<NAME>');
insert into Books (isbn, title, author) values ('9876543210', 'Knitting with Dog Hair', '<NAME>');
insert into Books (isbn, title, author) values ('1920394950', 'Crafting with Cat Hair', '<NAME>'); |
-- -------------------------------------------------------------------
-- @2020, Odysseus Data Services, Inc. All rights reserved
-- MIMIC IV CDM Conversion
-- -------------------------------------------------------------------
-- -------------------------------------------------------------------
-- QA tests for cdm_... |
<reponame>zishuimuyu/jeewx
<#if qywxAutoresponseDefault.templatename ?exists && qywxAutoresponseDefault.templatename ?length gt 0>
/* 模板名称 */
and qad.templatename like CONCAT('%', :qywxAutoresponseDefault.templatename ,'%')
</#if>
<#if qywxAutoresponseDefault.templateid ?exists && qywxAutoresponseDefaul... |
-- +migrate Up notransaction
ALTER TYPE enum_alert_log_event ADD VALUE IF NOT EXISTS 'acknowledged';
ALTER TYPE enum_alert_log_event ADD VALUE IF NOT EXISTS 'policy_updated';
ALTER TYPE enum_alert_log_event ADD VALUE IF NOT EXISTS 'duplicate_suppressed';
ALTER TYPE enum_alert_log_event ADD VALUE IF NOT EXISTS 'escala... |
CREATE
DATABASE playground
WITH
OWNER = postgres
ENCODING = 'UTF8'
CONNECTION LIMIT = -1;
COMMENT
ON DATABASE playground
IS 'Diploma database'; |
<filename>templates/proprietes_baties_line.tpl.sql
SELECT
l.ccosec AS section, ltrim(l.dnupla, '0') AS ndeplan,
ltrim(l.dnvoiri, '0') || l.dindic AS ndevoirie,
CASE WHEN v.libvoi IS NOT NULL THEN v.natvoi || v.libvoi ELSE p.cconvo || p.dvoilib END AS adresse,
l.ccoriv AS coderivoli,
l.dnubat AS bat, l.descr AS ent, l.... |
<reponame>zxx1988328/ytwo<filename>web/data/yii_user.sql<gh_stars>1-10
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50535
Source Host : localhost:3306
Source Database : yii2
Target Server Type : MYSQL
Target Server Version : 50535
File Encoding : ... |
-- @testpoint:opengauss关键字schema(非保留),作为角色名
--关键字不带引号-成功
drop role if exists schema;
create role schema with password '<PASSWORD>' valid until '2020-12-31';
drop role schema;
--关键字带双引号-成功
drop role if exists "schema";
create role "schema" with password '<PASSWORD>' valid until '2020-12-31';
drop role "schema";
--关... |
<reponame>mizambaev/test_task
-- MySQL dump 10.13 Distrib 8.0.25, for Linux (x86_64)
--
-- Host: localhost Database: test
-- ------------------------------------------------------
-- Server version 8.0.25-0ubuntu0.20.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER... |
create view vw_schemas_libraries_extended as
select
a.name as "Local authority",
a.code as "Local authority code",
l.name as "Library name",
l.address_1 as "Address 1",
l.address_2 as "Address 2",
l.address_3 as "Address 3",
l.postcode as "Postcode",
p.longitude as "Postcode longitude",
p.latitude as ... |
<filename>ventas_ci2 (1).sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 21-04-2019 a las 01:13:36
-- Versión del servidor: 10.1.38-MariaDB
-- Versión de PHP: 7.1.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
STAR... |
create table if not exists xll_terceros
(
id integer AUTO_INCREMENT PRIMARY KEY,
entity integer,
nombreFiscal varchar(128), -- company reference name (should be same length than adherent.societe)
nombreAlias varchar(128) ... |
<filename>examples/sounds/Config.prc
###########################################################
### ###
### Panda3D Configuration File - User-Editable Portion ###
### ###
#######################################... |
CREATE OR REPLACE FUNCTION add_email_verification_token_trigger()
RETURNS TRIGGER AS $BODY$
BEGIN
INSERT INTO
email_verification_tokens
(
user_id
)
VALUES
(NEW.id);
RETURN NEW;
END;
$BODY$ LANGUAGE plpgsql;
CREATE TRIGGER add_email_verification_token
AFTER INSERT ON users
FOR EACH ROW EXECUTE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.