sql stringlengths 6 1.05M |
|---|
ALTER TABLE `selfservice_registration_flow_methods` CHANGE `selfservice_registration_request_id` `selfservice_registration_flow_id` char(36) NOT NULL |
\set ON_ERROR_STOP 1
DROP INDEX CONCURRENTLY edit_note_idx_post_time_edit;
CREATE INDEX CONCURRENTLY edit_note_idx_post_time_edit ON edit_note (post_time DESC NULLS LAST, edit DESC);
|
create class test_class (date_col date, time_col time, timestamp_col timestamp, datetime_col datetimeltz);
insert into test_class(datetime_col) values (datetimeltz '1-1-1 00:00:00.000');
insert into test_class(datetime_col) values (datetimeltz '0001-01-01 00:00:00.000');
insert into test_class(datetime_col) values (da... |
CREATE TABLE test( pk serial not null, description text, primary key(pk));
INSERT INTO test(pk) VALUES(generate_series(1,1000000 ) );
VACUUM FULL ANALYZE test;
EXPLAIN SELECT * FROM test WHERE pk = 1;
|
CREATE TABLE IF NOT EXISTS "company_benefit" (
"company_id" uuid REFERENCES companies("company_id") ON DELETE CASCADE,
"benefit" VARCHAR(40) REFERENCES benefits("benefit") NOT NULL,
PRIMARY KEY ("company_id", "benefit")
); |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Feb 16, 2019 at 06:58 AM
-- Server version: 10.2.21-MariaDB
-- PHP Version: 7.2.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
<reponame>geophile/sql-layer
SELECT name, order_date
FROM customers INNER JOIN orders ON customers.cid = orders.cid
WHERE (LCASE(NULL) AND LCASE(name)) OR (DATE(order_date) AND DATE(NULL))
|
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 05, 2021 at 03:36 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
--Q1
if exists (select * from sysobjects where name like 'ica14_01')
drop procedure ica14_01
go
create procedure ica14_01
@category as varchar(max) = '',
@productName as varchar(max) output,
@quantity as int output
as
select top 1
@productName = p.ProductName,
@quantity = od.Quantity
from NorthwindTrade... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 05, 2020 at 04:30 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... |
# --- !Ups
CREATE TABLE project_version_reviews (
id SERIAL PRIMARY KEY,
version_id INT NOT NULL REFERENCES project_versions ON DELETE CASCADE,
user_id INT NOT NULL REFERENCES users ON DELETE CASCADE,
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
ended_at TIMES... |
<filename>simulator/evaluate_batting_order.sql
-- Evaluate batting order given 9 transition matrices and tolerance
create or replace function simulator3.evaluate_batting_order
(float[][], float[][], float[][], float[][], float[][],
float[][], float[][], float[][], float[][],
float)
returns float as '
# Passed in: ... |
<filename>####/lumenauth.sql
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2016-04-13 18:06:39
-- 服务器版本: 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... |
<filename>src/test/resources/sql/create_view/a2e933f2.sql
-- file:updatable_views.sql ln:1253 expect:true
create view rw_view1 as select b as bb, c as cc, a as aa from base_tbl
|
<reponame>Gandjurov/Databases-Basics-MSSQL
--01. Find Names of All Employees by First Name
SELECT FirstName, LastName
FROM Employees
WHERE FirstName LIKE 'SA%'
--02. Find Names of All Employees by Last Name
SELECT FirstName, LastName
FROM Employees
WHERE LastName LIKE '%ei%'
--03. Find First Names of... |
<gh_stars>1-10
Select [Year-Week],
Sum(Bernie_Words) As Bernie_Words,
Cast(100.*Sum(Bernie_Words)/Sum(All_Words) As Numeric(5,2)) As Percent_Bernie_Speaking,
Cast(100.*Sum(Biden_Words)/Sum(All_Words) As Numeric(5,2)) As Percent_Biden_Speaking,
Cast(100.*Sum(Bloomberg_Words)/Sum(All_Words) As Numeric(5,2)) As Pe... |
-- 2018-03-15T12:04:01.337
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Element (AD_Client_ID,IsActive,CreatedBy,PrintName,EntityType,ColumnName,AD_Element_ID,AD_Org_ID,Name,UpdatedBy,Created,Updated) VALUES (0,'Y',100,'Media Types','de.metas.ui.web','MediaTypes',543928,0,'Media Type... |
CREATE TABLE HR.EmployeeClassification
(
EmployeeClassificationKey INT NOT NULL
IDENTITY(1000, 1)
PRIMARY KEY,
EmployeeClassificationName VARCHAR(30)
);
|
SELECT 'Upgrading MetaStore schema from 2.1.1-cdh6.0.0 to 2.1.1-cdh6.1.0';
UPDATE "VERSION" SET "SCHEMA_VERSION"='2.1.1', "VERSION_COMMENT"='Hive release version 2.1.1' where "VER_ID"=1;
UPDATE "CDH_VERSION" SET "SCHEMA_VERSION"='2.1.1-cdh6.1.0', "VERSION_COMMENT"='Hive release version 2.1.1 for CDH 6.1.0' where "VER_... |
USE Taskboard;
GO
CREATE OR ALTER PROCEDURE [Project.Create]
@userId INT,
@teamId INT,
@title NVARCHAR(64),
@about NVARCHAR(256)
AS
BEGIN
IF NOT EXISTS (SELECT TOP 1 id FROM [USER_TOKEN] WHERE userId = @userId)
BEGIN
PRINT 'TOKEN EXPIRED';
RETURN;
END;
IF NOT EXISTS (SELECT TOP 1 id FROM TEAM WHERE id = @... |
<filename>admin/sql/updates/mysql/0.0.11.sql
CREATE TABLE IF NOT EXISTS `#__monitor_subscriptions_issues`(
`item_id` int(10) unsigned NOT NULL COMMENT 'ID of the issue subscribed to.',
`user_id` int(11) COMMENT 'ID of the subscribing user.',
FOREIGN KEY (`item_id`) REFERENCES `#__monitor_issues`(`id`) ON DELETE CASC... |
<reponame>cuba-rnd/entity-views-sample<filename>modules/core/db/update/hsql/19/190419-2-createEmployee.sql<gh_stars>1-10
alter table ENTITYVIEWSSAMPLE_EMPLOYEE add constraint FK_ENTITYVIEWSSAMPLE_EMPLOYEE_ON_DEPARTMENT foreign key (DEPARTMENT_ID) references ENTITYVIEWSSAMPLE_DEPARTMENT(ID);
create index IDX_ENTITYVIEWS... |
<reponame>AnthonyMolinaro/ETL-LambdaBuilder
SELECT distinct concept_name, concept_id, 'None' as Domain, NULL AS valid_start_date, NULL AS valid_end_date
FROM {sc}.concept
where lower(domain_id)='unit' and lower(vocabulary_id)='ucum' |
<gh_stars>1-10
#-- Copyright 2022 Google LLC
#--
#-- 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
#--
#-- https://www.apache.org/licenses/LICENSE-2.0
#--
#-- Unless required by applica... |
<gh_stars>1-10
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
create index BIO_PATHWAYS_PATHWAY_DI_lwr on BIO_PATHWAYS(lower(PATHWAY_DIAGRAM)) PARALLEL NOLOGGING tablespace CABIO_FUT;
create index BIO_PATHWAYS_... |
<gh_stars>0
-- @testpoint:opengauss关键字stable(非保留),作为视图名
--关键字explain作为视图名,不带引号,创建成功
CREATE or replace VIEW stable AS
SELECT * FROM pg_tablespace WHERE spcname = 'pg_default';
drop view stable;
--关键字explain作为视图名,加双引号,创建成功
CREATE or replace VIEW "stable" AS
SELECT * FROM pg_tablespace WHERE spcname = 'pg_default';
d... |
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table user (
id bigint not null,
name varchar(255),
email varchar(255),
password var... |
<filename>tag/src/main/resources/data.sql
INSERT INTO blogpost_tag (pid,post_id,tag)
VALUES (1,1,'Spring');
INSERT INTO blogpost_tag (pid,post_id,tag)
VALUES (2,1,'Functional');
INSERT INTO blogpost_tag (pid,post_id,tag)
VALUES (3,1,'Reactive');
INSERT INTO blogpost_tag (pid,post_id,tag)
VALUES (4,2,'Ev... |
<reponame>htn/sh
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.1.31-MariaDB - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL Version: 9.5.0.5196
-- -------------------------------... |
<gh_stars>0
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
--
-- Host: localhost Database: machine-managements_development
-- ------------------------------------------------------
-- Server version 5.7.27
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RES... |
/*
** Create a table to hold person information
*/
-- Select MyDb as default database
use MyDb;
-- Create a table named person
create table person (
-- Id is an integer which must not be null, it is our primary key also
id int not null primary key,
-- first_name and last_name are fields with type of Unicode varia... |
<reponame>aldiansahm6543/erapot
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 12 Mar 2020 pada 11.18
-- Versi server: 10.1.38-MariaDB
-- Versi PHP: 7.3.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... |
<filename>schemas/server_access/functions.d/upd_user.sql
---
name: upd_user
description: passwd user
templates:
- user.userlogin
returns: void
parameters:
-
name: p_user
type: server_access.t_user
-
name: p_service_entity_name
type: dns.t_hostname
-
name: p_password
type: commons.t_password_plaintext... |
<reponame>satotatsu/sqlapp<filename>sqlapp-core-db2/src/main/resources/com/sqlapp/data/db/dialect/db2/metadata/indexes.sql
SELECT
ic.INDSCHEMA AS schema_name
, i.TABNAME AS table_name
, i.TABSCHEMA AS table_schema
, ic.INDNAME AS index_name
, ic.COLSEQ AS ORDINAL_POSITION
, ic.COLNAME AS column_name
, i... |
CREATE PROC usp_EmployeesBySalaryLevel (@levelOfSalary VARCHAR(10))
AS SELECT FirstName,
LastName FROM Employees
WHERE dbo.ufn_GetSalaryLevel(Salary) = @levelOfSalary
EXEC dbo.usp_EmployeesBySalaryLevel 'High' |
<reponame>Toby-trian/choise1
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 25 Jan 2021 pada 08.26
-- Versi server: 10.4.6-MariaDB
-- Versi PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:... |
<reponame>bishalakajiren/JOBPORTALBISHAL<filename>job_JOB_PORTAL.sql
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 19, 2019 at 06:18 AM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT ... |
<reponame>danieldiamond/gitlab-analytics
WITH source AS (
SELECT *
FROM {{ ref('zuora_invoice_item_source') }}
)
SELECT *
FROM source
WHERE is_deleted = FALSE
|
<reponame>ReneNyffenegger/method4
prompt
prompt
prompt **************************************************************************
prompt Method4 Installer
prompt (c) oracle-developer.net, <NAME>
prompt **************************************************************************
prompt
prompt Installing type specif... |
<reponame>Shuttl-Tech/antlr_psql
-- file:window.sql ln:32 expect:true
SELECT depname, empno, salary, sum(salary) OVER w FROM empsalary WINDOW w AS (PARTITION BY depname)
|
<gh_stars>10-100
-- file:triggers.sql ln:1882 expect:true
drop function dump_delete()
|
<filename>src/test/resources/sql/select/167f3e6b.sql
-- file:line.sql ln:87 expect:true
SELECT line '[(1,2),(3,4)]' = line '[(3,4),(4,4)]'
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 05, 2018 at 04:56 PM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 5.6.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
<filename>sso/postgres/user_oauth2_provider_check.sql
SELECT
"user_id"
FROM
sso.user_oauth2_provider_table
WHERE
"oauth2_provider" = $1
AND
"sub" = $2
|
-- Создаём таблицу для хранилища DWH
-- В хранилище мы не создаём ключи, так как это накладно!
-- Сбрасываем все существующие таблицы
DROP TABLE DEMIPT.ANBO_DWH_FACT_TRANSACTIONS;
DROP TABLE DEMIPT.ANBO_DWH_FACT_PSSPRT_BLCKLST;
DROP TABLE DEMIPT.ANBO_DWH_DIM_TERMINALS_HIST;
DROP TABLE DEMIPT.ANBO_DWH_DIM_CARDS_... |
# Author: <NAME>
select name
from Employee
where salary > 2000
and months < 10
order by employee_id asc; |
SELECT (CURRENT_TIMESTAMP + INTERVAL '200' YEAR(3)) - (CURRENT_TIMESTAMP + INTERVAL '200' YEAR(3)) FROM j1;
|
select * from `PROJECT.idc_v5.nlst_ctab`
|
SELECT DISTINCT toFloat64(arrayJoin(['+inf', '+Inf', '+INF', '+infinity', '+Infinity']));
SELECT DISTINCT toFloat64(arrayJoin(['-inf', '-Inf', '-INF', '-infinity', '-Infinity']));
SELECT DISTINCT toFloat64(arrayJoin(['inf', 'Inf', 'INF', 'infinity', 'Infinity']));
|
<gh_stars>0
-- @testpoint: svm创建mode带超参max_seconds大于最大值,超参max_seconds小于最小值,合理报错
--step1: 建表并插入数据;expect: 建表并插入数据成功
drop table if exists t_model_tab_0090;
create table t_model_tab_0090(id integer not null,second_attack integer,treatment integer,trait_anxiety integer );
insert into t_model_tab_0090 values (1,1,1,70),(2,... |
<gh_stars>100-1000
truncate table exception_logs;
alter table exception_logs alter column code type uuid using code::uuid;
alter table exception_logs rename column extra to extra_params;
alter table exception_logs add column ip_addr inet not null;
ALTER TABLE exception_logs ALTER COLUMN message SET NOT NULL;
ALTER TABL... |
<gh_stars>0
CREATE TABLE catalogue.PublicationStatus
(
Id int NOT NULL,
[Name] nvarchar(16) NOT NULL,
CONSTRAINT PK_PublicationStatus PRIMARY KEY (Id),
CONSTRAINT AK_PublicationStatus_Name UNIQUE ([Name]),
);
|
DROP USER 'techtestparty'@'localhost'
;
DROP TABLE testtable
;
DELETE FROM party
WHERE UPPER(name) = UPPER('testparty')
;
DELETE FROM party_category
WHERE UPPER(name) = UPPER('testcategory')
;
DELETE FROM permission
WHERE UPPER(title) = UPPER('testpermission')
;
|
EXEC [EST].[Proc_yjbb_Ins] @Code = N'603536',@CutoffDate = N'2017-09-30',@EPS = N'0.3',@EPSDeduct = N'0',@Revenue = N'5.82亿',@RevenueYoy = N'19.44',@RevenueQoq = N'-',@Profit = N'3005.04万',@ProfitYoy = N'221.46',@ProfiltQoq = N'-',@NAVPerUnit = N'5.1139',@ROE = N'6.27',@CashPerUnit = N'-0.1007',@GrossProfitRate = N'27.... |
<reponame>aradoslav/Geocode-network
use customer_gis
update [dbo].[Customer_file] set [Ref_Customer_id] = NULL where [Ref_Customer_id]='NULL'
---(1142 rows affected)
insert into [dbo].[Customer](
[Customer_id]
,[Full_name]
,[Customer_type]
,[Is_client_flg]
,[Is_referal]
,[Ref_Custo... |
<reponame>yjinheon/tips-questions<gh_stars>0
-- Question 75
-- The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id.
-- +------+----------+-----------+----------+
-- |Id |Name |Department |ManagerId |
-- +------+----------+------... |
DROP TABLE IF EXISTS digimonsTable;
CREATE TABLE digimonsTable(
id SERIAL PRIMARY KEY,
name VARCHAR(255),
image VARCHAR(255),
level VARCHAR(255)
);
-- INSERT INTO digimonsTable (name,image,level) VALUES ('hiiii','linkkkkkkk','herooo'); |
<gh_stars>0
CREATE TABLE `hiera` (
`_id` int(11) NOT NULL AUTO_INCREMENT,
`var` varchar(45) NOT NULL,
`val` text NOT NULL,
`environment` varchar(45) NOT NULL,
`hostgroup` varchar(45) NOT NULL DEFAULT 'common',
`hostname` varchar(45) DEFAULT NULL,
PRIMARY KEY (`_id`)
) ENGINE=InnoDB AUTO_INCREMENT=573 DEFA... |
<gh_stars>0
-- General procedures
CREATE FUNCTION on_record_insert() RETURNS trigger AS $$
BEGIN
NEW.created_at := now();
NEW.updated_at := now();
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
CREATE FUNCTION on_record_update() RETURNS trigger AS $$
BEGIN
NEW.id := OLD.id;
NEW.created_at := ... |
DROP DATABASE IF EXISTS group_10;
CREATE DATABASE group_10;
\c group_10;
CREATE TABLE Books (
book_id int,
goodreads_book_id int UNIQUE NOT NULL,
best_book_id int NOT NULL,
work_id int NOT NULL,
books_count int NOT NULL CHECK (books_count >= 0),
isbn varchar(20),
isbn13 decimal,
authors... |
<gh_stars>1-10
SET DEFINE OFF;
ALTER TABLE AFW_12_ATRIB_SCENR_NOTFC_ITEM ADD (
CONSTRAINT AFW_12_ASN_ITEM_FK1
FOREIGN KEY (REF_PAGE)
REFERENCES AFW_13_PAGE (SEQNC)
ON DELETE CASCADE
ENABLE VALIDATE)
/
|
<reponame>navikt/sykefravarsstatistikk-api<filename>src/main/resources/db/migration/V12__legg_til_indekser_paa_statistikk_virksomhet_med_gradering.sql<gh_stars>1-10
--
CREATE INDEX orgnr_virksomhet_med_gradering__index
ON sykefravar_statistikk_virksomhet_med_gradering (orgnr);
CREATE INDEX naring_virksomhet_med_grad... |
<gh_stars>1-10
INSERT INTO shop_category(id, name) VALUES ('J760KK', 'Plugin');
INSERT INTO shop_category(id, name) VALUES ('4MCZ11', 'Sample Pack');
INSERT INTO shop_category(id, name) VALUES ('103VOI', 'EP');
INSERT INTO shop_product_status(id, status) VALUES ('AXQBK7', 'AVAILABLE');
INSERT INTO shop_product_status(... |
<reponame>VigoTes/Tesis_Cedepas<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 01-05-2021 a las 01:02:34
-- Versión del servidor: 5.7.32-log
-- Versión de PHP: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET ... |
ALTER TABLE [dbo].[Clubs] ADD [Visible] [bit] NOT NULL DEFAULT 0
INSERT [dbo].[__MigrationHistory]([MigrationId], [ContextKey], [Model], [ProductVersion])
VALUES (N'201506232105012_Club-Visibility', N'FlightJournal.Web.Migrations.FlightContext.Configuration', 0x1F8B0800000000000400ED3DDB72DC3A72EFA9CA3F4CCD5392F26A249... |
<filename>src/test/resources/schema2.test_7.sql<gh_stars>100-1000
-- schema2.test
--
-- execsql {
-- DROP TRIGGER abc_trig;
-- }
DROP TRIGGER abc_trig; |
<reponame>scheltwort-it-services/common_schema
--
-- This code is free software; you can redistribute it and/or modify it under
-- the terms of the GNU General Public License as published by the Free Software
-- Foundation, version 2
--
--
-- Analyze the parameters for a given routine; write down their names
--
DEL... |
set search_path to public;
--show temp_file_limit;
--set temp_file_limit = '1 MB';
--set temp_file_limit = '10 MB';
--set temp_file_limit = '100 MB';
--show maintenance_work_mem;
--set maintenance_work_mem = '1 MB';
--set maintenance_work_mem = '1 GB';
drop index concurrently if exists idx_ref_without_nulls;
create i... |
<gh_stars>1-10
-- Sample query to identify tables which are missing primary key constraint (Tested on PostgreSQL 10 and 11)
select tab.table_schema, tab.table_name
from information_schema.tables tab
left join information_schema.table_constraints tco
on tab.table_schema = tco.table_schema
and tab.table_name = tco.table... |
CREATE TABLE IF NOT EXISTS `zstack`.`ThirdpartyPlatformVO` (
`uuid` varchar(32) NOT NULL,
`name` varchar(255) NOT NULL,
`type` varchar(255) NOT NULL,
`state` varchar(255) NOT NULL,
`url` varchar(512) NOT NULL,
`template` varchar(4096) NOT NULL,
`description` varchar(2048) DEFAULT NULL,
`lastSyncDate` ti... |
CREATE TABLE [dbo].[Reports] (
[Id] BIGINT IDENTITY (1, 1) NOT NULL,
[EmailBody] NVARCHAR (4000) NULL,
[EmailSubject] NVARCHAR (400) NULL,
[FromDate] DATE NOT NULL,
[FromEmail] NVARCHAR (200) NULL,
[FromFullName] NVARCHAR (200) NULL,
... |
<reponame>rciam/rciam-service-registry
UPDATE service_petition_details SET service_description=${service_description},service_name=${service_name},logo_uri=${logo_uri},integration_environment=${integration_environment},protocol=${protocol},type=${type},comment=null,country=${country},website_url=${website_url},aup_uri=... |
<filename>cmslitemetadata_to_redshift/ddl/test.cmslite_test.sql
CREATE SCHEMA IF NOT EXISTS test;
CREATE TABLE IF NOT EXISTS test.microservice_log (
"starttime" TIMESTAMP WITHOUT TIME ZONE ENCODE LZO,
"endtime" TIMESTAMP WITHOUT TIME ZONE ENCODE LZO
)
DISTSTYLE AUTO;
-- DICTIONARY TABLES
CREATE TABLE IF ... |
-- We need to rewrite all continuous aggregates to make sure that the
-- queries do not contain qualification. They will be re-written in
-- the post-update script as well, but the previous version does not
-- process all continuous aggregates, leaving some with qualification
-- for the standard functions. To make this... |
<gh_stars>10-100
-- Fixed repull functionality for incremental refresh functions. For serial-based replication, using the p_repull_start & p_repull_end arguments was not working correctly. The destination data was not being deleted and could either cause unique key violations or duplicate data. Run the validate_rowcoun... |
Alter TABLE Forum_Categories
ADD FOREIGN KEY (CatTitle)
REFERENCES Forum(ForumCatTitle) |
--@Autor(es): <NAME>
--@Fecha creación: 19/02/2020
--@Descripción: Script de creación de base local para pruebas
--del proyecto.
--Se ejecuta con \i
create user magestic with encrypted password 'password';
create database magestic with owner magestic encoding UTF8;
grant all privileges on database magestic to magestic;... |
DROP DATABASE IF EXISTS example;
CREATE DATABASE example;
USE example;
CREATE TABLE guest (
id INT(2) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
firstname VARCHAR(32) NOT NULL,
lastname VARCHAR(32) NOT NULL,
email VARCHAR(64),
registration_date TIMESTAMP
);
INSERT INTO guest (firstname, lastname, email, r... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 12, 2021 at 08:04 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<reponame>MuhammadHamza14-SE-58/DrivestarrAdminPanel<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 12, 2019 at 12:53 PM
-- Server version: 5.7.9
-- PHP Version: 7.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!4... |
DROP TABLE Species;
DROP TABLE Animals;
DROP TABLE Likes;
CREATE TABLE Likes (
Id int IDENTITY (1,1) PRIMARY KEY,
Name VARCHAR (100) not NULL
);
CREATE TABLE Species (
Id int IDENTITY (1,1) PRIMARY KEY,
Name VARCHAR (100) not NULL
);
Create TABLE Cats (
Id int IDENTITY (1,1) PRI... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 30, 2021 at 09:37 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.3.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
USE [Antero]
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dw].[v_amos_rahoitus_kriteerit]'))
EXEC dbo.sp_executesql @statement = N'
CREATE VIEW [dw].[v_amos_rahoitus_kriteerit]
AS
SELECT CASE WHEN l.uusi_ytunnus IS NULL THEN r.ytunnus ELSE l.uusi_ytunnus END AS ytunnus, l.poistuva_ytu... |
-- file:alter_table.sql ln:120 expect:true
ALTER TABLE tmp ADD COLUMN t box
|
<reponame>chengwenxin/sqlite-parser<gh_stars>100-1000
-- original: fts4docid.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
CREATE VIRTUAL TABLE t1 USING fts4
;INSERT INTO t1(docid, content) VALUES(sub_docid, sub_content)
;SELECT docid FROM t1 WHERE docid = 5
;SELECT docid FROM t1 WHERE docid = '5... |
DROP VIEW detail_occurrences;
CREATE OR REPLACE VIEW detail_occurrences AS
SELECT o.id, o.confidential, o.comment, o.taxa_taxon_list_id, o.determiner_id, t.taxon, s.entered_sref, s.entered_sref_system,
s.geom, s.location_name, s.survey_id, s.date_start, s.date_end, s.date_type,
s.location_id, l.name AS location, ... |
<filename>modules/t/test-genome-DBs/homo_sapiens/core/xref.sql
CREATE TABLE `xref` (
`xref_id` int(10) unsigned NOT NULL auto_increment,
`external_db_id` int(11) NOT NULL default '0',
`dbprimary_acc` varchar(40) collate latin1_bin NOT NULL default '',
`display_label` varchar(128) collate latin1_bin NOT NULL def... |
/*
SQLyog Ultimate v12.09 (64 bit)
MySQL - 8.0.12 : Database - book
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@... |
--BUG FIX: SENTRY-500 CDH-22637
ALTER TABLE "SENTRY_DB_PRIVILEGE" ALTER COLUMN "DB_NAME" SET DEFAULT '__NULL__';
AlTER TABLE "SENTRY_DB_PRIVILEGE" ALTER COLUMN "TABLE_NAME" SET DEFAULT '__NULL__';
ALTER TABLE "SENTRY_DB_PRIVILEGE" ALTER COLUMN "URI" SET DEFAULT '__NULL__';
UPDATE "SENTRY_DB_PRIVILEGE" SET "DB_NAME" = ... |
<filename>liquibase-core/src/test/java/liquibase/verify/saved_state/compareGeneratedSqlWithExpectedSqlForMinimalChangesets/dropForeignKeyConstraint/oracle.sql
-- Database: oracle
-- Change Parameter: baseTableName=person
-- Change Parameter: constraintName=fk_address_person
ALTER TABLE person DROP CONSTRAINT fk_address... |
-- phpMyAdmin SQL Dump
-- version 3.3.7
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 24, 2012 at 01:10 PM
-- Server version: 5.1.50
-- PHP Version: 5.3.10
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_... |
<filename>openGaussBase/testcase/KEYWORDS/specific/Opengauss_Function_Keyword_Specific_Case0032.sql
-- @testpoint:opengauss关键字specific(非保留),作为用户名
--关键字explain作为用户名不带引号,创建成功
drop user if exists specific;
CREATE USER specific PASSWORD '<PASSWORD>';
drop user specific;
--关键字explain作为用户名加双引号,创建成功
drop user if exists "sp... |
--Add into COUNTRY
INSERT INTO Country VALUES('USA', 'United States');
INSERT INTO Country VALUES ('GB', 'Great Brittain');
INSERT INTO Country VALUES ('AUS', 'Australia');
INSERT INTO Country VALUES ('CHI', 'China');
INSERT INTO Country VALUES ('SA', 'South Africa');
INSERT INTO Country VALUES ('BRZ', 'Braz... |
<reponame>Sufian20/RestaurntApp<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 03, 2021 at 09:02 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.3.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:... |
DROP TABLE IF EXISTS CFG_CODETYPE;
CREATE TABLE CFG_CODETYPE (
codeId varchar(32) NOT NULL COMMENT '代碼ID',
codeCat varchar(32) NOT NULL COMMENT '代碼種類',
codeValue varchar(300) NULL COMMENT '代碼對應之內容描述',
updateUser varchar(10) NULL COMMENT '最後修改人',
updateTime datetime NULL COMMENT '最後修改時間',
... |
-- MySQL dump 10.13 Distrib 5.1.73, for redhat-linux-gnu (x86_64)
/*!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_Z... |
<reponame>tcartwright/SqlServer.ExecutionPlan.Analysis<filename>SqlServer.Analysis.Clr/Drop Assembly.sql
IF OBJECT_ID('[dbo].[xfnCheckPlanXml]') IS NOT NULL BEGIN
DROP FUNCTION [dbo].[xfnCheckPlanXml]
END
IF OBJECT_ID('[dbo].[xfnComputeHash]') IS NOT NULL BEGIN
DROP FUNCTION [dbo].[xfnComputeHash]
END
IF EXISTS(... |
SELECT
endow_amt,
(SELECT bank FROM schoolnew_bank WHERE schoolnew_bank.id = endow_bank_id) AS endow_bank_id,
DATE_FORMAT(endow_date_deposit, '%d/%m/%Y') AS endow_date_deposit,
DATE_FORMAT(endow_date_maturity, '%d/%m/%Y') AS endow_date_maturity,
endow_certif,
corp_amt,
(SELECT bank FROM sch... |
<reponame>bfunky86/SquasherJava<filename>squashRDB.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 09, 2020 at 01:47 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_... |
begin
dbms_scheduler.create_job (
job_name => 'JOB_MERGE_APPALARM',
job_type => 'PLSQL_BLOCK',
job_action => 'begin proc_merge_appalarm; end;',
repeat_interval => 'FREQ=DAILY; BYHOUR=4; BYMINUTE=10',
enabled => true
);
end;
/
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.