sql stringlengths 6 1.05M |
|---|
----- create db
CREATE DATABASE catalog
ENCODING = 'UTF8'
CONNECTION LIMIT = -1;
----- remove tables
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS address;
----- create tables
CREATE TABLE address(
id SERIAL PRIMARY KEY,
index INTEGER,
city VARCHAR(100),
street VARCHAR(100),
... |
USE mydb;
CREATE TABLE USERS(
ID INT NOT NULL,
NAME VARCHAR (32) NOT NULL,
AGE INT NOT NULL,
PRIMARY KEY (ID)
);
SHOW TABLES;
-- OUTPUT:
-- Tables_in_mydb
-- USERS
INSERT INTO USERS (ID, NAME, AGE) VALUES (1, 'ann', 20);
INSERT INTO USERS (ID, NAME, AGE) VALUES (2, 'bob', 21);
INSERT INTO USER... |
CREATE SEQUENCE IF NOT EXISTS id_seq_config_map_history;
-- Table Definition
CREATE TABLE "public"."config_map_history"
(
"id" integer NOT NULL DEFAULT nextval('id_seq_config_map_history'::regclass),
"pipeline_id" integer,
"app_id" integer,
... |
ALTER TABLE phabricator_project.project
ADD status varchar(32) not null; |
select version, setid, pubdate, title, link, guid, description
from spl
order by pubdate desc;
select `location`, observation_time, latitude,longitude,temperature_string, weather, pressure_string
from weatherkudu
where `location` like '%NJ%'
order by observation_time desc;
|
-- Bilderpfade für alle Gegenständer ---
ALTER TABLE Handelsgut ADD "Pfad" nvarchar(500);
ALTER TABLE Waffe ADD "Pfad" nvarchar(500);
ALTER TABLE Fernkampfwaffe ADD "Pfad" nvarchar(500);
ALTER TABLE Schild ADD "Pfad" nvarchar(500);
ALTER TABLE Rüstung ADD "Pfad" nvarchar(500);
|
<reponame>firebolt-db/dbt-firebolt
{# This is for building docs. Right now it's an incomplete description of
the columns (for instance, `is_nullable` is missing) but more could be added later. #}
{% macro firebolt__get_catalog(information_schemas, schemas) -%}
{%- call statement('catalog', fetch_result=True) %}
... |
/*
Warnings:
- A unique constraint covering the columns `[userId]` on the table `refresh_tokens` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX "refresh_tokens_userId_unique" ON "refresh_tokens"("userId");
|
<gh_stars>0
CREATE TABLE `files` (
`applicantId` varchar(250) NOT NULL DEFAULT '',
`documentId` varchar(250) NOT NULL DEFAULT '',
`docType` varchar(100) NOT NULL DEFAULT '',
`fileSize` bigint(20) NOT NULL,
`fileType` varchar(11) NOT NULL DEFAULT '',
`status` tinyint(4) NOT NULL DEFAULT 0,
UNIQUE KEY `uniq... |
<filename>procedures/updaterole.sql
DROP PROCEDURE IF EXISTS updaterole;
DELIMITER $$
CREATE PROCEDURE updaterole(p_roles_id CHAR(36),p_name VARCHAR(255))
BEGIN
UPDATE roles SET name = p_name WHERE (roles.id = p_roles_id);
END$$
DELIMITER ;
|
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.3.11
-- Generation Time: Jan 14, 2020 at 04:40 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 5.6.39
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... |
CREATE TABLE `he`.`token` (
`TokenID` int NOT NULL AUTO_INCREMENT,
`TokenString` varchar(255) NOT NULL,
`UserID` int NOT NULL,
`DateCreated` datetime NOT NULL,
PRIMARY KEY (`TokenID`)
); |
CREATE TABLE public.cluster_insurance
(
id integer DEFAULT nextval('cluster_insurance_id_seq'::regclass) PRIMARY KEY NOT NULL,
insurance_name varchar(200) NOT NULL,
insurance_price numeric(10,2) NOT NULL,
insurance_level integer NOT NULL,
deleted integer NOT NULL,
insurance_customer_type varchar... |
<gh_stars>0
USE Master
GO
-- View the current contents
SELECT *
FROM dbo.AdminQueries
WHERE name = 'BackupsLastSevenDays'
-- Create a row
INSERT INTO dbo.AdminQueries
( name, description, code )
VALUES ( 'BackupsLastSevenDays', -- name - varchar(50)
'Lists all Backups on a server for ... |
--brisanje i izmjena indeksa
USE TestDB;
ALTER INDEX IX_BookPublisher ON dbo.Book
DISABLE;
GO
ALTER INDEX IX_BookPublisher ON dbo.Book
REBUILD WITH ONLINE = ON;
GO
DROP INDEX IX_BookPublisher ON dbo.Book;
GO |
<filename>3.6_INNER_JOIN.sql
#Neste agrupamento mostra o Nome_Cliente, Id_Cliente, Valor total gasto por cada cliente apenas dos Ids de 1 a 3 mesmo sendo de tabelas diferentes
select Nome_Cliente, DA.Id_Cliente, sum(DA.Valor_Pedido) as Valor_Total_Cliente from Clientes as C
inner join detalhes_aluguel as DA
on DA.Id... |
DROP FUNCTION IF EXISTS int_temporal_filter_common(text[],character varying,timestamp without time zone,timestamp without time zone);
CREATE OR REPLACE FUNCTION int_temporal_filter_common(tnames text[],
t_pred character varying,
tstart timestamp,
tend timestamp
)
RETURNS TABLE(KBarchivID... |
<gh_stars>1-10
-- MySQL dump 10.16 Distrib 10.1.30-MariaDB, for Win32 (AMD64)
--
-- Host: localhost Database: videoteka
-- ------------------------------------------------------
-- Server version 10.1.30-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESUL... |
<filename>sentencias/sql/create_raw_tables.sql
/*
Si no existe, creamos el esquema raw
*/
create schema if not exists raw;
/*
Descartamos la tabla sentencias 2017 del esquema cleaned en caso de que ya exista.
*/
drop table if exists raw.sentencias2017;
/*
Creamos la estructura de las tablas del es... |
ALTER TABLE egbpa_mstr_slotmapping ADD COLUMN slotApplicationType bigint;
ALTER TABLE egbpa_mstr_slotmapping
ADD CONSTRAINT fk_egbpa_mstr_slotmapping_applicationtype
FOREIGN KEY (slotApplicationType)
REFERENCES egbpa_mstr_applicationtype (id);
ALTER TABLE egbpa_mstr_slotmapping ALTER COLUMN applicationty... |
ALTER TABLE photo_exif
ALTER COLUMN exif_value TYPE TEXT;
|
<reponame>luiscaputo/dashboard-with-php
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: 11-Maio-2021 às 22:41
-- Versão do servidor: 5.7.26
-- versão do PHP: 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET t... |
<filename>Databases (SQL, PHP)/Part 1/ASKISI_10.sql<gh_stars>1-10
-- PERSONNEL CREATOR
DROP DATABASE IF EXISTS personnel;
CREATE DATABASE personnel;
USE personnel;
CREATE TABLE DEPT(
DEPTNO INT(2) NOT NULL,
DNAME VARCHAR(15),
PRIMARY KEY(DEPTNO));
CREATE TABLE JOB(
JOBNO INT(3) NOT NULL,
JOB VARCHAR(15),
SAL FLOA... |
-- file:privileges.sql ln:1099 expect:true
DROP TABLE atest6
|
-- file:privileges.sql ln:368 expect:true
UPDATE t1 SET c2 = 1
|
-- original: ioerr2.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
PRAGMA cache_size = 10;
PRAGMA default_cache_size = 10;
CREATE TABLE t1(a, b, PRIMARY KEY(a, b));
INSERT INTO t1 VALUES(randstr(400,400),randstr(400,400));
INSERT INTO t1 SELECT randstr(400,400), randstr(400,400) FR... |
DROP DATABASE IF EXISTS social_sports;
CREATE DATABASE social_sports; |
insert into languages (welcomeMsg, code) values('Hello', 'en');
insert into languages (welcomeMsg, code) values('Cześć', 'pl'); |
--Creacion de la base de datos--
CREATE USER user_lavado PASSWORD '<PASSWORD>';
CREATE DATABASE lavado_db WITH OWNER user_lavado;
GRANT ALL PRIVILEGES ON DATABASE lavado_db TO user_lavado;
|
------------------------------Ejemplo desarrollado para el curso Profesional de Base de Datos--------------------------
Drop Database If Exists libreria_natra;
Create Database If not Exists libreria_natra;
use libreria_natra;
Create table If not Exists autores (
autor_id INT UNSIGNED PRIMARY KEY AUTO_INCREME... |
select count(*) from j2 where c_float not in ( select c_float from j1) ;
|
COPY (
select distinct gene from rnc_accessions where "database" = 'HGNC'
) TO STDOUT
|
CREATE UNIQUE INDEX "PK_VPD_COLL_ID" ON "VPD_COLLECTION_CDE" ("COLLECTION_ID")
|
ALTER TABLE IF EXISTS third_party_service
DROP COLUMN IF EXISTS url,
DROP COLUMN IF EXISTS icon; |
<filename>src/console/db/queries/entities/ipAddress/selectByIP.sql
SELECT
*
FROM
entity_graph.ip_addresses
WHERE
ip_addresses.ip_address = $1
LIMIT
1 |
CREATE OR REPLACE FUNCTION core.tf_h_uber_core_i_tables()
RETURNS INTEGER AS $$
BEGIN
PERFORM core.tf_h_employee_ih();
PERFORM core.tf_h_party_ih();
PERFORM core.tf_h_organization_ih();
PERFORM core.tf_h_contact_ih();
PERFORM core.tf_h_project_ih();
PERFORM core.tf_h_issue_ih();
PERFORM co... |
<filename>orcas_sqlplus_core/sql_util_scripts/replaceable/table_orcas_sqlplus_model.sql
create table orcas_sqlplus_model (
model sys.anydata
);
|
-- Database: postgresql
-- Change Parameter: newViewName=v_person
-- Change Parameter: oldViewName=v_person
ALTER TABLE v_person RENAME TO v_person;
|
<filename>fixtures/doctests/ddl/037_alter_table_drop_constraint/input.sql<gh_stars>0
ALTER TABLE products DROP CONSTRAINT some_name;
|
drop database if exists employee_db;
create database employee_db;
use employee_db;
create table department (
id int auto_increment not null,
name varchar(30) not null,
primary key (id)
);
create table role (
id int auto_increment not null,
title varchar(30) not null,
salary decimal not null,... |
<filename>v2_USER_CODE_Synapse/MS_test_3/microsoft_sql/query98.sql
-- query98
SELECT i_item_id,
i_item_desc,
i_category,
i_class,
i_current_price,
Sum(ss_ext_sales_price) AS itemrevenue,
Sum(ss_ext_sales_price) * 100 / Sum(Sum(ss_ext_sal... |
CREATE USER IF NOT EXISTS 'phpsldt_tester'@'%' IDENTIFIED BY 'pass';
CREATE USER IF NOT EXISTS 'phpsldt_electrician'@'%' IDENTIFIED BY 'pass';
CREATE USER IF NOT EXISTS 'phpsldt_manager'@'%' IDENTIFIED BY 'pass';
--READ AND WRITE
GRANT SELECT,UPDATE,INSERT, DELETE ON phpSLDt_dev.applications TO 'phpsldt_tester'@'... |
<reponame>EliMejia77/korpodesco
INSERT INTO usuario ('1','<NAME>','10001','<EMAIL>','dubelamejor','Docente',DEFAULT,'Activo');
INSERT INTO grupo(codigo,id_docente,jornada,ano,grado) VALUES('gfd432',43,'Mañana',2021,'6');
|
<gh_stars>0
-- Consider and to be two points on a 2D plane where are the respective minimum and maximum values of Northern Latitude (LAT_N) and are the respective minimum and maximum values of Western Longitude (LONG_W) in STATION.
-- Query the Euclidean Distance between points and and format your answer to disp... |
CREATE DATABASE mitiendita;
USE mitiendita;
CREATE TABLE products(
idProduct INT AUTO_INCREMENT,
name VARCHAR(120) NOT NULL,
price DECIMAL(7,2) NOT NULL,
status INT NOT NULL,
CONSTRAINT pk_products_idProduct PRIMARY KEY(idProduct)
); |
/* Replace with your SQL commands */
ALTER TABLE timeoff_requests
RENAME username TO slack_user_id;
|
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 22, 2016 at 01:05 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
INSERT INTO n11_bootcamp.public.staff(staff_id,first_name,last_name,address_id,email,store_id,username,password,last_update) VALUES(1,'Mike','Hillyer',3,'<EMAIL>',1,'Mike','<PASSWORD>','2006-05-16 16:13:11.79328');
INSERT INTO n11_bootcamp.public.staff(staff_id,first_name,last_name,address_id,email,store_id,username,pa... |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 09, 2018 at 12:48 AM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
--Tabloya Alan Ekleme
ALTER TABLE tabloYazar
ADD YazarYasi int NOT NULL |
-- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 26, 2010 at 06:56 AM
-- Server version: 5.1.40
-- PHP Version: 5.2.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_S... |
<reponame>pagopa/pagopa-api-config<gh_stars>1-10
create table NODO4_CFG.INFORMATIVE_PA_MASTER
(
OBJ_ID NUMBER generated by default on null as identity
constraint PK_INFORMATIVE_PA_MASTER
primary key,
ID_INFORMATIVA_PA VARCHAR2(35 char) not null,
DATA_INIZIO_VALIDITA TIMESTAM... |
CREATE TABLE subdivision (country VARCHAR(2) NOT NULL, id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision" ("country", "id", "name", "level") VALUES (E'AD', E'AD-07', E'Andorra la Vella', E'parish');
INSERT INTO "subdivision" ("country", "id", "name", "lev... |
SELECT d.id, d.conceptid, d.term FROM "snomedct".description_s d WHERE conceptid = :conceptId; |
<reponame>henrytseng/activerecord-materialize-adapter
CREATE TABLE transactions (
id SERIAL CONSTRAINT transactions_id PRIMARY KEY,
product_id integer NOT NULL,
quantity integer NOT NULL,
price integer NOT NULL,
buyer character varying(255) NOT NULL,
created_at date
)
|
<reponame>tracid56/Bristols
INSERT INTO `items` (name, label) VALUES
('gym_membership', 'Gym Membership'),
('powerade', 'Powerade'),
('sportlunch', 'Sportlunch'),
('protein_shake', 'Protein Shake')
; |
<filename>src/main/resources/db/migration/V19__vedtak_begrunnelse.sql<gh_stars>1-10
alter table vedtak add column begrunnelse TEXT; |
<reponame>richardswinbank/sprockit
CREATE PROCEDURE [sprockit_Execution].[test Validate sprockit.Execution ExecutionId]
AS
-- ARRANGE
DECLARE @tableSchema SYSNAME = 'sprockit';
DECLARE @tableName SYSNAME = 'Execution';
DECLARE @columnName SYSNAME = 'ExecutionId';
SELECT *
INTO #expected
FROM tsqlt_test_utils.Table... |
WITH multiwords_list AS (
select
word,
count(distinct docid) as cnt
from
tfidf
group by
word
having
cnt >= 2 -- at least two occurrence in docs
),
limitwords_tfidf AS (
select
t.docid, t.word, t.tfidf
from
tfidf t
LEFT SEMI JOIN multiwords_list l ON (t.word = l.word)
),
topk ... |
-- select4.test
--
-- execsql {
-- CREATE TABLE t2 AS
-- SELECT DISTINCT log FROM t1
-- UNION ALL
-- SELECT n FROM t1 WHERE log=3
-- ORDER BY log DESC;
-- SELECT * FROM t2;
-- }
CREATE TABLE t2 AS
SELECT DISTINCT log FROM t1
UNION ALL
SELECT n FROM t1 WHERE log=3
ORDER BY log DESC;
SELE... |
-- file:rolenames.sql ln:188 expect:false
CREATE SCHEMA newschema6 AUTHORIZATION CURRENT_ROLE
|
ALTER AVAILABILITY GROUP [readscaleag] JOIN WITH (CLUSTER_TYPE = NONE)
ALTER AVAILABILITY GROUP [readscaleag] GRANT CREATE ANY DATABASE
go
|
-- MySQL Script generated by MySQL Workbench
-- Thu Dec 16 01:07:01 2021
-- 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... |
<reponame>smith750/kc
DELIMITER /
CREATE TABLE AWARD_REPORT_TRACKING (
AWARD_REPORT_TERM_ID DECIMAL(22) NULL,
AWARD_NUMBER VARCHAR(12) NOT NULL,
PI_PERSON_ID VARCHAR(40) NULL,
PI_ROLODEX_ID DECIMAL(6,0) NULL,
PI_NAME VARCHAR(90) NOT NULL,
LEAD_UNIT_NUMBER VARCHAR(8) NOT NULL,
REPORT_C... |
drop table user_table;
create table user_table(
id varchar(128) not null primary key,
username varchar(32) not null,
password varchar(32) not null
); |
<filename>projects/OG-MasterDB/src/main/resources/db/create/hsqldb/hts/V_46__create_hts.sql
-- create-db-historicaltimeseries.sql: Historical time-series Master
-- design has one main document with data points handled separately
-- bitemporal versioning exists at the document level
-- each time a document is changed, ... |
--********************************************************************/
-- */
-- IBM InfoSphere Replication Server */
-- Version 11.4.0 for Linux, UNIX AND Windows */
-- ... |
<reponame>connormcd/misc-scripts
-------------------------------------------------------------------------------
--
-- PLEASE NOTE
--
-- No warranty, no liability, no support.
--
-- This script is 100% at your own risk to use.
--
-------------------------------------------------------------------------------
DECLARE
... |
<gh_stars>0
-- MySQL dump 10.13 Distrib 5.7.16, for Win64 (x86_64)
--
-- Host: localhost Database: tepsvet
-- ------------------------------------------------------
-- Server version 5.7.16
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES... |
<gh_stars>0
DROP TABLE IF EXISTS `backup_device`;
CREATE TABLE IF NOT EXISTS `backup_device` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`location` varchar(255) NOT NULL,
`description` text NOT NULL,
`sortorder` int(11) NOT NULL,
`system` int(11) NOT NULL,
`status` int(11) NOT ... |
-- @testpoint:矩形转换成圆
SELECT circle(box '((0,0),(1,1))') AS RESULT; |
IF EXISTS (SELECT *
FROM sysobjects
WHERE type = 'P' AND name = 'adminUserDelete')
BEGIN
DROP Procedure adminUserDelete
END
GO
CREATE PROCEDURE [dbo].adminUserDelete(
@id INT,
@status TINYINT
)
AS
BEGIN
SET NOCOUNT ON
-- BEGIN TRANSACTION
UPDATE [dbo].[User]
SET deleted = 1,
[status] = @sta... |
insert into airq.devices
(${values:name})
values(${values:csv})
${returning:raw} |
<filename>Tables/dbo.BehaviorIncidentChanged.sql
CREATE TABLE [dbo].[BehaviorIncidentChanged]
(
[BehaviorIncidentChangedPK] [int] NOT NULL IDENTITY(1, 1),
[ChangeDatetime] [datetime] NOT NULL,
[ChangeType] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[BehaviorIncidentPK] [int] NOT NULL,
[Activit... |
<filename>application/database/mysql_create.sql
CREATE OR REPLACE DATABASE proiect;
CREATE OR REPLACE TABLE user (id int, username varchar(100), password varchar(100), email varchar(100), age int, sex varchar(100));
CREATE OR REPLACE TABLE total (total int, date int);
CREATE OR REPLACE TABLE subs (id_client int, c... |
<reponame>Kidwany/tamrat<filename>Database Tables/tamra.sql
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 21, 2020 at 12:47 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
STA... |
CREATE TABLE Tweet1 (
Id STRING(MAX) NOT NULL,
SearchId STRING(MAX) NOT NULL,
CreatedAt TIMESTAMP NOT NULL,
CommitedAt TIMESTAMP NOT NULL OPTIONS (allow_commit_timestamp=true),
) PRIMARY KEY (Id);
CREATE INDEX Tweet1SearchId
ON Tweet1 (
SearchId
); |
<filename>src/Einstein.Database/10 Tables/Users.sql<gh_stars>0
CREATE TABLE [dbo].[Users]
(
[Id] INT NOT NULL PRIMARY KEY IDENTITY,
[EffectiveStartedOn] DATETIME NOT NULL,
[EffectiveStartedBy] INT NOT NULL,
[EffectiveModifiedOn] DATETIME NOT NULL,
[EffectiveModifiedBy] INT NOT NULL,
[EffectiveEndedOn]... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 22, 2017 at 06:28 AM
-- 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 @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
<reponame>tewentong/JavaHub
/*
*********************************************************************
http://www.begtut.com
*********************************************************************
Name: MySQL Sample Database mysqldemo
Link: http://www.begtut.com/mysql/mysql-sample-database.html
****************************... |
<gh_stars>0
DELETE FROM [secondary].[NewsArticles] |
-- ----------------------------
-- 1、部门表
-- ----------------------------
drop table if exists sys_dept;
create table sys_dept (
dept_id bigint(20) not null auto_increment comment '部门id',
parent_id bigint(20) default 0 comment '父部门id',
ancestors varchar(50) ... |
CREATE DATABASE IF NOT EXISTS msisdb;
USE msisdb;
DROP TABLE IF EXISTS student;
CREATE TABLE student (
id int PRIMARY KEY AUTO_INCREMENT ,
username varchar(24) UNIQUE NOT NULL,
name varchar(48)
);
INSERT INTO student (id, username, name) VALUES
(1, 'Fiction'),
(2, 'Non-Fiction'),
(3, 'Novel');
... |
<reponame>MachoSmurf/DogeFrame<gh_stars>1-10
CREATE TABLE `usertable` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`doge_spend` decimal(20,8) NOT NULL DEFAULT '0.00000000',
`doge_received` decimal(20,8) NOT NULL DEFAULT '0.00000000',
`doge_withdraw` decimal(20,8) NOT NULL DEFAULT '0.00000000',
`doge_available... |
<filename>checks/basic/unicode_column.sql
select 'check1' as {{unicode_column_name}} {{from_dual}}
|
<reponame>apexplatform/polycash<gh_stars>10-100
ALTER TABLE `users` CHANGE `ip_address` `ip_address` VARCHAR(40) CHARACTER SET latin1 COLLATE latin1_german2_ci NULL DEFAULT NULL;
|
<reponame>Shuttl-Tech/antlr_psql
-- file:plpgsql.sql ln:1253 expect:true
insert into PSlot values ('PS.base.ta3', 'PF0_X', '', '')
|
<gh_stars>100-1000
insert overwrite table query34
select c_last_name
, c_first_name
, c_salutation
, c_preferred_cust_flag
, ss_ticket_number
, cnt
from (select ss_ticket_number
, ss_customer_sk
, count(*) cnt
from store_sales,
date_dim,
store,
... |
<reponame>KunZizinho/Employee-Tracker-mysql-
DROP DATABASE IF EXISTS employee_tracker;
CREATE database employee_tracker;
USE employee_tracker;
CREATE TABLE department (
department_id INT NOT NULL AUTO_INCREMENT,
department_name VARCHAR(30) not NULL,
PRIMARY KEY (department_id)
);
CREATE TABLE role (
role_id I... |
<reponame>nileshhalge/fizzbuzz<gh_stars>1-10
SELECT
CASE
WHEN (number MOD 15 = 0) THEN "FizzBuzz"
WHEN (number MOD 3 = 0) THEN "Fizz"
WHEN (number MOD 5 = 0) THEN "Buzz"
ELSE number
END
FROM
(
SELECT
CAST(
CONCAT(
first_digit.digit,
... |
<reponame>eg-vendor/eg-server<filename>.hpapi/ExampleVendor.rows.sql
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
INSERT INTO `egv_user` (`id`, `favourite_colour`) VALUES
(1, 'Asylum Green');
|
spool 17_transform_row_maps.log;
-- Create temporary table for uploading concept.
truncate table source_to_concept_map_stage;
-- create new stage
insert into source_to_concept_map_stage
select
null as source_to_concept_map_id,
mapped.source_code,
v2.description as source_code_description,
'XXX' as mapping_t... |
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table beer_of_the_week (
product_id bigint not null,
epoch_day bigint,
name varchar(255),
category varchar(255),... |
select *
from get_next_proxy_for_check;
-- ACCESS (Subquery Scan) 100 100 212.06 2.056 210.81 2.042
select *
from get_next_proxy_for_check
limit 1;
-- ACCESS (Subquery Scan) 100 1 212.06 2.132 210.81 2.132
select * from get_next_proxy_for_check(60, 100);
-- TABLE_FUNCTION (Function Scan) 1000 1 10.25 1.753 0.25 1.... |
<filename>database/InstructorIQ/Procedures/EnsureInstructorUser.sql
CREATE PROCEDURE [IQ].[EnsureInstructorUser]
@instructorId UNIQUEIDENTIFIER,
@roleName NVARCHAR(100) = 'Instructor'
AS
BEGIN
SET NOCOUNT ON;
DECLARE @membership TABLE
(
[UserName] NVARCHAR(256),
[TenantId] UNIQUEIDENTIFIER
);
MERGE [I... |
--liquibase formatted sql
--changeset vaa25:11
CREATE TABLE user_profile (
id SERIAL PRIMARY KEY UNIQUE NOT NULL,
login VARCHAR(50) UNIQUE NOT NULL,
password VARCHAR(30) NOT NULL,
role_id INT NOT NULL,
FOREIGN KEY (role_id) REFERENCES role
);
|
/*
* Copyright (c) 2015 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
-- revert security_functions
UPDATE `security_functions` SET `_view` = 'Surveys.index', `_add` = NULL, `_edit` = NULL, `_delete` = 'Surveys.edit|Surveys.remove', `_execute` = NULL
WHERE `controller` = 'Institutions' AND `module` = 'Institutions' AND `category` = 'Surveys' AND `name` = 'New';
UPDATE `security_functions... |
CREATE PROCEDURE [dbo].[netsqlazman_AuthorizationUpdate]
(
@ItemId int,
@ownerSid varbinary(85),
@ownerSidWhereDefined tinyint,
@objectSid varbinary(85),
@objectSidWhereDefined tinyint,
@AuthorizationType tinyint,
@ValidFrom datetime,
@ValidTo datetime,
@Original_AuthorizationId int,
@ApplicationId int
)
AS
... |
select 1 as id, 'Alice' as name
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.