sql stringlengths 6 1.05M |
|---|
<reponame>giangnh92/inbox-server
SET @preparedStatement = (SELECT IF(
(
SELECT COUNT(*) FROM INFORMATION_SCHEMA.STATISTICS
WHERE table_name = 'UserGroups'
AND table_schema = DATABASE()
AND index_name = 'idx_usergroups_displayname'
) > 0,
'DROP INDEX idx_usergroups_displayname... |
<reponame>simranjeetc/job-service<gh_stars>1-10
--
-- Copyright 2016-2021 Micro Focus or one of its affiliates.
--
-- 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.apach... |
/* Cache tables update */
ALTER TABLE `cot_cache` MODIFY `c_auto` tinyint(1) NOT NULL default '1';
ALTER TABLE `cot_cache_bindings` ADD COLUMN `c_type` TINYINT NOT NULL DEFAULT '0'; |
--+ holdcas on;
set system parameters 'ansi_quotes=no';
create table "t1";
create table a (a varchar(10));
insert into a values ("abcd");
select * from a where a="abcd";
drop table a;
set system parameters 'ansi_quotes=yes';commit;
--+ holdcas off;
|
<reponame>Lewis-Allen/RTDPTIcache
CREATE TABLE `naptan` (
`SMS` text,
`LongDescription` text,
`Active` text,
`SystemCodeNumber` varchar(20) NOT NULL,
`Easting` text,
`Lat` text,
`Lng` text,
`Identifier` text,
`Northing` text,
`Retrieve` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`SystemCodeNumb... |
-- Just change the name of the subreddit you want to fetch data from
(SELECT body,author,link_id,parent_id,id,subreddit,score
FROM `fh-bigquery.reddit_comments.2018_08`
WHERE subreddit = 'AskReddit'
AND score >=
)
UNION DISTINCT
(SELECT body,author,link_id,parent_id,id,subreddit,score
FROM `fh-bigquery.reddit_comment... |
CREATE PROC [dbo].[DBConfiguration_Get](
@InstanceIDs VARCHAR(MAX)=NULL,
@ConfiguredOnly BIT=0,
@DatabaseID INT=NULL
)
AS
DECLARE @Instances TABLE(
InstanceID INT PRIMARY KEY
)
IF @InstanceIDs IS NULL
BEGIN
INSERT INTO @Instances
(
InstanceID
)
SELECT InstanceID
FROM dbo.Instances
WHERE IsActive=1
END... |
-- auto-generated definition
create table jobs
(
id serial not null,
guid varchar(128) not null
constraint jobs_pk
primary key,
preset varchar(128) not null,
created_date timestamp default CURRENT_TIMESTAMP,
status varchar(64),
source varchar(128),
destin... |
<filename>labs/q3.sql<gh_stars>0
SELECT fname, phone
FROM t1
WHERE REGEXP_LIKE (phone, '[0-9]{3}\.[0-9]{2}\.[0-9]{4}\.[0-9]{6}')
/
|
<reponame>jameswilddev/neurofoam<gh_stars>0
-- Up
CREATE TABLE bubbles (
bubbleUuid UUID PRIMARY KEY NOT NULL,
currentStateJson TEXT NOT NULL,
latestEventUuid UUID NULL
);
CREATE TABLE events (
eventUuid UUID PRIMARY KEY NOT NULL,
previousEventUuid UUID NULL,
bubbleUuid UUID NOT NULL,
sessionUuid UUID NO... |
<gh_stars>1-10
SELECT
cab_type_id
,vendor_id
,lpep_pickup_datetime AS pickup_datetime
,lpep_dropoff_datetime AS dropoff_datetime
,store_and_fwd_flag
,rate_code_id
,pickup_longitude
,pickup_latitude
,dropoff_longitude
,dropoff_latitude
,passenger_count
,trip_distance
,fare_amount
,extra
,m... |
<gh_stars>1-10
CREATE TABLE BB_YOUTUBE_POSTED_VIDEOS
(
VIDEO_ID varchar(100) PRIMARY KEY NOT NULL,
POSTED_DATE DATE NOT NULL
); |
-- func.test
--
-- execsql {SELECT rtrim('xyxzy hi zzzy','xyz');}
SELECT rtrim('xyxzy hi zzzy','xyz'); |
<gh_stars>0
-- RI indexes
create index attachments_item_id_idx ON attachments(item_id);
create index attachments_fsr_fm_folder_id_i ON attachments_fs_root_folder_map(folder_id);
|
<gh_stars>0
if exists (select * from dbo.sysobjects where id = object_id(N'palabras') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table palabras
GO
if exists (select * from dbo.sysobjects where id = object_id(N'user_permissions') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table user_permissions
GO
if exist... |
INSERT INTO EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) VALUES
(7369,'SMITH','CLERK',7902,TO_DATE('1980-12-17 00:00:00','YYYY-MM-DD HH24:MI:SS'),800,NULL,20)
,(7499,'ALLEN','SALESMAN',7698,TO_DATE('1981-02-20 00:00:00','YYYY-MM-DD HH24:MI:SS'),1600,300,30)
,(7521,'WARD','SALESMAN',7698,TO_DATE('1981-02-22 0... |
/**
* <feature scope="SanteDB.Persistence.Data.ADO" id="0-004" name="Data Initialization" invariantName="FirebirdSQL">
* <summary>Install Core Data</summary>
* <remarks>Initializes the SanteDB database with default usernames, passwords, and applications</remarks>
* <isInstalled>SELECT COUNT(1) = 1 FROM SEC_USR_TB... |
/********************************************************************************
Copyright (C) MixERP Inc. (http://mixof.org).
This file is part of MixERP.
MixERP 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 Foundat... |
ALTER TYPE mst.invoice_event_type ADD VALUE 'INVOICE_PAYMENT_CHARGEBACK_CREATED';
ALTER TYPE mst.invoice_event_type ADD VALUE 'INVOICE_PAYMENT_CHARGEBACK_STATUS_CHANGED';
ALTER TYPE mst.invoice_event_type ADD VALUE 'INVOICE_PAYMENT_CHARGEBACK_BODY_CHANGED';
ALTER TYPE mst.invoice_event_type ADD VALUE 'INVOICE_PAYMEN... |
/*CCAE Sprint 6 Test Cases Table 15 Observation*/
/*Patients must be entered in the enrollment details table first so we know that they have valid observation periods. Otherwise
they will be dropped if the builder does not see that they have prescription benefits and their observations will not come through*/
/*1501*... |
CREATE SCHEMA IF NOT EXISTS ${dbName};
USE ${dbName};
/*
Create table to store membership relationships
*/
CREATE TABLE membership (
user_id CHAR(36) NOT NULL,
group_id CHAR(36) NOT NULL,
PRIMARY KEY (user_id, group_id)
);
|
<reponame>mig5/hydra
DROP INDEX hydra_oauth2_access_request_id_idx;
DROP INDEX hydra_oauth2_refresh_request_id_idx;
CREATE INDEX hydra_oauth2_access_request_id_idx ON hydra_oauth2_access (request_id);
CREATE INDEX hydra_oauth2_refresh_request_id_idx ON hydra_oauth2_refresh (request_id);
CREATE INDEX hydra_oauth2_code... |
CREATE INDEX CONCURRENTLY i_foo_baz ON foo.foo (baz);
INSERT INTO ops (op) VALUES ('migration V0003__NONTRANSACTIONAL_Add_index_on_baz_column.sql');
|
<filename>sql/_13_issues/_12_2h/cases/bug_bts_7297.sql<gh_stars>1-10
--TEST: [Analytic Functions] Error occurs when row_number() function with an order_by_clause is selected in a subquery.
drop table if exists foo;
create table foo(a int primary key, b int, c smallint);
insert into foo values(1, 2, 5);
insert into f... |
CREATE TABLE [dbo].[FeatureToggle]
(
[Id] INT NOT NULL IDENTITY,
[ServiceName] NVARCHAR(256) NOT NULL,
[UserName] NVARCHAR(20) NOT NULL,
[MachineName] NVARCHAR(15) NOT NULL,
[Feature] NVARCHAR(256) NOT NULL,
[Priority] INT NOT NULL,
[Enabled] BIT NOT NULL,
CONSTRAINT [PK_FeatureT... |
CREATE TABLE IF NOT EXISTS `garage` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`name` TEXT NOT NULL,
`address` TEXT NOT NULL,
`date_created` DATETIME NOT NULL,
`max_capacity` INTEGER NOT NULL
);
CREATE TABLE IF NOT EXISTS `car` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`registration` TE... |
<reponame>ShubhenduGoel/Bulletin-Board
-- MySQL dump 10.13 Distrib 5.7.29, for Linux (x86_64)
--
-- Host: localhost Database: shubhendu
-- ------------------------------------------------------
-- Server version 5.7.29-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET ... |
-- timestamp-types.sql
-- <NAME>
-- <EMAIL>
/*
--to see the types from a table
drop table timestamp_test purge;
create table timestamp_test( t1 timestamp);
insert into timestamp_test values(systimestamp);
commit;
set linesize 90
select
dump(systimestamp)
, dump(t1)
, dump(cast(trunc(t1) as timestamp))
... |
<reponame>Shadowbomb/PlantHawaii<gh_stars>1-10
-----------------------------------------------------------------------------
DROP FUNCTION FUNCTION_ORDER_ID;
-----------------------------------------------------------------------------
DROP FUNCTION FUNCTION_COMMON_NAME_ID;
-----------------------------------------... |
<filename>src/sql/migrations/20161007153817_createMemoryTableIndexes.sql
/* Create Memory Table Indexes
*
*/
BEGIN;
CREATE INDEX IF NOT EXISTS "mem_round_address"
ON "mem_round" ("address");
CREATE INDEX IF NOT EXISTS "mem_round_round"
ON "mem_round" ("round");
CREATE INDEX IF NOT EXISTS "mem_accounts2delegat... |
<reponame>Eurekode/ScriptStash.Net<gh_stars>1-10
SELECT [CSV_FIELDS]
FROM USERS
WHERE [USERS_CONDITION] |
<filename>Securing SQL Server/Demos/SecuringSQLServer/SecuringSQLServer/Demo_TrustworthyDb_Good.sql
use [master];
GO
--// Create sample databases to use for demo
--// Set Trustworthy ON for sample database
create database TrustedDB02;
go
alter database TrustedDB02
set trustworthy on
;
go
--// Create a login that wil... |
-- file:cluster.sql ln:60 expect:true
INSERT INTO clstr_tst (b, c, d) VALUES (6, 'seis', repeat('xyzzy', 100000))
|
USE AdventureWorks2012;
GO
WITH DirectReports(Name, Title, EmployeeID, EmployeeLevel, Sort)
AS (SELECT CONVERT(varchar(255), e.FirstName + ' ' + e.LastName),
e.Title,
e.EmployeeID,
1,
CONVERT(varchar(255), e.FirstName + ' ' + e.LastName)
FROM dbo.MyEmployees AS e
... |
<gh_stars>0
insert into COEUS_SUB_MODULE (COEUS_SUB_MODULE_ID , MODULE_CODE , SUB_MODULE_CODE , DESCRIPTION, UPDATE_TIMESTAMP ,UPDATE_USER, VER_NBR, OBJ_ID) values
( 1,3,1,'Proposal Budget',SYSDATE, 'admin',1,SYS_GUID());
insert into COEUS_SUB_MODULE (COEUS_SUB_MODULE_ID , MODULE_CODE , SUB_MODULE_CODE , DES... |
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/current_mysql/5.1.0/tables/KC_TBL_CUST_RPT_TYPE_DOCUMENT.sql
DELIMITER /
CREATE TABLE CUST_RPT_TYPE_DOCUMENT (
REPORT_TYPE_CODE INT NOT NULL,
DOCUMENT_NAME VARCHAR(100) NOT NULL,
UPDATE_USER VARCHAR(60) NOT NULL,
UPDATE_TIMESTA... |
<filename>EdFi.Ods.Utilities.Migration/Scripts/MsSql/02Upgrade/v25_to_v31/11 Create Constraints/42110 StaffVisa [PK, IX, D].sql<gh_stars>0
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Vers... |
library "Test" version '1.0.0'
using "FHIR" version '4.0.0'
include "FHIRHelpers" version '4.0.0'
valueset "TestExists": 'https://cts.nlm.nih.gov/fhir/ValueSet/1.2.3.4'
valueset "TestNotExists": 'https://cts.nlm.nih.gov/fhir/ValueSet/5.6.7.8'
context Patient
define RHSRetrieveMatches:
exists([Condition: TestExists... |
<reponame>JaNickel/course-dbt-tony<filename>dbt-greenery/models/example/event_type_aggregate.sql
{{
config(
materialized='table'
)
}}
SELECT
event_type,
count(1)
FROM {{ ref('stg_events') }}
group by event_type
|
<reponame>lintzc/GPDB
-- @Description Ensures that alter table during reindex operations is ok
--
DELETE FROM reindex_alter_heap_bitmap WHERE a < 128;
1: BEGIN;
2: BEGIN;
1: REINDEX INDEX idx_reindex_alter_heap_bitmap;
2&: ALTER TABLE reindex_alter_heap_bitmap drop COLUMN j;
1: COMMIT;
2<:
2: COMMIT;
3: INSERT INTO r... |
<gh_stars>0
------------------------------
-- Archivo de base de datos --
------------------------------
DROP TABLE IF EXISTS propietarios CASCADE;
CREATE TABLE propietarios
(
id bigserial PRIMARY KEY
, nombre varchar(255) NOT NULL
, apellido varchar(255) NOT NULL
, dni varchar(9) ... |
-- The data is loaded into the DB from monthly (zipped) CSV files; this will
-- list the number of flight records in each one of these files
SELECT year_,month_, COUNT(*) AS num_records_in_month_file FROM ontime GROUP BY year_,month_ ORDER BY year_ ASC, month_ ASC;
|
<filename>sql/_30_banana_pie_qa/issue_20567_keylimit/cases/group_by.sql
drop if exists tab;
CREATE TABLE tab (i INT, j INT, k INT);
CREATE INDEX i_tab_j_k ON tab (j, k);
INSERT INTO tab VALUES (1,2,3),(6,4,2),(3,4,1),(5,2,1),(1,5,5),(2,6,6),(3,5,4);
UPDATE STATISTICS on tab;
SELECT j,k
FROM tab
WHERE j > 0
GROUP BY j,k... |
<filename>src/test/regress/sql/merge_compatible.sql
--
-- MERGE INTO: test compatiblity
--
-- initial
CREATE SCHEMA mergeinto_compatible;
SET current_schema = mergeinto_compatible;
--The following example uses the bonuses table in the sample schema oe with a default bonus of 100.
--It then inserts into the bonuses t... |
<reponame>ryanleahy22/pewlett_hackard_analysis<filename>queries/Employee_Database_challenge.sql
SELECT DISTINCT ON (______) _____,
______,
______,
______
INTO nameyourtable
FROM _______
WHERE _______
ORDER BY _____, _____ DESC;
SELECT DISTINCT ON (______) _____,
______,
______,
______
INTO nameyourtable
FROM _______... |
<reponame>luanyata/Nestjs-Prisma-User-Case
-- CreateTable
CREATE TABLE "Post" (
"id" TEXT NOT NULL,
"title" TEXT NOT NULL,
"content" TEXT,
"publish" BOOLEAN NOT NULL DEFAULT false,
"authorId" TEXT NOT NULL,
CONSTRAINT "Post_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "Post" ADD CO... |
<filename>dbscript.sql
SET @@global.time_zone = '+00:00';
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`user_pk` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(45) NOT NULL,
`password` varchar(45) NOT NULL,
PRIMARY KEY (`user_pk`),
UNIQUE KEY `user_pk_UNIQUE` (`user_pk`),
UNIQUE KEY `username_UN... |
<filename>db/schema.sql
CREATE DATABASE new_burger_db;
USE new_burger_db;
CREATE TABLE burger
(
id int NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL,
devoured BOOLEAN DEFAULT false,
PRIMARY KEY (id)
);
INSERT INTO burger (name) VALUES ('Chili', true);
INSERT INTO burger (name) VALUES ('Jalapeno', true);
IN... |
CREATE PROCEDURE procfwk_GetPropertyValueInternal.[test WHEN property name does not exist THEN empty string returned]
AS
-- ARRANGE
DECLARE @propertyName NVARCHAR(128) = 'TestProperty'
EXEC tSQLt.FakeTable 'procfwk.CurrentProperties'
DECLARE @expected NVARCHAR(4000) = ''
-- ACT
DECLARE @actual NVARCHAR(4000) = pro... |
<gh_stars>0
---------------------------------------------------------------
-- view: vw_opendata_transits_summary
---------------------------------------------------------------
-- drop view vw_opendata_transits_summary;
create or replace view vw_opendata_transits_summary as
select
ip.field_5 as item_type,
t.f... |
<gh_stars>0
INSERT INTO `list_product` (`id`, `all_familly`, `all_type`, `all_categorie`, `created_at`, `updated_at`) VALUES
(1, '[\"ACIDE\",\"AMBOUT\",\"AMPOULE\",\"AMPOULE\",\"AMPOULE\",\"AMPOULE\",\"AMPOULE\",\"AMPOULE\",\"AMPOULE\",\"AMPOULE\",\"AMPOULE\",\"AMPOULE\",\"AMPOULE\",\"AMPOULE\",\"AMPOULE\",\"AMPOULE\"... |
SELECT m.ModelId,
m.Name,
CAST(AVG(DATEDIFF(DAY, j.IssueDate, j.FinishDate)) AS VARCHAR(10)) + ' days' AS [Average Service Time]
FROM Models AS m
JOIN Jobs AS j ON j.ModelId = m.ModelId
GROUP BY m.ModelId, m.Name
ORDER BY AVG(DATEDIFF(DAY, j.IssueDate, j.FinishDate)) |
<filename>modules/example/models/indexes/example.indexes.sql
CREATE UNIQUE INDEX IF NOT EXISTS ux_example_name
ON public.example(lower(name));
CREATE UNIQUE INDEX IF NOT EXISTS ux_example_image
ON public.example(image);
|
<filename>MS SQL SERVER/Triggers And Transaction/Triggers And Transaction/2.CreateTableEmails.sql
CREATE TABLE NotificationEmails
(
Id INT PRIMARY KEY IDENTITY NOT NULL,
Recipient INT NOT NULL,
[Subject] VARCHAR(MAX),
Body VARCHAR(MAX)
)
CREATE TRIGGER tr_InsertNewRecord
ON Logs FOR INSERT
AS
DECLARE @accountId INT =... |
<filename>ifs-data-layer/ifs-data-service/src/main/resources/db/migration/V163_1_3__covid_comp_type.sql
ALTER TABLE competition ADD covid_type enum('DE_MINIMIS', 'ADDITIONAL_FUNDING', 'DE_MINIMIS_ROUND_2')
|
-- file:plpgsql.sql ln:4083 expect:true
select unreserved_test()
|
CREATE TABLE `pseudoYale60` (
`bin` smallint(5) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`chrom` varchar(255) NOT NULL,
`strand` char(1) NOT NULL,
`txStart` int(10) unsigned NOT NULL,
`txEnd` int(10) unsigned NOT NULL,
`cdsStart` int(10) unsigned NOT NULL,
`cdsEnd` int(10) unsigned NOT NULL,
`... |
<reponame>Gigelf-evo-X/evo-X<gh_stars>1-10
UPDATE creature_template SET ScriptName='npc_loklira_the_crone' WHERE entry=29975;
|
<filename>fake-pab/fake-pab.sql
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET clie... |
<filename>migrations/sqlsrv.sql
CREATE TABLE IF NOT EXISTS %table_name% (
id int IDENTITY(1,1),
ptype varchar(255) NOT NULL,
v0 varchar(255) DEFAULT NULL,
v1 varchar(255) DEFAULT NULL,
v2 varchar(255) DEFAULT NULL,
v3 varchar(255) DEFAULT NULL,
v4 varchar(255) DEFAULT NULL,
v5 varchar(255) DEFAULT NULL
... |
select name, type, arn, cluster_name
from aws.aws_eks_identity_provider_config
where name = '{{ resourceName }}';
|
<reponame>featherfly/common<gh_stars>0
SET FOREIGN_KEY_CHECKS=0;
--@include executor1.sql;
--@include executor2.sql;
SET FOREIGN_KEY_CHECKS=1; |
<reponame>opengauss-mirror/Yat
-- @testpoint:opengauss关键字temporary(非保留),作为模式名
--关键字不带引号-成功
drop schema if exists temporary;
create schema temporary;
drop schema temporary;
--关键字带双引号-成功
drop schema if exists "temporary";
create schema "temporary";
drop schema "temporary";
--关键字带单引号-合理报错
drop schema if exists 'tempo... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 13 Mar 2020 pada 05.12
-- Versi server: 10.1.36-MariaDB
-- Versi PHP: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4010... |
<reponame>eveisesi/athena<gh_stars>0
CREATE TABLE `map_structures` (
`id` BIGINT UNSIGNED NOT NULL,
`name` VARCHAR(255) NOT NULL,
`solar_system_id` INT UNSIGNED NOT NULL,
`type_id` INT UNSIGNED NOT NULL,
`owner_id` INT UNSIGNED NOT NULL,
`created_at` TIMESTAMP NOT NULL,
`updated_at` TIMESTAM... |
<filename>api/db/migrations/20210423015836_add_make_to_dealership/migration.sql
-- AlterTable
ALTER TABLE "Make" ADD COLUMN "dealershipId" INTEGER;
-- AddForeignKey
ALTER TABLE "Make" ADD FOREIGN KEY ("dealershipId") REFERENCES "Dealership"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 13, 2020 at 08:53 AM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 10, 2018 at 12:44 PM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.6.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... |
<filename>application/config/nce.sql
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50538
Source Host : localhost:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50538
File Encoding : 65001
Date: 2016-06-16 17:29:15
*... |
CREATE TABLE towns
(
id INT AUTO_INCREMENT NOT NULL,
name VARCHAR(50),
CONSTRAINT pk_towns PRIMARY KEY (id)
);
CREATE TABLE addresses
(
id INT AUTO_INCREMENT NOT NULL,
address_text TEXT,
town_id INT NOT NULL,
CONSTRAINT pk_addresses PRIMARY KEY (id),
CONSTRAINT fk_town_id FOREIGN KE... |
<filename>zenrolle.sql
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 06, 2020 at 07:58 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:... |
ALTER TABLE "public"."producer" ADD COLUMN "virtual_block_cpu_limit" integer NULL;
|
<reponame>aravindc/diaapp<gh_stars>0
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET c... |
--update contextroot for adtax module
update eg_module set contextroot ='adtax' where name='Advertisement Tax' and parentmodule is null;
--add new sub modules for adtax masters
INSERT INTO EG_MODULE (ID,NAME,ENABLED,CONTEXTROOT,PARENTMODULE,DISPLAYNAME,ORDERNUMBER) VALUES (NEXTVAL('SEQ_EG_MODULE'),'Advertisement Tax A... |
insert into egf_chartofaccountdetail (id, chartofaccountid, accountdetailtypeid, createdby, createddate, lastmodifiedby, lastmodifieddate, version, tenantid) values('1', '1', '1', '1', 'now()','1', 'now()', '1', 'default');
insert into egf_chartofaccountdetail (id, chartofaccountid, accountdetailtypeid, createdby, crea... |
/* Definition for the GET_MESSAGES_HEADER procedure : */
------------------------------------------------------------------------------
-- Create date: 2020-07-26
-- Autor: <NAME>
--
-- Description:
-- Get the header of the message.
--
-- Parameters:
-- ID_MESSAGE - The id of message.
--
-- Returns:
-- The header of... |
<gh_stars>10-100
-- file:xml.sql ln:270 expect:true
SELECT xml_is_well_formed('<foo><bar>baz</foo>')
|
-- file:comments.sql ln:7 expect:true
SELECT /* both embedded and trailing single line */ 'both' AS third
|
CREATE PROC dbo.MemoryDumpThresholds_Get(
@MemoryDumpWarningThresholdHrs INT=NULL OUT,
@MemoryDumpCriticalThresholdHrs INT=NULL OUT,
@MemoryDumpAckDate DATETIME=NULL OUT
)
AS
SELECT @MemoryDumpWarningThresholdHrs = CONVERT(INT,SettingValue)
FROM dbo.Settings
WHERE SettingName = 'MemoryDumpWarningThresholdHrs';
SE... |
<gh_stars>10-100
insert into donations (donor, donee, amount, donation_date,
donation_date_precision, donation_date_basis, cause_area, url,
donor_cause_area_url, notes) values
('Arch Community Fund', 'Bay Resistance', 25000, '2018-05-16', 'day', 'date of donation announcement', 'Grassroots activism', 'http://... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.4.13
-- Dumped by pg_dump version 9.5.7
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
-- SET row_security = o... |
DROP SEQUENCE seq_k_webbeacons;
ALTER TABLE k_workareas DROP CONSTRAINT f1_workareas;
ALTER TABLE k_x_group_user DROP CONSTRAINT f1_x_group_user;
ALTER TABLE k_x_group_user DROP CONSTRAINT f2_x_group_user;
ALTER TABLE k_acl_groups DROP CONSTRAINT f2_acl_groups;
ALTER TABLE k_users DROP CONSTRAINT f2_users;... |
<gh_stars>0
-- sqlitecaching delete table
DROP TABLE "aa_bb";
|
<filename>inst/sql/sql_server/create_pruned_tables.sql
-- we prune the vocabulary tables
create table @vocab_schema.concept with (distribution = round_robin) as select * from @vocab_schema.concept_orig where concept_id in (@event_concept_id);
create table @vocab_schema.concept_ancestor with (distribution = round_robin)... |
<filename>superfly-sql/src/ui_get/ui_get_unmapped_role_actions_list_count.prc
drop procedure if exists ui_get_unmapped_role_actions_list_count;
delimiter $$
create procedure ui_get_unmapped_role_actions_list_count(i_role_id int(10),
i_action_name varchar(100)
... |
<gh_stars>1-10
CREATE SEQUENCE IF NOT EXISTS ${myuniversity}_${mymodule}.po_number MAXVALUE 9999999999999999 START WITH 10000 CACHE 1 NO CYCLE;
GRANT USAGE ON SEQUENCE ${myuniversity}_${mymodule}.po_number TO ${myuniversity}_${mymodule};
CREATE UNIQUE INDEX IF NOT EXISTS purchase_order_po_number_unique_idx ON ${myuni... |
/****** Object: StoredProcedure [dbo].[UpdateStepStates] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[UpdateStepStates]
/****************************************************
**
** Desc:
** Determine which steps will be enabled or skipped based
** upon complet... |
-- All patient attributes required
INSERT INTO person_attribute_type (name, description, format, searchable, creator, date_created, retired, sort_weight, uuid) VALUES ('caste', 'Caste', 'java.lang.String', '1', 1, curdate(), 0, 2, uuid());
INSERT INTO person_attribute_type (name, description, format, searchable, creato... |
<filename>sql/2020/accessibility/shortcut_keys.sql
#standardSQL
# Most popular accesskey or aria-keyshortcuts keys
CREATE TEMPORARY FUNCTION getShortcuts(payload STRING)
RETURNS ARRAY<STRUCT<type STRING, shortcut STRING>> LANGUAGE js AS '''
try {
const almanac = JSON.parse(payload);
const collector = [];
functio... |
<reponame>pdv-ru/ClickHouse
select arrayResize([1, 2, 3], 10);
select arrayResize([1, 2, 3], -10);
select arrayResize([1, Null, 3], 10);
select arrayResize([1, Null, 3], -10);
select arrayResize([1, 2, 3, 4, 5, 6], 3);
select arrayResize([1, 2, 3, 4, 5, 6], -3);
select arrayResize([1, 2, 3], 5, 42);
select arrayResize(... |
<filename>basic.sql
/*
Navicat Premium Data Transfer
Source Server : Local
Source Server Type : MySQL
Source Server Version : 50715
Source Host : localhost
Source Database : basic
Target Server Type : MySQL
Target Server Version : 50715
File Encoding : utf-8
Date: 11/1... |
-- CREATE TABLE "groups" ---------------------------------------
CREATE TABLE `groups` (
`id` Int( 16 ) UNSIGNED AUTO_INCREMENT NOT NULL,
`teacher_id` Int( 16 ) UNSIGNED NOT NULL,
`name` VarChar( 255 ) CHARACTER SET latin1 NOT NULL,
`created_at` DateTime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` DateTime N... |
DROP TABLE IF EXISTS movie_customer_name CASCADE;
CREATE TABLE movie_customer_name(movie_id,movie_name,poster_path,rate,customer_id) as
(select c.movie_id, m.title, m.poster_path,c.rate, c.customer_id
from customer_comment_movie c, movie m
where c.movie_id=m.movie_id);
select count(*) from movie_cust... |
<reponame>getCurrentThread/DamBi-EcoBusService<filename>database/createDB.sql
drop database if exists ecoBusMileSystem;
create database ecoBusMileSystem
default character set utf8
default collate utf8_general_ci;
use ecoBusMileSystem;
-- ebm_user Table Create SQL
CREATE TABLE ebm_user
(
`uidx` INT NOT ... |
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 10, 2021 at 05:25 PM
-- Server version: 5.7.33
-- PHP Version: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 21, 2017 at 11:20 AM
-- Server version: 10.1.22-MariaDB
-- PHP Version: 7.1.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<gh_stars>0
/*
Warnings:
- You are about to drop the column `userId` on the `Poll` table. All the data in the column will be lost.
- A unique constraint covering the columns `[username]` on the table `Poll` will be added. If there are existing duplicate values, this will fail.
- Added the required column `user... |
<reponame>DMon777/realtimemessage<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.4.15.5
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1:3306
-- Время создания: Май 22 2018 г., 23:10
-- Версия сервера: 5.5.48
-- Версия PHP: 7.0.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... |
<reponame>lidongjie007/spring-cloud-shop
/*
Navicat Premium Data Transfer
Source Server : dev
Source Server Type : MySQL
Source Server Version : 50724
Source Host : localhost
Source Database : pager_goods
Target Server Type : MySQL
Target Server Version : 50724
File Encoding ... |
<filename>backup_db.sql
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS `users` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`username` TEXT NOT NULL UNIQUE,
`password` TEXT NOT NULL,
`admin` INTEGER DEFAULT 0
);
INSERT INTO `users` VALUES (1,'admin','<PASSWORD>',1);
INSERT INTO `users` VALUES (2,'worker1','<PA... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.