sql stringlengths 6 1.05M |
|---|
ALTER TABLE `selfservice_login_flows` MODIFY `nid` char(36); |
<reponame>LeonZly90/SQLquery
--exec dbo.[COST_Quality_table1]
-------------------------------------------------
declare
@ProjectID nvarchar(50),@Company nvarchar(50),@StartDate DATETIME,@EndDate DATETIME,
@now date,@i int
--@ProjectStartDate date,@ProjectEndDate DATETIME, @ProjectNoName nvarchar(100), @Projec... |
<reponame>atq87/sql-server-samples
IF DB_NAME() != 'AdventureWorksDW2012'
USE AdventureWorksDW2012
SET NOCOUNT ON
GO
EXECUTE sp_query_store_flush_db;
GO
DBCC FREEPROCCACHE;
--ALTER DATABASE current SET COMPATIBILITY_LEVEL = 140
GO
|
<filename>database.sql
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 23, 2018 at 05:02 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 @OLD_CHARACTER_SET_CLI... |
<gh_stars>0
CREATE TABLE [dbo].[usersInduction](
[user_id] [UNIQUEIDENTIFIER] NOT NULL,
[recipe_id] [INT] NOT NULL,
[saved] [BIT] NOT NULL,
[watched] [BIT] NOT NULL,
[watch_time][datetime] NOT NULL default GETDATE(),
PRIMARY KEY (user_id,recipe_id),
FOREIGN KEY (user_id) REFERENCES users(user_id)
)
INSERT... |
DROP PROCEDURE IF EXISTS fill_Persons;
DROP PROCEDURE IF EXISTS fill_Workers;
DELIMITER //
CREATE PROCEDURE fill_Persons()
BEGIN
DECLARE i INT;
DECLARE dateV DATETIME;
SET i = 0;
WHILE i < 200 DO
SET dateV = date_add(date_add(now(),interval - FLOOR(RAND()*(10)+22) year),interval FLOOR(RAND()*(365)) day);
S... |
INSERT INTO roles (name) VALUES ('ROLE_ADMIN');
INSERT INTO roles (name) VALUES ('ROLE_USER');
INSERT INTO roles (name) VALUES ('ROLE_MODERATOR');
INSERT INTO users (username,password,email)
VALUES ('admin','$2<PASSWORD>','<EMAIL>');
INSERT INTO user_roles (user_id,role_id)
VALUES (1,1);
|
CREATE DATABASE company_news;
\c company_news;
CREATE TABLE users (
id SERIAL PRIMARY KEY,
name VARCHAR,
position VARCHAR,
role VARCHAR,
department VARCHAR,
departmentId int
);
CREATE TABLE news (
id SERIAL PRIMARY KEY,
title VARCHAR,
content VARCHAR,
type VARCHAR,
author VARCHAR,
departmentId int
);
CREATE TABLE de... |
ALTER TABLE BRUKER_REGISTRERING DROP COLUMN UTDANNING_BESTATT;
ALTER TABLE BRUKER_REGISTRERING DROP COLUMN UTDANNING_GODKJENT_NORGE;
|
CREATE TABLE users
(
id SERIAL PRIMARY KEY,
principal_name VARCHAR(63) NOT NULL UNIQUE,
ad_name VARCHAR(100) NOT NULL UNIQUE,
mail VARCHAR(63) NOT NULL UNIQUE,
first_name VARCHAR(30),
last_name VARCHAR(30),
admin BOOLEAN NOT NULL DEFAULT ... |
<filename>migrations/revert/06_upd_functions.sql
-- Revert perfume-catalog:06_upd_functions from pg
BEGIN;
-- drop update functions
DROP FUNCTION update_intensity;
DROP FUNCTION update_gender;
DROP FUNCTION update_scent;
DROP FUNCTION update_tag;
DROP FUNCTION update_perfume;
COMMIT;
|
CREATE TABLE dbo.ClaimType
(
ClaimTypeId tinyint IDENTITY(1,1) NOT NULL,
Name varchar(128) COLLATE Latin1_General_100_CS_AS NOT NULL
)
CREATE UNIQUE CLUSTERED INDEX IXC_Claim on dbo.ClaimType
(
Name
)
|
<reponame>shogo82148/wandbox-builder<gh_stars>10-100
-- This file is a "Hello, world!" in SQL by SQLite for wandbox.
SELECT 'Hello, Wandbox!';
-- SQLite reference:
-- http://www.sqlite.org/
-- SQL language references:
-- https://www.mysql.com
-- https://msdn.microsoft.com/library/dn198336.aspx
|
prompt --application/pages/page_00042
begin
-- Manifest
-- PAGE: 00042
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2021.10.15'
,p_release=>'21.2.2'
,p_default_workspace_id=>9690978936188613
,p_default_application_id=>130
,p_default_id_offset=>3010675395498185750
,p_default_owner=>'ILA... |
<gh_stars>0
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table customer (
customer_id bigint auto_increment not null,
firstname varchar(255),
lastname varchar(255),
co... |
<filename>World/PVE Zones/Raids/Wrath of the Lich King/IceCrown Citadel/creature_onkill_reputation.ICC.sql
insert into `creature_onkill_reputation` (`creature_id`, `RewOnKillRepFaction1`, `RewOnKillRepFaction2`, `MaxStanding1`, `IsTeamAward1`, `RewOnKillRepValue1`, `MaxStanding2`, `IsTeamAward2`, `RewOnKillRepValue2`, ... |
<reponame>awdogsgo2heaven/kaiscripts
update "Avatars"
set team = ${name}
where id = ${id};
|
<reponame>fivetran/dbt_apple_ads<filename>models/apple_search_ads__search_term_report.sql
{{ config(enabled=var('apple_search_ads__using_search_terms', True)) }}
with search_term_report as (
select *
from {{ var('search_term_report') }}
), campaign as (
select *
from {{ ref('int_apple_search_ads__mo... |
<reponame>klaus7/backmon
alter table BACKMON_NOTIFICATION_RECEIVER add constraint FK_BACKMON_NOTIFICATION_RECEIVER_ON_BACKUP_SPHERE foreign key (BACKUP_SPHERE_ID) references BACKMON_BACKUP_SPHERE(ID);
create index IDX_BACKMON_NOTIFICATION_RECEIVER_ON_BACKUP_SPHERE on BACKMON_NOTIFICATION_RECEIVER (BACKUP_SPHERE_ID);
|
<gh_stars>0
create table people(
ID INTEGER PRIMARY KEY AUTOINCREMENT
);
create table country(
ctName text primary KEY
);
create table club(
cName text PRIMARY KEY,
nickName text,
foundYear INTEGER,
ctName TEXT REFERENCES country(ctName),
officialSite text
);
create table rounds(
size INTE... |
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
drop table if exis... |
/****** Object: View [dbo].[V_Users_NWFs_Samba] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[V_Users_NWFs_Samba]
AS
SELECT U_PRN AS [Payroll Num],
U_Name AS Name
FROM dbo.T_Users
WHERE (U_active = 'Y') AND
(U_PRN NOT IN ('svc-dms')) -- Exclude this user to preve... |
select
'{{ var("first_dep_global") }}' as first_dep_global,
'{{ var("from_root_to_first") }}' as from_root
|
<filename>src/main/resources/scripts/demonstration_queries/sql_simple_queries.sql
SELECT P.rut,
CONCAT(P.first_names, ' ', P.last_name, ' ',
P.second_last_name) as full_name
FROM residence.person P,
residence.elder E
WHERE P.rut = E.rut;
SELECT personE.rut,
CONCAT(personE.first_names, ... |
<reponame>singh-sukhvir/killbill-analytics-plugin
create or replace view v_report_trial_starts_count_daily as
select
ast.tenant_record_id
, ast.next_start_date as day
, ast.next_product_name as product
, count(1) as count
from
analytics_subscription_transitions ast
where 1=1
and ast.report_group='default'
and a... |
<reponame>archzi/druid<gh_stars>100-1000
ALTER SERVER ROLE Product WITH NAME = Production ;
ALTER SERVER ROLE Production ADD MEMBER [adventure-works\roberto0] ;
ALTER SERVER ROLE diskadmin ADD MEMBER Ted ;
ALTER SERVER ROLE Production DROP MEMBER [adventure-works\roberto0] ;
ALTER SERVER ROLE Production DROP MEMBER Ted... |
--start_ignore
drop table if exists dml_multi_pt_update;
--end_ignore
create table dml_multi_pt_update(a int, b int, c int,d int )
distributed by (a)
partition by range(b)
subpartition by range(c)
subpartition template (default subpartition subothers,start (1) end(7) every (4) )
(default partition others, start(1) end... |
<reponame>TYPO3-svn-archive/caldav
#
# Table structure for table 'tx_cal_event'
#
CREATE TABLE tx_cal_event (
tx_caldav_uid text,
tx_caldav_data text
); |
<reponame>meng630/GMD_E3SM_SCM
Filename: h5stat_newgrat.h5
File information
# of unique groups: 35001
# of unique datasets: 1
# of unique named datatypes: 0
# of unique links: 0
# of unique other: 0
Max. # of links to object: 1
Max. # of objects in group: 35001
File space information for file metadata (in bytes)... |
drop table if exists binding;
CREATE TABLE binding (
id int NOT NULL AUTO_INCREMENT,
im_id varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL ,
account_id varchar(255) NOT NULL,
is_enabled tinyint(1) unsigned NOT NULL,
PRIMARY KEY (id),
CONSTRAINT UC_Person UNIQUE (i... |
SELECT title FROM books WHERE title LIKE '%stories%';
SELECT title, pages FROM books ORDER BY pages DESC LIMIT 1;
SELECT
CONCAT(title, ' - ', released_year) AS summary
FROM books
ORDER BY released_year DESC LIMIT 3;
SELECT title, author_lname FROM books
WHERE author_lname LIKE '% %';
SELECT title, relea... |
UPDATE image_cache
SET
[web_uri]=?1,
[base64_image]=?2
WHERE
[web_uri]=?1; |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.7.11 - MySQL Community Server (GPL)
-- Server OS: Win32
-- HeidiSQL Version: 9.4.0.5144
-- -------------------------------------------------------... |
<reponame>lzztt/bbs.database
DROP PROCEDURE IF EXISTS get_attendee_count_single;
DELIMITER ;;
CREATE DEFINER=web@localhost PROCEDURE get_attendee_count_single(IN $time INT)
COMMENT 'get attendee count'
BEGIN
SELECT COUNT(NULLIF(sex, 0)) AS male, COUNT(NULLIF(sex, 1)) AS female FROM ff_attendees WHERE time > $t... |
update _r86_2017_12_copy set surm = '' where surm = '?';
update _r86_2017_12_copy set kahtlusseos = null, samaisik = null;
update _r86_2017_12_copy set samaisik = kahtlusseos, kahtlusseos = null where kahtlusseos is not null and kahtlusseos != '';
update _r86_2017_12_copy rk
left join kirjed k
on left... |
-- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64)
--
-- Host: localhost Database: lab5
-- ------------------------------------------------------
-- Server version 5.6.24
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4010... |
SELECT * FROM Orders WHERE userID = :userID; |
/*
Post-Deployment Script Template
--------------------------------------------------------------------------------------
This file contains SQL statements that will be appended to the build script.
Use SQLCMD syntax to include a file in the post-deployment script.
Example: :r .\myfile.sql
... |
<reponame>satotatsu/sqlapp
SELECT
*
FROM information_schema.roles
WHERE 1=1
/*if isNotEmpty(roleName)*/
AND name IN /*roleName*/('%')
/*end*/
ORDER BY name |
<reponame>msotiroff/Softuni-learning
SELECT
c.CustomerID,
CONCAT(c.FirstName, ' ', c.LastName) AS FullName,
DATEDIFF(YEAR, c.DateOfBirth, '2016') AS Age
FROM Customers AS c
JOIN Tickets AS t ON t.CustomerID = c.CustomerID
JOIN Flights AS f ON f.FlightID = t.FlightID
WHERE f.Status = 'Departing'
GROUP BY c.C... |
/*****START OF DEBUG INFORMATION*****
The primary key column list:
[RepoObjectColumn_guid]
The INSERT column list:
[RepoObjectColumn_guid],[Inheritance_StringAggSeparatorSql],[InheritanceDefinition],[InheritanceType],[is_persistence_no_check],[is_persistence_no_include],[is_persistence_no_update],[is_query_plan_expr... |
-- MySQL
-- Runtime: 296 ms
-- Memory: 0 B
SELECT Email
FROM Person
GROUP BY Email
HAVING COUNT(*) > 1;
|
-- Your SQL goes here
ALTER TABLE pages
ADD COLUMN description TEXT NOT NULL DEFAULT ''; |
<reponame>JacobBlack1/12.-Employee-Tracker<filename>db/seeds.sql
INSERT INTO department (name)
VALUES ("Marketing");
INSERT INTO department (name)
VALUES ("Human Resourses");
INSERT INTO department (name)
VALUES ("Operations");
INSERT INTO department (name)
VALUES ("Finance");
INSERT INTO department (name)
VALUES (... |
-- -----------------------------------------------------------------------------
-- Job controller configuration
-- SLV_JOB_CONTROLLER_DESC
-- -----------------------------------------------------------------------------
-- Enable identity insert
SET IDENTITY_INSERT SLV_JOB_CONTROLLER_DESC ON
-- Check if configuratio... |
<gh_stars>0
truncate message_attributes;
insert into `message_attributes`
(`message_attribute_id`, message_name, `takes_days`)
values
(1, 'Item_Due', 0),
(2, 'Advance_Notice', 1),
(4, 'Hold_Filled', 0),
(5, 'Item_Check_in', 0),
(6, 'Item_Checkout', ... |
<filename>Plycur/plycur-database/proc/usp_Plycur_App_Update.sql
-- offline
|
<filename>database/seeds/seed.sql
insert into cca.los_menuitems(id,provider_id,item_name,description,price,active,created_at,updated_at)
select id,provider_id,concat(substr(item_name,1,47),id),item_name,price,active,created_at,updated_at
from homestead.los_menuitems;
insert into cca.los_nolunchexceptions(id,exception... |
-- Migrationscripts for ebean unittest
-- apply changes
CALL usp_ebean_drop_column('migtest_e_basic', 'status2');
CALL usp_ebean_drop_column('migtest_e_basic', 'description');
|
CREATE TABLE bc_rt_online.ck_zh_insight_deal_ord_prov_idty ( dateTime String, halfhour Int32, dt String, terminalId String, virtualId Array(String), saleOrdId Float64, userLogAcct String, thirdIndId String, saleAmt Float64, brandId String, shopId String, saleQtty Float64, secondIndId String, firstIndId Str... |
CREATE TABLE PUBLIC.INDEX_TEST2 (
INDEX_TEST2_ID BIGINT NOT NULL,
SUB_ID_1 BIGINT NOT NULL,
SUB_ID_2 BIGINT NOT NULL,
PRIMARY KEY (INDEX_TEST2_ID)
);
COMMENT ON table PUBLIC.INDEX_TEST2 is 'INDEX_TEST2';
COMMENT ON column PUBLIC.INDEX_TEST2.INDEX_TEST2_ID is 'INDEX_TEST2_ID';
COMMENT ON column PUBLIC.INDEX_TEST... |
<gh_stars>1-10
-- Table SEQUENCE_TABLE is an internal table required by DataNucleus.
-- NOTE: Some versions of SchemaTool do not automatically generate this table.
-- See http://www.datanucleus.org/servlet/jira/browse/NUCRDBMS-416
CREATE TABLE SEQUENCE_TABLE
(
SEQUENCE_NAME VARCHAR2(255) NOT NULL,
NEXT_VAL NUMBER... |
<reponame>highmed/highmed_dsf
CREATE OR REPLACE FUNCTION on_naming_systems_insert() RETURNS TRIGGER AS $$
BEGIN
PERFORM on_resources_insert(NEW.naming_system_id, NEW.version, NEW.naming_system);
RETURN NEW;
END;
$$ LANGUAGE PLPGSQL |
<reponame>alytics/pg_partman
\set ON_ERROR_ROLLBACK 1
\set ON_ERROR_STOP true
SELECT set_config('search_path','partman_reindex_test, partman, public',false);
SELECT plan(1);
DROP SCHEMA IF EXISTS partman_reindex_test CASCADE;
SELECT pass('Cleanup Done');
SELECT * FROM finish();
|
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 17, 2019 at 06:25 PM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
-- phpMyAdmin SQL Dump
-- version 4.0.10.6
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1:3306
-- Время создания: Май 12 2016 г., 15:28
-- Версия сервера: 5.5.41-log
-- Версия PHP: 5.4.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... |
drop table if exists tab0;
drop table if exists tab1;
CREATE TABLE tab0(a INTEGER);
INSERT INTO tab0 VALUES(0);
CREATE TABLE tab1(a INTEGER);
INSERT INTO tab1 VALUES(1);
select * from ((select * from tab1) as tab11), tab0;
drop table if exists tab0;
drop table if exists tab1;
|
-- DBO.[DATAEXPLORER] (BEGIN)
/*
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE (TABLE_NAME = 'DataExplorer') AND (TABLE_SCHEMA = 'dbo'))
DROP TABLE dbo.[DataExplorer]
GO
*/
CREATE TABLE dbo.[DataExplorer] (
DataExplorerId BIGIN... |
create proc sp_SearchActiveMateriel
@search varchar(50)
as
select id_am 'ID Matiére actif' , name_am '<NAME>', description_am 'Description Matiére actif'
from active_materielle
where
convert(varchar,id_am)+name_am+description_am like '%'+@search+'%'
return |
<gh_stars>0
ALTER TABLE SETTINGS RENAME COLUMN APPLICATIONNAME TO APPLICATIONMAPPINGNAME;
ALTER TABLE SETTINGS ADD (
MAPPINGTYPE VARCHAR2(255 CHAR)
);
UPDATE SETTINGS
SET MAPPINGTYPE = 'APPLICATION' where MAPPINGTYPE is NULL; |
<filename>hive/test.sql
load data inpath '/user/kolisachint/resources/hive/test.csv' into table test;
|
<reponame>MustafaAmish/All-Curses-in-SoftUni<filename>06. Database Basics - MS SQL/Exam Preparation/Exam - 24 June 2018/18. Available Room.sql<gh_stars>0
CREATE FUNCTION udf_GetAvailableRoom(@HotelId INT, @Date DATE, @People INT)
RETURNS NVARCHAR(MAX)
AS
BEGIN
DECLARE @roomId INT = (
SELECT r.Id
FR... |
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.5.5-10.1.37-MariaDB)
# Database: db_cms_winiharto
# Generation Time: 2019-11-28 11:20:13 +0000
# ***********************... |
CREATE PROCEDURE [dbo].[dnn_DeleteMetaData]
@ContentItemId int,
@Name nvarchar(100),
@Value nvarchar(MAX)
AS
DELETE FROM dbo.dnn_ContentItems_MetaData
FROM dbo.dnn_ContentItems_MetaData AS cm
INNER JOIN dbo.dnn_MetaData AS m ON cm.MetaDataID = m.MetaDataID
WHERE cm.ContentItemId = @ContentItemId AND ... |
<reponame>ucdavis/Purchasing<filename>PurchasingTP.AzureDb/dbo/Tables/JobLogs.sql
CREATE TABLE [dbo].[JobLogs]
(
[Id] INT NOT NULL PRIMARY KEY IDENTITY,
[Name] VARCHAR(100) NOT NULL,
[DateTime] DATETIME NOT NULL DEFAULT getdate(),
[Comments] VARCHAR(MAX) NULL
)
|
CREATE TABLE rooms
(
ID SERIAL PRIMARY KEY NOT NULL,
NAME VARCHAR(255) UNIQUE,
INFO TEXT NULL,
MAX_CAPACITY INTEGER NOT NULL
);
CREATE TABLE patient
(
ID SERIAL PRIMARY KEY NOT NULL,
HASHED_PASSWORD VARCHAR NOT NULL,
PERSONAL_ID ... |
<reponame>Tanvi141/ResortChainDBMS
-- MySQL dump 10.13 Distrib 5.7.23, for Linux (x86_64)
--
-- Host: localhost Database: RESORT
-- ------------------------------------------------------
-- Server version 5.7.23-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHA... |
<gh_stars>100-1000
-- fts3e.test
--
-- execsql {
-- SELECT docid FROM t1 WHERE c LIKE 'That%' ORDER BY docid;
-- }
SELECT docid FROM t1 WHERE c LIKE 'That%' ORDER BY docid; |
CREATE TABLE IF NOT EXISTS `dashboards` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE IF NOT EXISTS `dbviews` (
... |
CREATE TABLE description (
id bigint(20) NOT NULL AUTO_INCREMENT,
email VARCHAR(45),
information varchar(200),
lastname VARCHAR(45),
firstname VARCHAR(45),
company_id bigint(20),
user_id bigint(20),
FOREIGN KEY (company_id) references company(id),
FOREIGN KEY (user_id) references user(id),
PRIMARY... |
-- Generated by dbtvault.
WITH source_data AS (
SELECT a.SUPPLIER_PK, a.SUPPLIER_HASHDIFF, a.SUPPLIERID, a.COMPANYNAME, a.CONTACTNAME, a.CONTACTTITLE, a.ADDRESS, a.REGION, a.COUNTRY, a.POSTALCODE, a.LOAD_DATE, a.RECORD_SOURCE
FROM DATAVAULTDEMO_DB.SS_STG.v_stg_suppliers AS a
WHERE __PERIOD_FILTER__
... |
/*
Copyright 2016 <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.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,... |
--
-- PHPOE-1799-2 commit.sql
--
ALTER TABLE `institution_site_section_students` DROP `student_category_id`;
ALTER TABLE `institution_site_section_students` CHANGE `security_user_id` `student_id` INT(11) NOT NULL COMMENT 'links to security_users.id';
-- Latest
ALTER TABLE `institution_site_class_students` CHANGE `sec... |
SET old.county_name = '';
SET new.county_name = '';
SET target.state_name = '';
SET target.event_id = '';
UPDATE legacy_sites SET county = CAST(current_setting('new.county_name') AS text) WHERE county = CAST(current_setting('old.county_name') AS text) AND state = CAST(current_setting('target.state_name') AS text) AND ... |
-- drop pre existing learning path indices
DROP INDEX learning_path_draft_id;
DROP INDEX learning_path_live_id;
DROP INDEX learning_path_data_resource_learning_path_data_id_idx;
DROP INDEX learning_path_data_affiliation_learning_path_data_id_idx;
DROP INDEX learning_path_data_age_range_learning_path_data_id_idx;
D... |
use [OnlineFraudDetection]
go
set ansi_nulls on
go
set quoted_identifier on
go
DROP PROCEDURE IF EXISTS dbo.EvaluateR_auc
GO
create procedure dbo.EvaluateR_auc
as
begin
truncate table OnlineFraudDetection.dbo.sql_performance_auc
insert into OnlineFraudDetection.dbo.sql_performance_auc
exec sp_execute_external_scr... |
create database LibraryManagementSystem;
use LibraryManagementSystem;
create table BookInfo(
name char(30),
price int,
author char(30),
type char(30),
pageNum int,
wordNum int,
isbn char(30),
primary key(isbn)
);
create table Book(
id char(20),
isbn char(30),
borrowerid char(30),
hasborrowednum int,
isborr... |
-- CreateTable
CREATE TABLE "lessons" (
"id" SERIAL NOT NULL,
"name" VARCHAR(255) NOT NULL,
"user_uuid" VARCHAR(255) NOT NULL,
"video_url" VARCHAR(255),
CONSTRAINT "lessons_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "users" (
"id" SERIAL NOT NULL,
"name" VARCHAR(255) NOT NULL,... |
CREATE TABLE Surveys
(
Username varchar(60) NOT NULL,
Email varchar(120) NOT NULL UNIQUE,
name varchar(20) unique,
quantity int default 0,
Password varchar(120),
First_Name varchar(50) NOT NULL,
Last_name varchar(50) NOT NULL,
AGE INT,
Phone varchar(25),
State varchar(2),
PRIMARY KEY(Username)
)
|
ALTER TABLE `users` ADD `under_maintenance` ENUM('0','1') NOT NULL DEFAULT '0' AFTER `prevent_f12`; |
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 100417
Source Host : localhost:3306
Source Database : daily_report
Target Server Type : MYSQL
Target Server Version : 100417
File Encoding : 65001
Date: 2021-04-28 20:27:05
*/
SET FOREIGN_KEY_CHECKS=0;
-... |
SELECT CRN,
MUNICIPALITY_NAME,
POLICE_AGCY,
POLICE_AGCY_NAME,
STREET_NAME,
ROAD_OWNER,
ROUTE,
SEGMENT,
CRASH_YEAR,
CRASH_MONTH,
DAY_OF_WEEK,
TIME_OF_DAY,
HOUR_OF_DAY,
ILLUMINATION,
WEATHER,
ROAD_CONDITION,
COLLISION_TYPE,
INTERSECT_TYPE,
TCD_TYPE,
LOCATION_TYPE,
FATAL_COUNT,
INJURY_COUNT,
PERSON_C... |
<gh_stars>0
-- MySQL dump 10.15 Distrib 10.0.13-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: hipica_roberto
-- ------------------------------------------------------
-- Server version 10.0.13-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RE... |
<filename>migrations/sqls/20151112155317-addLastSeenToUser-up.sql<gh_stars>0
ALTER TABLE `WaybookUser` ADD COLUMN `lastSeen` DATETIME;
|
use jack_api_hacienda; -- or a different db? dunno
-- ---------------------------
-- View vw_cabysxsac --
-- ---------------------------
CREATE VIEW vw_cabysxsac
AS
SELECT ca.`code`,
cs.sac_version_2017 AS `Codigo SAC`,
ca.description AS `Descripcion Cabys`,
cs.cantidad_codigos_cabys_sac
FROM cabysxsac AS ... |
INSERT INTO `role` ( `ID_Faction`, `Name`, `Description`, `isUnique`, `activeAtNight`) VALUES
(
'1',
'Corbeau',
"Il peut désigner un joueur chaque nuit, qui recevra de facto un vote le lendemain.",
'1',
'1'
),
(
'1',
'Cupidon',
"Durant la toute première nuit de la partie, il va désigner ... |
CREATE TABLE [dbo].[Envelope]
(
[Id] INT NOT NULL,
[ParentId] INT NULL,
[Code] VARCHAR(8),
[Description] VARCHAR(64),
CONSTRAINT [PK_Envelope_Id] PRIMARY KEY CLUSTERED (Id),
CONSTRAINT [FK_Envelope_Envelope] FOREIGN KEY (ParentId) REFERENCES dbo.Envelope(Id)
)
|
<filename>scripts/20210105-155846.sql
alter table projects add column branch text check(util.null_or_non_empty_trimmed_string(branch));
|
ALTER TABLE `driver_info` ADD COLUMN `down_to_help_out_stop` date DEFAULT NULL; |
SELECT
DISTINCT council_sablefish_management_area,
council_management_area,
fmp_management_area,
geographic_area_name,
exploitable,
council_management_area
FROM afsc.lls_area_view
WHERE exploitable = 1
AND sex IN (1, 2)
|
CREATE TEMPORARY TABLE t_cm_temp_enc_plan
(enc_plan_id NUMERIC(6) NOT NULL,
atm_id NUMERIC(9) NOT NULL,
date_forthcoming_encashment TIMESTAMP)
ON COMMIT DELETE ROWS;
COMMENT ON TABLE T_CM_TEMP_ENC_PLAN IS 'This table contains planned encashments generated by fo... |
alter table widget add column data longtext;
-- alter table widget drop column data; |
//24-Hour Ambulatory Esophageal pH Monitoring
library AmbulatoryEsophagealpHMonitoring
using FHIR
include FHIRHelpers version '1.8' called FHIRHelpers
//include otherLibrary version 'x.x' called otherLibrary
//codesystem codeSystemName : 'OID' version 'x.x'
//valueset valuesetName : 'OID' version 'x.x' codesystems{c... |
DROP DATABASE IF EXISTS employees;
CREATE DATABASE employees;
USE employees;
CREATE TABLE departments(id INT AUTO_INCREMENT NOT NULL,
name VARCHAR(30) NOT NULL,
PRIMARY KEY(id));
CREATE TABLE roles (id INT AUTO_INCREMENT NOT NULL,
title VARCHAR(30) NOT NULL,
salary DECIMAL,
department_id INT NOT NULL,
PRIMARY KEY(id... |
<reponame>sebastianarnold/TeXoo<filename>texoo-retrieval/src/test/resources/testdata/enwiki-redirect.sql
-- MySQL dump 10.16 Distrib 10.1.26-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: 10.64.48.13 Database: enwiki
-- ------------------------------------------------------
-- Server version 10.1.33-MariaDB
/*... |
create extension pg_surgery;
-- create a normal heap table and insert some rows.
-- note that we don't commit the transaction, so autovacuum can't interfere.
begin;
create table htab(a int);
insert into htab values (100), (200), (300), (400), (500);
-- test empty TID array
select heap_force_freeze('htab'::regclass, A... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50553
Source Host : localhost:3306
Source Database : db_gym_database
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-01-29 14:54:00
*/
SET FOREIGN_KEY_CHECKS=... |
<filename>sql/_04_operator_function/_08_click_counter/_001_incr/cases/1027.sql
-- create a class,insert data to this class,test incr function with 'incr(a)+1' in a select clause
create class xoo ( a int);
insert into xoo values(1);
select incr(a) + 1 from xoo;
drop xoo; |
-- @testpoint:opengauss关键字concurrently(非保留),作为模式名
--关键字不带引号-成功
drop schema if exists concurrently;
create schema concurrently;
drop schema concurrently;
--关键字带双引号-成功
drop schema if exists "concurrently";
create schema "concurrently";
drop schema "concurrently";
--关键字带单引号-合理报错
drop schema if exists 'concurrently';
... |
-- Table definitions for the tournament project.
--
-- Put your SQL 'create table' statements in this file; also 'create view'
-- statements if you choose to use it.
--
-- You can write comments in this file by starting them with two dashes, like
-- these lines here.
-- Drop the tournament database if exists
DROP DATA... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.