sql stringlengths 6 1.05M |
|---|
alter table resource alter column bytes varbinary(MAX) not null;
|
-- etldoc: layer_water_name[shape=record fillcolor=lightpink, style="rounded,filled",
-- etldoc: label="layer_water_name | <z0_8> z0_8 | <z9_13> z9_13 | <z14_> z14+" ] ;
CREATE OR REPLACE FUNCTION layer_water_name(bbox geometry, zoom_level integer)
RETURNS TABLE
(
osm_id bigin... |
<reponame>taiste/sqlite-parquet-vtable
select count(*) from nulls where float_11 < 0.001
0
|
insert into images (image_guid,creation_date,size,description,boot,it_guid,internal_drive_mapping) select '00000000-0000-0000-0000-000000000000','2008/04/01 00:00:00',85899345920,'Blank Image Template',false,'00000000-0000-0000-0000-000000000000','1';
ALTER TABLE images drop CONSTRAINT image_templates_images;
ALTER TAB... |
DROP VIEW IF EXISTS hrm.employment_status_code_selector_view;
CREATE VIEW hrm.employment_status_code_selector_view
AS
SELECT
hrm.employment_status_codes.employment_status_code_id,
hrm.employment_status_codes.status_code || ' (' || hrm.employment_status_codes.status_code_name || ')' AS employment_status_... |
ALTER TABLE datasets
ADD COLUMN banner_id UUID REFERENCES dataset_assets(id),
ADD COLUMN readme_id UUID REFERENCES dataset_assets(id);
|
/* create template table(s) */
DROP TABLE IF EXISTS profile;
CREATE TABLE IF NOT EXISTS profile (
id BIGSERIAL PRIMARY KEY,
first_name TEXT,
last_name TEXT,
email TEXT,
created_at TIMESTAMPTZ NOT NULL,
updated_at TIMESTAMPTZ
);
DROP TABLE IF EXISTS skill;
CREATE TABLE IF NOT EXISTS skill (
id BIGSERIAL P... |
--null
CREATE TABLE test_null(a INT NULL);
CREATE TABLE test_not_null_enable(a INT NULL ENABLE);--fail
--default
CREATE TABLE test_default(a INT DEFAULT 2);
CREATE TABLE test_default_enable(a INT DEFAULT 2 ENABLE);--fail
--not null
CREATE TABLE test_not_null(a INT NOT NULL);
CREATE TABLE test_not_null_enable(a INT NOT ... |
CREATE DATABASE Hospital
USE Hospital
--!!!! CREATE THE 3 TABLES
CREATE TABLE Doctor
(
Doctor_id int IDENTITY (1,1),
DoctorName varchar(60) not null,
Specialization varchar(70) not null
CONSTRAINT PK_Doctor Primary Key(Doctor_id)
)
SELECT * FROM Doctor
CREATE TABLE Patient
(
Patient_id int IDENTITY (... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 28, 2018 at 01:18 PM
-- 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 @OL... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 05, 2018 at 02:40 PM
-- Server version: 5.7.24
-- PHP Version: 7.1.24-1+ubuntu18.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... |
<reponame>Leandro-Suero/portfolio-education-node
CREATE TABLE IF NOT EXISTS events(
id integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
title character varying(255) NOT NULL,
description text NOT NULL,
place character varying(255) NOT NULL,
start_time timestamptz NOT NULL
);
ALTER TABLE events ... |
CREATE DATABASE Bamazon;
USE Bamazon;
CREATE TABLE products (
item_id INTEGER (3) AUTO_INCREMENT NOT NULL,
product_name VARCHAR(75) NOT NULL,
department_name VARCHAR(50),
price DECIMAL(11,2),
stock_quantity INTEGER(7),
PRIMARY KEY (item_id)
);
SELECT * from products; |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 19, 2019 at 08:38 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.2.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
select * from users
delete from users where id > 1 |
<filename>app_mugen.sql
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 20, 2019 at 06:16 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:... |
<reponame>qawemlilo/express-mysql
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`role_id` int(11) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL UNIQUE,
`password` varchar(255) NOT NULL,
`resetPasswordToken` varchar(255) DEFAULT NULL,
`re... |
<filename>src/test/resources/secondary_sql/other/select_in_secondary_sql_other_folder.sql
select -- secondary_sql/other file
*
from test t
where 1 = 1
|
CREATE TABLE "%table%" (
"key" CHAR(32) NOT NULL,
"data" TEXT NOT NULL,
"time" INT NOT NULL,
PRIMARY KEY ("key")
); |
-- Матрица использования фактов и измерений
SELECT [MEASUREGROUP_NAME] AS [MEASUREGROUP],
[MEASUREGROUP_CARDINALITY],
[DIMENSION_UNIQUE_NAME] AS [DIM],
[DIMENSION_GRANULARITY] AS [DIM_KEY],
[DIMENSION_CARDINALITY],
[DIMENSION_IS_VISIBLE] AS [IS_VISIBLE],
[DIMENSION_IS_F... |
--! Previous: sha1:a5abbca2d97f536ced87ea7d1f5428c4db4668ed
--! Hash: sha1:36ad057449551ddbeed33661df7ff3cf44537845
--! split: 1-current.sql
-- Enter migration here
ALTER TABLE app_public.items DROP CONSTRAINT items_brand_check;
ALTER TABLE app_public.items
ADD CONSTRAINT items_brand_check CHECK (
(length(brand) >... |
--
-- Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
--
-- Licensed under the Universal Permissive License v 1.0 as shown
-- at http://oss.oracle.com/licenses/upl
--
Rem
Rem NAME
Rem pls_examp1.sql - plsql example file
Rem DESCRIPTION
Rem <short description of component th... |
CREATE TABLE IF NOT EXISTS __PREFIX__FLOW(
ID INT AUTO_INCREMENT PRIMARY KEY ,
NAME VARCHAR2(200) NOT NULL
);
CREATE TABLE IF NOT EXISTS __PREFIX__PROGRESS(
ID INT AUTO_INCREMENT PRIMARY KEY ,
NAME VARCHAR2(200) NOT NULL ,
CREATE_TIME TIMESTAMP DEFAULT SYSTIMESTAMP ,
BEAN_NAME VARCHAR2(200) NOT NULL
);
CRE... |
<gh_stars>1-10
CREATE TABLE [dbo].[SourceType]
(
[SOURCE_ID] [int] NOT NULL IDENTITY(1, 1),
[SourceType] [varchar] (50) COLLATE Latin1_General_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SourceType] ADD CONSTRAINT [PK_SourceType] PRIMARY KEY CLUSTERED ([SOURCE_ID]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED IN... |
USE [YourDBName]
GO
DECLARE @RC int
DECLARE @verbose bit = 0 -- 0 is debug mode, 1 is execute the command
DECLARE @disableNonClustered bit = 1
DECLARE @skipEmptyTable bit = 1
DECLARE @companyName nvarchar(50) = N'' -- blank for all companies
DECLARE @removeCrLf bit = 1 -- 0 does not remove crlf, 1 remove crlf
... |
/**
* Suite à connection d'un producteur, updater la table pour porter,
* le temps de la session, le session id généré + IP de connection.
*/
alter table cetcal_producteur add column session_id VARCHAR(512) default NULL;
alter table cetcal_producteur add column producteur_ip VARCHAR(128) default NULL;
|
<reponame>IBM/ibm-spectrum-lsf-rtm-server
--
-- $Id: 8f0470a56cf052ed40352baa0a58a974f02480b4 $
--
-- MySQL dump 10.13 Distrib 5.1.66, for redhat-linux-gnu (x86_64)
--
-- Host: localhost Database: cacti
-- ------------------------------------------------------
-- Server version 5.1.66-log
/*!40101 SET @OLD_COLLATI... |
create table nlmkService.carriage (
id int not null primary key,
carriage_type varchar(20),
brutto_weight float,
status int
);
create table nlmkService.wheelset (
id int not null primary key,
produced_year int,
factory int,
right_wheel_width int,
left_wheel_width int,
real_produced_year int,
real... |
<reponame>launchql/utils<gh_stars>0
-- Deploy extension/defaults to pg
BEGIN;
-- hstore, unaccent
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public to public;
COMMIT;
|
<filename>schemas/public/tables/ip2location.sql<gh_stars>0
-- This file contains instructions for updating the ip2location table.
-- These steps are based on the instructions in https://docs.google.com/document/d/1LPjtHsab7b_gBN_Ifwic2BrtfQt3KE2Jn6ZilB_eD0A/edit,
-- but more scripted/automatic and less manual steps.
--... |
CREATE TABLE [dbo].[EstuaryDataset] (
[EstuaryDatasetID] INT NOT NULL Identity,
[EstuaryID] INT NOT NULL,
[DatasetID] INT NOT NULL,
CONSTRAINT [FK_EstuaryDataset_EstuaryID] FOREIGN KEY (EstuaryID) REFERENCES [Estuary]([EstuaryID]),
CONSTRAINT [FK_EstuaryDataset_DatasetID] FOREIGN KEY... |
<reponame>mirkatabga/TelerikAcademyHomeworks<gh_stars>0
/*Write a SQL query to find the names of all employees whose last name contains "ei"*/
USE TelerikAcademy
SELECT *
FROM dbo.Employees
WHERE LastName LIKE '%ei%' |
<filename>dharmawan_books.sql
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 23, 2020 at 07:00 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone =... |
<reponame>ZeroGit2015/candidates<filename>doc/sql/base_regions.sql
-- phpMyAdmin SQL Dump
-- version 3.5.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 21, 2016 at 07:41 PM
-- Server version: 5.5.47-0+deb7u1-log
-- PHP Version: 5.6.11-1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone ... |
<reponame>devotox/platform-base
CREATE TABLE acl (
id serial NOT NULL,
model varchar,
property varchar,
accesstype varchar,
permission varchar,
principaltype varchar,
principalid varchar,
CONSTRAINT acl_pk PRIMARY KEY (id)
);
|
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 25, 2018 at 09:49 AM
-- Server version: 10.1.10-MariaDB
-- PHP Version: 5.6.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
<filename>app/install/05_create_orders_table.sql<gh_stars>1-10
USE scam;
CREATE TABLE IF NOT EXISTS `orders` (
`id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`title` varchar(255) NOT NULL,
`state` TINYINT(1) NOT NULL DEFAULT 0,
`price` decimal(65,30) NOT NULL,
`amount` int(11) NOT NULL,
`shipping_info` ... |
-- Weather Observation Station 15
-- https://www.hackerrank.com/challenges/weather-observation-station-15/problem
SELECT ROUND(LONG_W, 4)
FROM Station
WHERE LAT_N = (SELECT MAX(LAT_N) FROM Station WHERE LAT_N < 137.2345);
|
--Display a list of products whose list price is higher than the highest unit price of items that have sold
SELECT MAX(UnitPrice) FROM SalesLT.SalesOrderDetail
SELECT * from SalesLT.Product
WHERE ListPrice >
SELECT * from SalesLT.Product
WHERE ListPrice >
(SELECT MAX(UnitPrice) FROM SalesLT.SalesOrderDeta... |
<gh_stars>10-100
-- file:triggers.sql ln:1641 expect:true
create trigger child3_insert_trig
after insert on child3 referencing new table as new_table
for each statement execute procedure dump_insert()
|
ALTER TABLE `#__languages` ADD COLUMN `access` integer unsigned NOT NULL default 0 AFTER `published`;
ALTER TABLE `#__languages` ADD INDEX `idx_access` (`access`);
UPDATE `#__categories` SET `extension` = 'com_users.notes' WHERE `extension` = 'com_users';
UPDATE `#__extensions` SET `enabled` = '1' WHERE `protected` ... |
<reponame>robsiera/bugnet<filename>src/BugNET.Database/Stored Procedures/BugNet_Role_GetRolesByUser.sql
CREATE procedure [dbo].[BugNet_Role_GetRolesByUser]
@UserName nvarchar(256)
AS
DECLARE @UserId UNIQUEIDENTIFIER
SELECT @UserId = UserId FROM Users WHERE UserName = @UserName
SELECT BugNet_Roles.RoleName,
... |
<reponame>ns556799/shch-cms
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Dec 15, 2018 at 02:10 PM
-- Server version: 5.7.23
-- PHP Version: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `SS_mysite1`
--
... |
<gh_stars>0
insert into obra(titulo, tipo_obra, precio, vendido) values (:titulo, :tipoObra, :precio, :vendido) |
<reponame>taguz91/caso-2-grupo-2
--
-- File generated with SQLiteStudio v3.3.3 on lun. may. 31 12:17:46 2021
--
-- Text encoding used: System
--
PRAGMA foreign_keys = off;
BEGIN TRANSACTION;
-- Table: user
CREATE TABLE user (
personaId INTEGER NOT NULL,
apellidos TEXT,
nombres TEXT,
correo TEXT,
ro... |
alter table reconf_property add column property_value VARCHAR(MAX) not null;
|
-------------------------------------- UP --------------------------------------
GRANT USAGE ON SCHEMA auth TO administrator;
CREATE FUNCTION
api.create_user(
role name,
email varchar(255),
password varchar(255),
name varchar(255),
location_id uuid,
agreements uuid[] DEFAULT '{}'::uuid[]
)... |
{{
config(
sort='collector_tstamp',
dist='event_id',
tags=["this_run"]
)
}}
{%- set lower_limit, upper_limit = snowplow_utils.return_limits_from_model(ref('snowplow_mobile_base_sessions_this_run'),
'start_tstamp',
... |
SET TRANSACTION ISOLATION LEVEL SNAPSHOT
COMMIT TRANSACTION
BEGIN TRANSACTION
SELECT pur.[Publication ID] as pubId,
u.ID as userId,
u.[Last Name] as lname,
u.[First Name] as fname,
u.Email as email,
u.Initials as initial,
u.[Primary Group Descriptor] as pgd,
g.ID as groupId
FROM [Use... |
ALTER TABLE player
ADD COLUMN homepage VARCHAR(100) NULL AFTER comment;
|
<filename>problems/second-highest-salary/exec.sql<gh_stars>0
select
IFNULL((select distinct
Salary
from
Employee
order by
Salary desc
limit 1
offset 1
)
, null) as SecondHighestSalary
;
|
<filename>database/loginbot.sql
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 02 Agu 2021 pada 11.25
-- Versi server: 10.1.31-MariaDB
-- Versi PHP: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... |
<reponame>localproductions/TargetSource
USE [AnyDatabaseName]
GO
IF OBJECT_ID('dbo.[DF_bnkEmployee_EmployeeID]', 'D') IS NOT NULL
ALTER TABLE [dbo].[bnkEmployee] DROP CONSTRAINT [DF_bnkEmployee_EmployeeID]
GO
IF OBJECT_ID('dbo.[DF_bnkEmployee_EmployeeTicket]', 'D') IS NOT NULL
ALTER TABLE [dbo].[bnkEmployee] DROP CON... |
use bizbox;
#골목상권 거주인구
CREATE TABLE `bizbox`.`population_location` (
`A` VARCHAR(255) NULL COMMENT '기준_년_코드',
`B` VARCHAR(255) NULL COMMENT '기준_분기_코드',
`C` VARCHAR(255) NULL COMMENT '상권_구분_코드',
`D` VARCHAR(255) NULL COMMENT '상권_구분_코드_명',
`E` VARCHAR(255) NULL COMMENT '상권_코드',
`F` VARCHAR(255) NULL CO... |
<gh_stars>1-10
USE [Antero]
GO
IF NOT EXISTS (select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='dw' and TABLE_NAME='f_amos_rajapinta_rahoitus_kriteerit_new')
BEGIN
CREATE TABLE [dw].[f_amos_rajapinta_rahoitus_kriteerit_new](
[ytunnus] [nvarchar](12) NULL,
[ta_ensikertainen_suoritepaatos] [float] NULL,
[t... |
<filename>src/test/resources/sql/declare/feec8d5d.sql
-- file:portals.sql ln:19 expect:true
DECLARE foo7 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2
|
<filename>migrations/2018-09-19-204139_create_orders/up.sql<gh_stars>0
CREATE TYPE order_status AS ENUM (
'entering', 'in_progress', 'cancelled', 'completed'
);
CREATE TABLE orders (
id SERIAL PRIMARY KEY,
specification_id INTEGER NOT NULL,
product_id INTEGER NOT NULL,
quantity INTEGER NOT NULL,
status o... |
<gh_stars>0
drop index if exists c_involvement_unique_opporunity_and_participant;
drop index if exists c_involvement_by_participant;
drop index if exists c_involvement_by_opportunity;
drop table if exists c_involvement;
|
INSERT INTO shared."right" (id, description, name, shortcode, "group", created, updated)
VALUES (2007, 'email editor booked - show templates', 'Show-Multi-Templates', 'email_templates_show', 'ui-menu', NOW
(), NOW()) ON CONFLICT DO NOTHING ;
INSERT INTO landlord."right" (id, right_id, created)
VALUES (2007, 2007, ... |
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- Users
insert into users (first_name, last_name, email, password, enabled, deleted) values ('Richard', 'Hendricks', '<EMAIL>', '$2y$10$R/LdCKwv38VfUAMuTFH/GOPi3PYHOiYwAUELhptoOHrf0XPMmTdoG', true, false)
insert into users (... |
USE SoftUni
SELECT FirstName, LastName FROM Employees
WHERE FirstName LIKE 'SA%' |
<reponame>nathnael/cats
CREATE PROCEDURE [sp_sel_UserHub]
AS
SELECT
[UserHubID],
[UserProfileID],
[HubID],
[IsDefault]
FROM
[dbo].[UserHub] |
-- MySQLShell dump 1.0.0 Distrib Ver 8.0.21 for macos10.14 on x86_64 - for MySQL 8.0.21 (MySQL Community Server (GPL)), for macos10.14 (x86_64)
--
-- Host: localhost
-- ------------------------------------------------------
-- Server version 8.0.21
--
-- Dumping user accounts
--
-- begin user administrator@%
CREATE U... |
/*
mgd=> \d+ voc_evidence_view
View "mgd.voc_evidence_view"
Column | Type | Collation | Nullable | Default | Storage | Description
--------------------+-----------------------------+-----------+----------+---------+----------+-------------
_... |
<reponame>raihanArman/admin_rscov
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 07 Jul 2021 pada 10.14
-- Versi server: 10.4.19-MariaDB
-- Versi PHP: 7.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... |
CREATE VIEW [dbo].[ViewSpotsSmallList]
AS
SELECT dbo.Spots.ID, RTRIM(dbo.Customers.Name)
+ ' - ' + RTRIM(dbo.Spots.Name) AS Spot
FROM dbo.Spots INNER JOIN
dbo.Customers ON dbo.Spots.CustomerID = dbo.Customers.ID
|
CREATE PROCEDURE [dbo].[SP_UserData_GetSearch]
@username nvarchar(max)
AS
select
a.id,a.username,
convert(nvarchar(max),DecryptByPassPhrase('key', a.password )) password,
a.RoleId,a.NamaLengkap,a.Photo,a.Status,b.NamaGroup RoleName
from UserData a
left join GroupData b on b.IdRole = a.RoleId
where REPLACE(RTRI... |
<reponame>ountaarab/xmen<filename>database/db_xmen.sql
/*
Navicat Premium Data Transfer
Source Server : Localhost
Source Server Type : MySQL
Source Server Version : 100418
Source Host : localhost:3306
Source Schema : db_xmen
Target Server Type : MySQL
Target Server Version : 10... |
insert into surfgraphstides (s_code, dt, vl) values ('60250', '2014-10-31 2:39', 0.1);
insert into surfgraphstides (s_code, dt, vl) values ('60250', '2014-10-31 11:36', 0.7);
insert into surfgraphstides (s_code, dt, vl) values ('60250', '2014-10-31 16:47', 0.3);
insert into surfgraphstides (s_code, dt, vl) values ('602... |
CREATE TABLE highscores
(
player_id INT PRIMARY KEY UNIQUE NOT NULL REFERENCES players (id),
games_played INT DEFAULT (0) NOT NULL, games_won INT NOT NULL DEFAULT (0),
achievements_unlocked INT NOT NULL DEFAULT (0)
)
|
ALTER TABLE [Data].[Election]
ADD CONSTRAINT [FK_Data_Election_ContentInspectionId] FOREIGN KEY ([ContentInspectionId]) REFERENCES [Data].[ContentInspection] ([ContentInspectionId])
, CONSTRAINT [FK_Data_Election_ElectionLevelId] FOREIGN KEY ([ElectionLevelId]) REFERENCES [Data].[ElectionLevel] ([ElectionLevelId])
, ... |
<filename>ci/vendor/mysqlviz/mysqldump.sql
-- MySQL dump 10.16 Distrib 10.1.26-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: 127.0.0.1 Database: circleci
-- ------------------------------------------------------
-- Server version 5.7.22
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4010... |
drop table if exists mb_branch_change;
/*==============================================================*/
/* Table: mb_branch_change */
/*==============================================================*/
create table mb_branch_change
(
FILE_NAME varchar(500) comment '鏂囦欢鍚嶇О'... |
<reponame>Shuttl-Tech/antlr_psql
-- file:alter_table.sql ln:1848 expect:true
ALTER TABLE comment_test ALTER COLUMN id SET DATA TYPE text
|
-- Enable CLR
sp_configure 'clr enabled', 1;
RECONFIGURE WITH OVERRIDE;
GO
--Drop the functions if they already exist
DROP FUNCTION IF EXISTS CURL.XGET
GO
DROP PROCEDURE IF EXISTS CURL.XPOST
GO
--Drop the schema if it already exists
DROP SCHEMA IF EXISTS CURL;
GO
--Drop "trusted assembly flag" if it is set
DECLAR... |
<filename>src/main/resources/data.sql
-- users
INSERT INTO users (id, first_name, last_name, nickname)
VALUES (1, 'Hrvoje', 'Horvatovic', 'HH')
on CONFLICT (id) DO NOTHING;
INSERT INTO users (id, first_name, last_name, nickname)
VALUES (2, 'Marko', 'Markovic', 'MM')
on CONFLICT (id) DO NOTHING;
-- category
INSERT INT... |
<filename>xwhep-server/bin/db-maintenance/xwhep-core-tables-foreign-keys-history.sql
-- ===========================================================================
--
-- Copyright 2014 <NAME>
-- at LAL, Univ Paris-Sud, IN2P3/CNRS, Orsay, France
-- License GPL v3
--
-- XtremWeb-HEP Core Tables... |
CREATE TABLE clients
(
mesh_ip varchar(40) CONSTRAINT firstkey PRIMARY KEY,
wg_pubkey varchar(44) NOT NULL,
wg_port integer NOT NULL,
eth_address varchar(64) NOT NULL,
internal_ip varchar(42) NOT NULL,
internet_ipv6 varchar(132) NOT NULL,
nickname varchar(32) NOT NULL,
email varchar(512)... |
<reponame>SALUD-AR/sigep
-- ///////////////////////////////////////////////////////////////////indicador Full full
select cast(numerador as float)/ cast(denominador as float) as "indicador" from
(
select * from
(
select sum(resultado) as "numerador" from
(
select *,
CASE WHEN ((codigo='MEM 72') and ((s... |
<filename>MODEL/migration/src/main/resources/game-score/queries/stats.sql
-- stats
-- tops participants sur les épreuves , total, confort, totem, collectif, indiv, binôme / nb effectuées & !! game skills
-- to display in participant details
-- to display in program details
-- to display in wall of fame - goat
/*
GRO... |
CREATE TABLE offsets (
seq INTEGER PRIMARY KEY AUTOINCREMENT,
id UUID NOT NULL,
otype VARCHAR(64) NOT NULL,
namespace VARCHAR(64) NOT NULL,
name VARCHAR(64) NOT NULL,
current BIGINT NOT NULL
);
CREATE UNIQUE INDEX offsets_id ON offs... |
<gh_stars>1-10
-- MODULE XTS761
-- SQL Test Suite, V6.0, Interactive SQL, xts761.sql
-- 59-byte ID
-- TEd Version #
-- AUTHORIZATION CTS1
SELECT USER FROM HU.ECCO;
-- RERUN if USER value does not match preceding AUTHORIZATION comment
ROLLBACK WORK;
-- date_time print
-- TEST:7061 Defined char... |
<reponame>yonyzarate/ProyectoCONFCAMILA
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 5.7.24 - MySQL Community Server (GPL)
-- SO del servidor: Win64
-- HeidiSQL Versión: 10.2.0.5599
-- -------------------... |
<filename>synclibridb_2017-08-24_15-32-06.sql
-- MySQL dump 10.13 Distrib 5.1.73, for redhat-linux-gnu (x86_64)
--
-- Host: localhost Database: synclibridb
-- ------------------------------------------------------
-- Server version 5.1.73
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 S... |
<reponame>syframework/bootstrap-message<gh_stars>0
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for t_message_received
-- ----------------------------
DROP TABLE IF EXISTS `t_message_received`;
CREATE TABLE `t_message_received` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`user_id` ... |
<reponame>lukasztomalczyk/tutorials<gh_stars>0
USE citizenbudget;
GO
INSERT INTO user
VALUES
('1', 'password'),
('2', 'password')
GO
|
<filename>GEO_EXPERIMENT/drop_index.sql
DELETE FROM user_sdo_geom_metadata;
DROP INDEX Customer_Location_Index;
DROP INDEX Customer_Roadtoemployee_Index;
DROP INDEX Employee_Workingarea_Index;
COMMIT;
EXIT;
quit |
-- --------------------------------------------------------
--
-- Table structure for table `dg_article`
--
CREATE TABLE IF NOT EXISTS `dg_article` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(200) NOT NULL,
`slug` varchar(200) NOT NULL,
`cate_id` int(11) NOT NULL,
`meta_title` text ... |
INSERT INTO `config` VALUES ('27', 'reset_traffic', 1);
INSERT INTO `config` VALUES ('28', 'default_days', 7); |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 03, 2020 at 07:42 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<filename>lesson_3/activity-catch-up-script.sql
-- ONLY copy and past this if you did not go through
-- Lesson 1 and activities A and B in Lesson 2.
CREATE DATABASE packt_school;
USE packt_school;
-- Create the tables
CREATE TABLE IF NOT EXISTS teacher(
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(100),
ema... |
<reponame>vassdeniss/software-university-courses
-- Connect to the 'SoftUni' database to run this snippet
USE [SoftUni]
GO
-- Select the name of all towns from the towns table
SELECT [Name]
FROM [Towns]
-- where the length of the name is 5 or 6
-- order the results alphabetically
WHERE LEN([Name]) = 5
OR LEN([Nam... |
<filename>src/test/resources/sql/alter_user/0f16ff75.sql
-- file:rolenames.sql ln:108 expect:true
ALTER USER "current_user" WITH REPLICATION
|
<reponame>Kirens/lemmingpants
SET SCHEMA 'api';
-- Public facing auth functions ---------------------------------------------
CREATE TYPE jwt_token AS (token TEXT);
CREATE FUNCTION api.login(username TEXT, password TEXT) RETURNS jwt_token
LANGUAGE sql SECURITY DEFINER SET search_path = api, model, public, pg_tem... |
<reponame>arosenk35/dbt_old_20211101<filename>models/ips/fact_prescription.sql
{{
config({
"materialized": "table",
"post-hook": [
after_commit("create index index_{{this.name}}_on_dispense_date on {{this.schema}}.{{this.name}} (dispense_date)"),
after_commit("create index index_{{this.name}... |
-- drop table ResultsGS;
create table ResultsGS (
ID INT IDENTITY(1, 1),
PROCESSBATCH_ID NUMERIC(19, 0) NOT NULL,
PRODUCT_ID NUMERIC(19, 0) NOT NULL,
STEP_ID NUMERIC(19, 0) NOT NULL,
f_Load FLOAT,
f_Mix FLOAT,
f_LotSamp FLOAT,
f_OptLotSamp FLOAT,
t_CTAve FLOAT,
PRIMARY KEY CLUSTERED (ID)
);
... |
WITH ueberlagernd_flaeche AS
(
SELECT
ueberlagernd_flaeche.t_id,
ueberlagernd_flaeche.t_datasetname,
ueberlagernd_flaeche.t_ili_tid,
ueberlagernd_flaeche.geometrie,
typ_ueberlagernd_flaeche.typ_kt,
typ_ueberlagernd_flaeche.code_kommunal,
typ_ueberlagernd_fl... |
<reponame>CaptainUltra/IT-Career-Course
use `soft_uni`;
/*Problem 1. Addess of employees*/
SELECT e.`employee_id`, e.`job_title`, e.`address_id`, a.`address_text`
FROM `employees` AS e
JOIN `addresses` AS a
ON e.`address_id` = a.`address_id`
ORDER BY e.`address_id`
LIMIT 5;
/*Problem 2. Employees from sales */
SELECT... |
create database dbBravos;
use dbBravos;
create table Proceso(
id int primary key auto_increment,
nombre varchar(20) not null
);
create table Tipos(
id int primary key auto_increment,
clave varchar(3) not null,
nombre varchar(25) not null,
procesoId int not null,
foreign key (procesoId) references Proceso(... |
USE PeopleTracker
GO
/****** Object: Table dbo.Student Script Date: 6/1/2018 8:39:51 AM ******/
IF OBJECT_ID('dbo.Student', 'U') IS NOT NULL
BEGIN
ALTER TABLE dbo.Student DROP CONSTRAINT FK_Student_StudentType
ALTER TABLE dbo.Student DROP CONSTRAINT FK_Student_GradeLevel
DROP TABLE dbo.Student
END
GO
SET ANS... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.