sql stringlengths 6 1.05M |
|---|
<filename>scripts/seed_db.sql
-- set search path
SET
search_path TO PUBLIC;
-- drop all rows table before insertion
DELETE FROM
"description";
DELETE FROM
"job";
-- restart sequence
ALTER SEQUENCE "job_id_seq" RESTART WITH 1;
ALTER SEQUENCE "description_id_seq" RESTART WITH 1;
-- seed job table
INSERT ... |
/************************************
* ゲーム管理テーブル
************************************/
DROP TABLE IF EXISTS `GameInfos`;
CREATE TABLE `GameInfos`
(
`GameId` INT(8) UNSIGNED AUTO_INCREMENT COMMENT 'ゲーム管理ID',
`Name` TEXT COMMENT 'ゲーム名',
`Description` TEXT COMMENT '説明',
`CreateDate` DATETIME COMMENT 'レコ... |
<reponame>andrew-wang-1998/main<gh_stars>0
/*
* Copyright (c) 2020. <NAME>
* Creation Date : 2020 - 12 - 25
*/
CREATE TABLE IF NOT EXISTS children_senior_institutes (
id INT NOT NULL AUTO_INCREMENT,
ZN_TY VARCHAR(191) NOT NULL,
SISUL_TY VARCHAR(20) NOT NULL,
SISUL_NM VARCHAR(50) NOT NULL,
RD_ADD... |
<reponame>wadmiraal/tuduapp
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE TABLE IF NOT EXISTS `todos` (
`id` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`description` text COLLATE utf8_unicode_ci NOT NULL,
`owner` varchar(255... |
<gh_stars>1-10
WITH CTE_Departmets_Category([DepartmentName], [CategoryName], [Count]) AS(
SELECT d.Name AS [DepartmentName],
c.Name AS [CategoryName],
COUNT(*) AS [Count]
FROM Reports AS r
JOIN Categories AS c
ON c.Id = r.CategoryId
JOIN Departments AS d
ON d.Id = c.DepartmentId
GROUP BY d.Name, c.Name
),
... |
INSERT INTO MB_PART_CLASS (PART_CLASS,PART_CLASS_DESC,PART_CLASS_LEVEL,PARENT_PART_CLASS) VALUES ('ACCT', '账户信息', '1', null);
INSERT INTO MB_PART_CLASS (PART_CLASS,PART_CLASS_DESC,PART_CLASS_LEVEL,PARENT_PART_CLASS) VALUES ('AGREEMENT', '协议信息', '1', null);
INSERT INTO MB_PART_CLASS (PART_CLASS,PART_CLASS_DESC,PART_CLAS... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 21 Jul 2020 pada 01.12
-- Versi Server: 5.7.30-0ubuntu0.18.04.1
-- PHP Version: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT... |
/****** Object: StoredProcedure [dbo].[sp_getNivelEffectiveReadPermissions] Script Date: 05/21/2014 11:39:37 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_getNivelEffectiveReadPermissions] (@IDTrustee BIGINT, @IDNivel BIGINT) AS
BEGIN
SET NOCOUNT ON
CREATE TABLE #effective ... |
-- Your SQL goes here
ALTER TABLE blocks DROP IF EXISTS base32_cidv1;
ALTER TABLE blocks ALTER COLUMN cidv1 SET NOT NULL;
|
SELECT
title.field_legislation_title_value as title,
summary.field_legislative_summary_value as summary,
full_text.field_full_legislative_text_value as full_text,
pdf_original.uri as pdf_original,
pdf_transcript.uri as pdf_transcript,
articles.field_number_of_articles_value as articles,
notes.field_item_n... |
DROP TABLE VoteEventOptions;
DROP TABLE Votes;
DROP TABLE VoteEvents;
|
<reponame>cuza/Erupe
BEGIN;
ALTER TABLE characters
DROP COLUMN decomyset,
DROP COLUMN hunternavi,
DROP COLUMN otomoairou,
DROP COLUMN partner,
DROP COLUMN platebox,
DROP COLUMN platedata,
DROP COLUMN platemyset,
DROP COLUMN rengokudata;
END; |
-- file:aggregates.sql ln:247 expect:true
explain (costs off)
select min(unique1) from tenk1
|
<gh_stars>10-100
-- file:xml.sql ln:187 expect:true
SELECT xpath('count(//*)=0', '<root><sub/><sub/></root>')
|
<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5494810_sys_gh4151_AddNewColumnsInI_BPartner.sql
-- 2018-05-31T01:03:56.164
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Or... |
-- phpMyAdmin SQL Dump
-- version 3.1.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 12, 2015 at 05:03 AM
-- Server version: 5.1.30
-- PHP Version: 5.2.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_S... |
--Mark duplicates in LookupItem and LookupMaster tables as deleted
;
With dups As( Select * ,row_number() Over (Partition By Name Order By Id) R From LookupItem)
Update I
Set DeleteFlag = 1
,Name = I.Name + '(deleted duplicate:' + cast(R - 1 As varchar(3)) + ' original:' +
cast((Select Top 1 Id From dups x Where R... |
CREATE OR REPLACE FUNCTION get_bunching (start date, term interval)
RETURNS TABLE(
route_id text,
direction_id int,
stop_id text,
weekend int,
period int,
count int,
bunch_count int
)
AS $$
SELECT
route_id,
direction_id,
sto... |
<gh_stars>1-10
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50726
Source Host : localhost:3306
Source Schema : mayi
Target Server Type : MySQL
Target Server Version : 50726
File Encoding : 65001
Date: 0... |
DROP TABLE IF EXISTS CUSTOMERS;
CREATE TABLE CUSTOMERS (id INTEGER PRIMARY KEY, firstName VARCHAR(255), lastName VARCHAR(255), email VARCHAR(255), address VARCHAR(255));
COPY CUSTOMERS FROM '/tmp/table.customers' DELIMITER '|';
|
<filename>src/modules/auth/model/queries/insert-user.sql
INSERT INTO `users` (
`name`,
`nameHash`,
`password`,
`createdAt`,
`updatedAt`
) VALUES (?, ?, ?, ?, ?)
|
CREATE OR REPLACE FUNCTION upsert_validators(_vals BYTEA[])
RETURNS TABLE (v_id integer, v_public_key BYTEA) AS
$$
BEGIN
RETURN QUERY
WITH
all_rows AS (
SELECT *
FROM UNNEST(_vals) WITH ORDINALITY AS t(public_key, ordinality)
),
dist_rows AS (
SELECT DISTINCT public_key... |
<gh_stars>100-1000
select cs_project(q.*) from (select cs_cast(Day, 'timestamp') from Quote_get('ABB')) q;
select cs_year(Day) from Quote_get('ABB');
select cs_month(Day) from Quote_get('ABB');
select cs_mday(Day) from Quote_get('ABB');
select cs_wday(Day) from Quote_get('ABB');
select cs_week(Day) from Quote_get('ABB'... |
<filename>sql/_13_issues/_12_1h/cases/bug_bts_6407.sql
create table t(i int auto_increment default 5);
create table t0(i int auto_increment,j int);
alter table t0 alter column i set default 5;
create table t1 (x int auto_increment default 100);
create table t2 (x int);
alter table t2 add column x int auto_increment ... |
select P240801
from stk_income_gen
where comcode in
(
select comcode
from stk_code
where STOCKCODE='002893'
)
and year(startdate)=2014
and rpt_type='合并'
and rpt_date=enddate
and month(startdate)=1
and day(startdate)=1
and month(enddate)=12
and day(enddate)=31
ORDER BY ENDDATE DESC |
-- Qual o peso médio dos produtos vendidos por sellers de cada estado?
-- Considere apenas o ano de 2017 e pedidos entregues
-- 33:00
SELECT t4.seller_state,
avg(t3.product_weight_g) as avg_peso_produto
FROM tb_orders as t1
LEFT JOIN tb_order_items as t2
on t1.order_id = t2.order_id
LEFT JOIN tb_products a... |
<reponame>prakash-cynexis/test-codeigniter
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 13, 2018 at 12:27 PM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
S... |
<filename>sql_migrations/01_Init_20200725.sql<gh_stars>0
/*
* 添加初始化数据库表
*/
drop database if exists 'hrspider';
CREATE database 'hrspider';
use 'hrspider';
CREATE TABLE quanguo(
url CHAR(255) PRIMARY KEY,
name CHAR(255),
salary CHAR(255),
region CHAR(255),
workplace CHAR(255),
cp_name CHAR(255),
cp_type CHAR(255),
cp_... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 09 Bulan Mei 2020 pada 16.52
-- Versi server: 10.1.37-MariaDB
-- Versi PHP: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
create table customer (
id bigint not null,
name nvarchar(255),
notes nvarchar(255),
phone_number varchar(255),
primary key (id)
) engine=InnoDB
create table customer_pet_ids (
customer_id bigint not null,
pet_ids_id bigint not null
) engine=InnoDB... |
INSERT INTO tran_category (id, created, modified, parent_id, name) VALUES (3, current_timestamp(), current_timestamp(), 0, 'Automobile');
INSERT INTO tran_category (id, created, modified, parent_id, name) VALUES (4, current_timestamp(), current_timestamp(), 3, 'Fuel');
INSERT INTO tran_category (id, created, modified... |
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SPC_DICTIONARY_LST4]') AND type IN (N'P', N'PC'))
/****** Object: StoredProcedure [dbo].[SPC_M001L_FND1] Script Date: 2017/11/23 16:46:46 ******/
DROP PROCEDURE [dbo].[SPC_DICTIONARY_LST4]
GO
/****** Object: StoredProcedure [dbo].[SPC_M001... |
-- DECLARATIONS - Of variables needed. Must be updated with your Custom User Manager details
DECLARE @SecurityLabelName NVARCHAR(20) = 'K2CUSTOM'; -- the label value that will be prepended to users and groups for the user manager
DECLARE @SecurityLabelID UNIQUEIDENTIFIER = NEWID(); -- GUID of SecurityLabel for user m... |
ALTER TABLE migrations ADD COLUMN namespace TEXT NOT NULL DEFAULT 'default';
ALTER TABLE migrations DROP CONSTRAINT migrations_pkey;
ALTER TABLE migrations ADD PRIMARY KEY (level, namespace);
|
delete from contributor where id in (
select id from contributor c left
join publication_contributor_map m on m.contributor_id = c.id
where m.contributor_id is null
);
|
-- Deploy ggircs:ciip_table_energy to pg
-- requires: ciip_table_application
begin;
create table ciip_2018.energy (
id serial primary key,
application_id integer references ciip_2018.application(id),
facility_id integer references ciip_2018.facility(id),
... |
-- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64)
--
-- Host: localhost Database: movies
-- ------------------------------------------------------
-- Server version 8.0.23
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *... |
-- ----------------------------
-- Table structure for token
-- ----------------------------
DROP TABLE IF EXISTS `token`;
CREATE TABLE `token` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`token` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'token',
`appCode` varchar(255) CHARACTER SET ut... |
INSERT INTO
entity_graph.products (
name
)
VALUES
(
${name}
)
ON CONFLICT ON CONSTRAINT products_name_unique DO UPDATE SET
name = ${name}
RETURNING
*
|
<filename>resources/mysql/account.sql
-- #!mysql
-- #{ capital.account
-- # { create
-- # :id string
-- # :value int
INSERT INTO capital_acc (id, value) VALUES (:id, :value);
-- # }
-- # { touch
-- # :id string
UPDATE capital_acc SET touch = CURRENT_TIMESTAMP WHERE id = :id;
-- # }
-- #... |
-- // CLOUD-78236 support multiple gw nodes
-- Migration SQL that makes the change goes here.
ALTER TABLE instancemetadata ADD COLUMN instanceMetadataType VARCHAR(255);
UPDATE instancemetadata SET instancemetadatatype='GATEWAY_PRIMARY' WHERE instancegroup_id IN (SELECT id FROM instancegroup WHERE instancegrouptype='G... |
<filename>apgdiff.tests/src/main/resources/cz/startnet/utils/pgdiff/modify_fts_template_new.sql
CREATE TEXT SEARCH TEMPLATE public.second_template (
INIT = dsnowball_init,
LEXIZE = dsnowball_lexize );
CREATE TEXT SEARCH TEMPLATE public.third_template (
LEXIZE = dsnowball_lexize );
|
BEGIN;
DROP TABLE IF EXISTS nodes;
COMMIT;
|
<filename>macros/schema_tests/column_values_basic/expect_column_values_to_be_unique.sql<gh_stars>100-1000
{% test expect_column_values_to_be_unique(model, column_name, row_condition=None) %}
{{ dbt_expectations.test_expect_compound_columns_to_be_unique(model, [column_name], row_condition=row_condition) }}
{% endtest %}... |
ALTER TABLE `lh_canned_msg`
ADD `department_id` int(11) NOT NULL,
ADD `user_id` int(11) NOT NULL AFTER `department_id`,
COMMENT='';
ALTER TABLE `lh_canned_msg`
ADD INDEX `department_id` (`department_id`),
ADD INDEX `user_id` (`user_id`);
ALTER TABLE `lh_chat_online_user`
ADD `reopen_chat` int(11) NOT NULL,
C... |
<filename>sql/_12_mysql_compatibility/_02_boolean_constructs/_02_is_construct/cases/_q2002_is_not_null.sql
select if(null is null, 2,3) from db_root;
select if(null is not null, 2,3) from db_root;
select 1 from db_root where (1|1) IS TRUE;
select 1 from db_root where (1&1) IS false;
select 1 from db_root where (1&1 -1)... |
-- Copyright 2021 The Go Authors. All rights reserved.
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file.
BEGIN;
ALTER TABLE search_documents ALTER COLUMN package_path_id TYPE INTEGER;
ALTER TABLE symbol_search_documents ALTER COLUMN package_path_id TYPE INTEGER;
... |
<reponame>opengauss-mirror/Yat
-- @testpoint:opengauss关键字server_name(非保留),作为外部数据源名
--关键字不带引号-成功
drop data source if exists server_name;
create data source server_name;
drop data source server_name;
--关键字带双引号-成功
drop data source if exists "server_name";
create data source "server_name";
drop data source "server_name"... |
<gh_stars>0
ALTER TABLE `crm_rc_info` ADD `in_process_date` DATE NOT NULL AFTER `status` ;
ALTER TABLE `loan_history_log` ADD `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `created_at`;
ALTER TABLE `crm_insurance_inq_history` CHANGE `updated_date` `updated_date` DATETIME NULL DEFAULT CURRENT_TIMESTA... |
prompt &h3.Grant SYSTEM privileges
prompt &s1.create session, create procedure, create table, create type, create view to &INSTALL_USER.
grant create session, create procedure, create table, create view, create type to &INSTALL_USER.;
begin
$IF dbms_db_version.ver_le_11 $THEN
null;
$ELSE
dbms_output.put_line(... |
-->-->-- C:/Users/nirvan/Desktop/mixerp/frapid/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/db/PostgreSQL/1.x/1.0/src/01.types-domains-tables-and-constraints/tables-and-constraints.sql --<--<--
DROP SCHEMA IF EXISTS website CASCADE; --WEB BUILDER
CREATE SCHEMA website;
CREATE TABLE website.configurations
(
configur... |
IF EXISTS (select * from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA='dw' and TABLE_NAME='f_virta_jtp_tilasto' and COLUMN_NAME='d_sektori_id') BEGIN
EXECUTE sp_rename N'dw.f_virta_jtp_tilasto.d_sektori_id', N'd_virtajtpsektori_id', 'COLUMN'
END
|
CREATE TABLE subdivision_MT (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision_MT" ("id", "name", "level") VALUES (E'MT-03', E'Birgu', E'local council');
INSERT INTO "subdivision_MT" ("id", "name", "level") VALUES (E'MT-04', E'Birkirkara', E'local council... |
CREATE TABLE "post" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"content" TEXT,
"created_at" INTEGER,
"updated_at" INTEGER,
"created_by" INTEGER,
"updated_by" INTEGER,
"locked" INTEGER,
"removed" INTEGER
);
INSERT INTO "post" VALUES (1, 'test', 1454414533, 1454414533, 100, 100, 0, 0);
|
/*
Warnings:
- You are about to drop the column `reached_amount` on the `campaigns` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "campaigns" DROP COLUMN "reached_amount";
-- CreateVIew
CREATE OR REPLACE VIEW "campaigns_summary" as
SELECT
c.id as campaign_id,
SUM(d.amount) ... |
-- Copyright (c) 2017-2021 VMware, Inc. or its affiliates
-- SPDX-License-Identifier: Apache-2.0
-- GPDB5: Certain tables are deprecated with respect to a major version
-- upgrade from 5. Views that reference these tables error out during schema
-- restore, rendering them non-upgradeable. They must be dropped before r... |
<reponame>zqunor/zqblogs.cn<gh_stars>0
--创建数据库
create databse `blog`;
--创建用户表
create table `b_user`(
`id` int primary key not null auto_increment,
`username` varchar(20) not null default '',
`password` char(32),
`email` varchar(30) default '',
`qq` varchar(30) default '',
`status` int default 0 comment '用于标记博主和访客',
`c... |
INSERT INTO OPTIONAL_PROGRAM (OPTIONAL_PROGRAM_ID,OPTIONAL_PROGRAM_CODE,GRADUATION_PROGRAM_CODE,LABEL,DESCRIPTION,EFFECTIVE_DATE,EXPIRY_DATE,DISPLAY_ORDER) VALUES ('CA687AF43C4FBA98E0539AE9228E7328','FI','2004-EN','2004 Graduation Program French Immersion','French Immersion students on the 2004 B.C. Graduation program ... |
-- Migrationscripts for ebean unittest
-- drop dependencies
drop trigger migtest_e_history_history_upd;
drop trigger migtest_e_history_history_del;
drop view migtest_e_history_with_history;
CALL usp_ebean_drop_column('migtest_e_history', 'sys_period_start');
CALL usp_ebean_drop_column('migtest_e_history', 'sys_period_e... |
<reponame>RedPillAnalytics/test-gradle-confluent
-- users lookup table
CREATE TABLE WEB_USERS (user_id int primary key, registered_At bigint, username varchar, first_name varchar, last_name varchar, city varchar, level varchar)
with (kafka_topic = 'clickstream_users', value_format = 'json');
|
<reponame>scwiek/reshare-analytics
DROP TABLE IF EXISTS reshare_derived.consortial_view;
CREATE TABLE reshare_derived.consortial_view AS
SELECT
prr."__origin" AS cv_requester,
prr.prr_date_created AS cv_date_created,
prr.prr_last_updated AS cv_last_updated,
prr.prr_directory_id_fk AS cv_directory_id_fk... |
<filename>datalake/src/main/resources/schema/app/20190816110107_CB-2038_add_sdx_status_table.sql<gh_stars>100-1000
-- // CB-2038 add sdx status table
-- Migration SQL that makes the change goes here.
CREATE TABLE sdxstatus (id bigserial NOT NULL,
datalake bigint,
created... |
<reponame>code-epic/gdoc
--
-- INFI_TB_236_MESA_CAMBIO (Table)
--
CREATE TABLE ADM_INFI.INFI_TB_236_MESA_CAMBIO
(
ID_OPER VARCHAR2(12 BYTE),
OPERACION VARCHAR2(6 BYTE),
RIF_CLIENTE VARCHAR2(12 BYTE),
NOM_CLIEN VARCHAR2(31 BYTE),
COD_DIVISAS VARCHAR2(3 BYTE),
MTO_DIVISAS ... |
------------------------------------------------------------------
-- PXF invalid test
------------------------------------------------------------------
CREATE EXTERNAL TABLE pxf_invalid_test (a TEXT, b TEXT, c TEXT)
LOCATION ('pxf://tmp/dummy1?FRAGMENTER=DemoFragmenter&ACCESSOR=&RESOLVER=DemoTextResolver')
FORMAT 'T... |
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
ALTER TABLE `dcase`, CHANGE COLUMN `user_id` `user_id` INT(11) NOT NULL AFTER `project_id` ,
ADD CONSTRAINT `fk_dcase_project1`
FO... |
INSERT INTO waffle_switch_mkt (name, active, note, created, modified)
VALUES ('reviews-translate', 0,
'This adds a "translate" button for addons reviews and enables '
'reviews translations on click.', NOW(), NOW());
|
/*L
Copyright SAIC, Ellumen and RSNA (CTP)
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/national-biomedical-image-archive/LICENSE.txt for details.
L*/
update general_image
set general_series_pk_id = 343638016
where general_series_pk_id = 343670784;
delete from general... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 25, 2016 at 02:07 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 5.6.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
<reponame>OhmNoobs/Matular
-- Product table
DROP TABLE IF EXISTS Products;
CREATE TABLE Products
(
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
name TEXT NOT NULL,
price REAL NOT NULL,
image TEXT,
color TEXT
);
CREATE UNIQUE INDEX Products_id_uindex ON Products (id);
CREATE UNIQUE INDEX Products_name_uindex... |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 16 Mar 2020 pada 07.30
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
<filename>sample/insert.sql
delete from uw_Sample_projectTaskTable;
delete from uw_Sample_taskTable;
delete from uw_Sample_projectTable;
delete from uw_Sample_userTable;
insert into uw_Sample_userTable (uw_id, uw_nm) values (1, '<NAME>');
insert into uw_Sample_projectTable (uw_id, uw_nm, uw_ds, uw_userid) values (1, ... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 12, 2018 at 07:33 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
<reponame>vdergachev/old-school-stuff
alter table GKLIENTS_CLIENT add column EMAIL_HASH varchar(255) ;
|
<gh_stars>0
CREATE TABLE list (id VARCHAR(64) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
INSERT INTO `list` (`id`, `value`) VALUES ('af', 'Afrikaans');
INSERT INTO `list` (`id`, `value`) VALUES ('af_NA', 'Afrikaans (Namibia)');
INSERT INTO... |
<gh_stars>0
create table UserAccounts
(
UserAccountID int not null identity(1,1),
DomainName nvarchar(255) not null,
Firstname nvarchar(64) null,
Lastname nvarchar(64) null
constraint PK_UserAccounts primary key (UserAccountID),
constraint UQ_Username_DomainName unique(DomainName)
) |
-- Create new column in notifications
ALTER TABLE `notifications`
ADD COLUMN `description` VARCHAR(45) NULL AFTER `message`;
ALTER TABLE `pt`
ADD COLUMN `date_approved` DATE NULL AFTER `approved_comment`;
INSERT INTO notifications (template, message, description)
VALUES
('7', 'Your Verification Code is: ', 'Pho... |
insert into tStaticFootprint values ('Passive')
insert into tStaticFootprint values ('Inconnu')
insert into tStaticFootprint values ('Active') |
CREATE TABLE `companies` (
`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`logo_url` varchar(255) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`co... |
<filename>product-service/sql/script.sql
create database store;
create schema if not exists public;
create extension "uuid-ossp";
create table if not exists products
(
id uuid primary key default uuid_generate_v4(),
title text not null,
description text,
price numeric,
image_... |
<filename>TestData/SQLDataDumps/dbms_phone1_phone.sql
CREATE DATABASE IF NOT EXISTS `dbms_phone1` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `dbms_phone1`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: dbms_phone1
-- ------------------------------------------------------
-... |
<reponame>uetiko/Mexican-national-catalog-of-postal-codes<filename>cdmx/createdAt_cdmx.sql
insert into datetime_at(id, created_at, updated_at)
value(UUID_TO_BIN('fdf2c223-c892-44e5-8988-a29da4477355'), '2020-06-15 23:19:42', '2020-06-15 23:19:42');
|
/*
Navicat Premium Data Transfer
Source Server : DB-local
Source Server Type : MySQL
Source Server Version : 50720
Source Host : localhost
Source Database : PKS
Target Server Type : MySQL
Target Server Version : 50720
File Encoding : utf-8
Date: 01/16/2018 14:47:49 PM
... |
<filename>sem5DBMS/final/plsql/partBinit.sql<gh_stars>1-10
create table branch(
code varchar(5) primary key,
name varchar(10),
assets int);
create table customer(
ssn int primary key,
custname varchar(10),
place varchar(10));
create table account(
accno varchar(5),
ssn int,
code varchar(5),
balance int,
primary key(a... |
CREATE DATABASE Facultad;
GO
USE Facultad;
GO
CREATE TABLE Carreras(
ID char(4) NOT NULL PRIMARY KEY,
Nombre varchar(30) NOT NULL,
Fecha_creacion date NOT NULL CHECK(Fecha_creacion < GETDATE()),
Mail varchar(100) NOT NULL,
Nivel varchar(20) NOT NULL CHECK(Nivel IN ( 'Diplomatura', 'Pregrado', 'Grado','Posgrado'))
... |
<reponame>jaypark72/sqlfluff
-- test parsing of cross join and outer join
SELECT
count_correctly_substituted
FROM
correctly_substituted
CROSS JOIN
needs_substitution
LEFT OUTER JOIN
some_other_table
|
<gh_stars>10-100
/*[[show rowcache. Usag: @@NAME [<keyword>|-f"<filter>"] [-detail]
-detail: do not count dis,indx and hash
--[[
@con: 12.1={and a.con_id=b.con_id} default={}
&filter: {
default={:V1 IS NOT NULL AND (upper(object_name||','||address||','||substr(key,1,256)) LIKE upper('%&V1%') OR cach... |
-- This shows some simple exmaple of creating a database. Again, go crazy here!
CREATE DATABASE Demo |
--
-- Author <NAME>
-- RDM-9754
-- add retain hidden value to case event to complex type tab
--
ALTER TABLE ONLY public.event_case_field_complex_type
ADD retain_hidden_value Boolean NULL;
|
<reponame>mast7860/sus-service<gh_stars>1-10
CREATE TABLE session_details
(
session_id VARCHAR(36) PRIMARY KEY,
start_time TIMESTAMP,
end_time TIMESTAMP,
time_spent_in_sec INT,
INDEX (start_time)
) ENGINE = INNODB;
CREATE TABLE scores_details
(
session_id VARCHAR(36) PRI... |
<filename>src/test/resources/sql/select/23f74819.sql
-- file:aggregates.sql ln:77 expect:true
SELECT newcnt(four) AS cnt_1000 FROM onek
|
<reponame>pshrabstein/mymove<gh_stars>10-100
-- delete payment_service_item_params tied to CanStandAlone
delete from payment_service_item_params where service_item_param_key_id = (select id from service_item_param_keys where key = 'CanStandAlone');
-- delete service_item_param_keys tied to CanStandAlone
delete from ser... |
<reponame>eoscostarica/lifebank
alter table "public"."notification" add foreign key ("account_to") references "public"."user"("account") on update restrict on delete restrict;
|
<gh_stars>100-1000
DROP SCHEMA resets;
DROP TABLE resets;
|
<reponame>Ambal/mangos
DELETE FROM `spell_proc_event` WHERE `entry` IN (37188,37189,37227);
INSERT INTO `spell_proc_event` VALUES
(37188,0,0,0,10,0x0000000000800000,0x00004000,0),
(37189,0,0,0,10,0x00000000C0000000,0x10000000,0),
(37227,0,0,0,11,0x00000000000001C0,0x10000000,0);
|
<reponame>haroldoramirez/biogas-map-24<gh_stars>0
# --- Sample dataset
# --- !Ups
INSERT INTO municipio (id, nome, uf, estado_id) VALUES (3, 'Abadiânia', 'GO', 9);
INSERT INTO municipio (id, nome, uf, estado_id) VALUES (4, 'Abaeté', 'MG', 13);
INSERT INTO municipio (id, nome, uf, estado_id) VALUES (5, 'Abaetetuba', '... |
<reponame>gowthamrao/Covid19VaccineAesiIncidenceCharacterization<filename>inst/sql/sql_server/target/1JAN 2017-2019 at-risk.sql
CREATE TABLE #Codesets (
codeset_id int NOT NULL,
concept_id bigint NOT NULL
)
;
INSERT INTO #Codesets (codeset_id, concept_id)
SELECT 0 as codeset_id, c.concept_id FROM (select di... |
-- 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, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more information.
PRINT N'Adding foreign keys to [edfi].[CourseTrans... |
select round(L_EXTENDEDPRICE) from lineitem group by L_EXTENDEDPRICE order by L_EXTENDEDPRICE desc limit 5;
|
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 01, 2017 at 03:41 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
<filename>storage/postgres/migrations/20200708749000_operations_context.up.sql
BEGIN;
ALTER TABLE operations ADD COLUMN IF NOT EXISTS context jsonb NOT NULL DEFAULT '{}'::jsonb;
COMMIT; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.