sql stringlengths 6 1.05M |
|---|
<filename>upgrade/alpha1_to_2.sql
alter table users_level
add column admin_access enum('yes','no') not null default 'no' after can_be_deleted
, change column view_torrents view_torrents enum('yes','no') not null default 'yes'
, change column edit_torrents edit_torrents enum('yes','no') not null default 'no'
, change ... |
-- @testpoint: 转换01
select ASCII(01); |
-- @testpoint:opengauss关键字trigger_catalog(非保留),作为用户名
--关键字explain作为用户名不带引号,创建成功
drop user if exists trigger_catalog;
CREATE USER trigger_catalog PASSWORD '<PASSWORD>';
drop user trigger_catalog;
--关键字explain作为用户名加双引号,创建成功
drop user if exists "trigger_catalog";
CREATE USER "trigger_catalog" PASSWORD '<PASSWORD>';
dro... |
<filename>jeff-farm-ws/src/main/sql/functions/update/update_poultry_inspection.sql
DROP FUNCTION IF EXISTS update_poultry_inspection;
CREATE FUNCTION update_poultry_inspection
( IN user_id INT
, IN id INT
, IN bird_count INT
, IN egg_count INT
)
RETURNS VOID
AS
$body$
BEGIN
IF permission_check_poultry_inspectio... |
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 17, 2018 at 05:38 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>mariopeixoto/recomende
/*
Navicat Premium Data Transfer
Source Server : postgres
Source Server Type : PostgreSQL
Source Server Version : 90001
Source Host : localhost
Source Database : recomende
Source Schema : public
Target Server Type : PostgreSQL
Target Serv... |
<reponame>guptamadhur/HackerRank
# Author: <NAME>
# Github: github.com/guptamadhur
# Project: Hacker Rank Practice SQL
select min(doctor), min(prof), min(singer), min(actor) from
(select RANK() OVER (PARTITION BY Occupation ORDER BY Name) as Rank,
case when Occupation='Doctor' then Name else null end as doctor,
case w... |
use webBaoLong;
show tables;
select * from personal_access_tokens;
select * from customer_orders_admin;
select * from news_post;
select * from news_post_categories;
select * from images;
select * from products;
select * from products_categories;
select * from users;
select * from pages_of_web;
select * from... |
-- How many total Characters are there?
SELECT
COUNT(DISTINCT "name")
FROM
charactercreator_character
-- How many of each specific subclass?
SELECT
COUNT(DISTINCT m.character_ptr_id) AS MageCount,
COUNT(DISTINCT t.character_ptr_id) AS ThiefCount,
COUNT(DISTINCT c.character_ptr_id) AS ClericCoun... |
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 client_min_messages = warning;
SET row... |
INSERT INTO WIDGET VALUES ( 1, 'device1', 'node1', 'property1', 'My first widget');
INSERT INTO WIDGET VALUES ( 2, 'device2', 'node2', 'property2', 'My second widget');
INSERT INTO WIDGET VALUES ( 3, 'device3', 'node3', 'property3', 'My third widget');
INSERT INTO WIDGET VALUES ( 4, 'device4', 'node4', 'property4', 'My... |
<gh_stars>0
drop DATABASE IF EXISTS chatapp;
create database chatapp;
use chatapp;
CREATE TABLE user (
#thống tin người dùng
userid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`email` nvarchar(50),#mail
`pass` nvarchar(100),
`name` nvarchar(20),
`avata` nvarchar(100),
`mota` nvarchar(300),
`phone` nvarcha... |
<gh_stars>0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="icon" hr... |
<reponame>chinice/CodeigniterCMS
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 04, 2017 at 11:09 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_CHARAC... |
<filename>DB/soteriasoft_table_tb_imovel_construcao.sql
-- --------------------------------------------------------
--
-- Estrutura da tabela `tb_imovel_construcao`
--
CREATE TABLE `tb_imovel_construcao` (
`imovel` int(11) NOT NULL,
`entrega` date DEFAULT NULL,
`ano_construcao` int(11) DEFAULT NULL,
`area_to... |
<reponame>MonGDCH/mon-counter<filename>src/database.sql<gh_stars>1-10
CREATE TABLE IF NOT EXISTS `cnt_mark` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`mark1` varchar(50) NOT NULL COMMENT '索引key1',
`mark2` varchar(50) NOT NULL COMMENT '索引key2',
`remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
`cr... |
<reponame>Shuttl-Tech/antlr_psql
-- file:create_table_like.sql ln:83 expect:true
CREATE TABLE ctlt2 (c text)
|
<reponame>Dev-JeanSantos/bds-movieflix
INSERT INTO tb_role (authority) VALUES ('ROLE_VISITOR');
INSERT INTO tb_role (authority) VALUES ('ROLE_MEMBER');
INSERT INTO tb_user (name, email, password) VALUES ('Bob', '<EMAIL>', <PASSWORD>' );
INSERT INTO tb_user (name, email, password) VALUES ('Ana', '<EMAIL>', <PASSWORD>'... |
CREATE TABLE `admin` (
`id` smallint unsigned NOT NULL AUTO_INCREMENT,
`account` varchar(20) NOT NULL COMMENT '账号',
`passwd` varchar(80) NOT NULL COMMENT '密码',
`name` varchar(20) NOT NULL COMMENT '姓名',
`remark` varchar(250) NOT NULL COMMENT '备注',
`is_root` tinyint unsigned NOT NULL DEFAULT 0 COM... |
CREATE TABLE `tb_pphhkgnwoa`
(
`col_oyenywcnaa` smallint unsigned DEFAULT '1',
`col_wwtzoyrtid` varchar(233) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL,
`col_irailjowqz` longblob
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tb_jwspnsjkbz`
(
`col_hjkatsppsc` time(6) NOT NULL,
PRIMARY KEY ... |
<reponame>ZhSvetlana/speak-it-out
# --- !Ups
create table answer (
id integer primary key AUTOINCREMENT,
audio varchar(255),
spelling varchar(255),
gameSession_Id integer,
word_Id integer,
foreign key (gameSession_Id) r... |
LIST ALL PERMISSIONS ON keyspace1.table1 OF bob;
|
-- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 14, 2022 at 03:21 PM
-- Server version: 5.7.36
-- PHP Version: 7.3.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
SELECT name FROM songs;
SELECT name FROM songs ORDER BY(tempo);
SELECT name FROM songs ORDER BY(duration_ms) DESC LIMIT 5;
SELECT name FROM songs WHERE danceability > 0.75 AND energy > 0.75 AND valence > 0.75;
SELECT AVG(energy) FROM songs;
SELECT name FROM songs
WHERE artist_id = (SELECT id FROM artists... |
<reponame>rlizbett/12_sql_employee_tracker
DROP DATABASE IF EXISTS managment_db;
CREATE DATABASE managment_db;
USE managment_db;
CREATE TABLE department(
id INT PRIMARY KEY AUTO_INCREMENT,
name: VARCHAR(30)
);
CREATE TABLE role(
id INT PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(30),
department_id... |
declare @a int, @b int ,@c int
set @a = 556
select @b = 778 + @a
if @b > 2000
begin
print @b
print @a
end
else
begin
print 'Not full'
print 'Try again'
end
set @c = 3
while @c < 10
begin
set @c = @c + 1
end
print @c |
#sql("hor_country")
SELECT
*
FROM
eta8.hor_country
#end
#sql("hor_type")
SELECT
*
FROM
eta8.hor_type
#end
#sql("hor_province")
SELECT
*
FROM
eta8.hor_province
#end
#sql("hor_city")
SELECT
*
FROM
eta8.hor_city
#end
#sql("hor_county")
SELECT
*
FROM
eta8.hor_county
#end
#sql("sys_url_role")
SELECT
*
FROM
eta8.sys_url... |
SELECT
DISTINCT CITY
FROM
STATION
WHERE
MOD(ID, 2) = 0; |
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
CREATE PROCEDURE [Link].[sp_LoadLinkAgentActsProducts]
@SourceRecordId int = 1,
@LoadDateTime datetime2 = NULL
AS
BEGIN
SET NOCOUNT ON;
IF @LoadDateTime IS NULL SET @LoadDateTime = CURRENT_TIMESTAMP;
INSERT INTO [Link].[AgentActsProducts]
([LinkAgentActsProductI... |
BEGIN;
INSERT INTO `tvshow_scraper_tvshow` VALUES (1,'无耻之徒(美版) 第六季','20ee87219e24b3b44c34f93df61d3835daba6a91.jpg',26302882,'http://movie.douban.com/subject/26302882/',9.6,NULL,NULL,'2016-01-10 00:00:00',NULL,NULL,NULL,' Mickey再进监狱,Ian探望!CP党已被玩坏。Lip还在乱搞,V为啥抱老爹大腿,Debbie到底怀孕没,大姐混乱的感情会怎样?老爹强行裸戏,结尾已报警。2016年1.10回归,Gallagh... |
# --- !Ups
create table Activation (
id bigint not null auto_increment,
created datetime,
modified datetime,
activationCode varchar(255),
expirationDate datetime,
primary key (id)
);
create table DatabaseImage (
id bigint not null auto_increment,
created datetime,
modified datetime,... |
USE `soft_uni`;
SELECT
e.`employee_id`,
e.`first_name`,
e.`last_name`,
d.`name` AS `department_name`
FROM
`employees` AS e
JOIN
`departments` AS d ON e.`department_id` = d.`department_id`
WHERE
d.`name` = 'Sales'
ORDER BY `employee_id` DESC; |
CREATE TABLE [dbo].[aspnet_Membership] (
[ApplicationId] UNIQUEIDENTIFIER NOT NULL,
[UserId] UNIQUEIDENTIFIER NOT NULL,
[Password] NVARCHAR (128) NOT NULL,
[PasswordFormat] INT ... |
<reponame>ramon54321/popcornproject
SELECT * FROM block;
|
-- Your SQL goes here
CREATE FUNCTION pastes_create_hash() RETURNS trigger AS $$
BEGIN
NEW.hash := id_encode(NEW.id, 'the answer is 42', 10);
RETURN NEW;
END;
$$LANGUAGE plpgsql;
CREATE TRIGGER create_pastes_hash BEFORE INSERT ON pastes FOR EACH ROW EXECUTE PROCEDURE pastes_create_hash();
|
<gh_stars>1-10
create or replace function hook.test_push() returns void as $$
declare
_project_id int;
_project_owner_id int;
_token uuid;
_push jsonb;
begin
_push = '
[
{
"commit_sha":"fa7e3d5fc6b69309e2e8e... |
CREATE TABLE IF NOT EXISTS oauth_client_details (
client_id VARCHAR(255) NOT NULL PRIMARY KEY,
client_secret VARCHAR(255) NOT NULL,
resource_ids VARCHAR(255) DEFAULT NULL,
scope VARCHAR(255) DEFAULT NULL,
authorized_grant_types VARCHAR(255) DEFAULT NULL,
web_server_redirect_uri VARCHAR(255) DEFA... |
<filename>Features/IntegrationPlatform-svn/Core/TfsMigrationDBConsolidation/Tfs_Integration/Schema Objects/Tables/Keys/dbo.RUNTIME_GENERAL_PERFORMANCE_DATA.UK_RT_PerfData.ukey.sql
ALTER TABLE [dbo].[RUNTIME_GENERAL_PERFORMANCE_DATA]
ADD CONSTRAINT [UK_RT_PerfData]
UNIQUE (SessionGroupRunId, SessionUniqueId, SourceUniq... |
<reponame>krakowiakpawel9/bigquery-course
-- @author: <EMAIL>
-- @site: e-smartdata.org
-- Funkcje daty i czasu
-- CURRENT_DATETIME([time_zone]) - zwraca datę i czas, domyślnie UTC
SELECT
CURRENT_DATE('+2:00') as current_date,
CURRENT_DATETIME('+2:00') as current_datetime;
-- DATETIME(year, month, day, hour... |
<filename>sql/views/cenapi_audit.sql
create table views.cenapi_audit as
with
missing_state as (
select
count(*) as missing_state_count
from
processed.cenapi
where
cve_ent = '00'
),
missing_municipality as (
select
count(*) as missing_municipality_count
from
proce... |
DROP DATABASE IF EXISTS BikeRental;
CREATE DATABASE IF NOT EXISTS BikeRental;
USE BikeRental;
-- scelgo PK tra id e codiceFiscale:
-- visto che id è stata messa apposta -> id
-- codiceFiscale rimane candidata quindi UNIQUE!
CREATE TABLE Utente (
id INT AUTO_INCREMENT COMMENT "Unique auto generated user ... |
--schema.sql
|
ALTER TABLE `activities`
ADD COLUMN `invoice_id` INT NULL AFTER `user_id`;
|
-- trigger2.test
--
-- execsql {
-- BEGIN;
-- UPDATE tbl SET a = 1 WHERE a = 4;
-- SELECT * from tbl;
-- }
BEGIN;
UPDATE tbl SET a = 1 WHERE a = 4;
SELECT * from tbl; |
-- select6.test
--
-- execsql {
-- SELECT y, p, q, r FROM
-- (SELECT t1.y AS y, t2.b AS b FROM t1, t2 WHERE t1.x=t2.a) AS m,
-- (SELECT t3.p AS p, t3.q AS q, t4.r AS r FROM t3 NATURAL JOIN t4) as n
-- WHERE y=p
-- }
SELECT y, p, q, r FROM
(SELECT t1.y AS y, t2.b AS b FROM t1, t2 WHERE t1.x=t2.a)... |
<gh_stars>10-100
-- file:alter_generic.sql ln:137 expect:true
ALTER FOREIGN DATA WRAPPER alt_fdw1 RENAME TO alt_fdw3
|
-- file:alter_generic.sql ln:457 expect:true
ALTER STATISTICS alt_stat3 OWNER TO regress_alter_user2
|
CREATE TABLE bar (id bigserial not null);
-- name: Any :many
SELECT id
FROM bar
WHERE foo = ANY($1::bigserial[]);
|
<reponame>aibotsoft/pin
create or alter proc dbo.uspSavePeriods @SportId int, @TVP dbo.PeriodType READONLY as
begin
set nocount on
MERGE dbo.Period AS t
USING @TVP s
ON (t.Number = s.Number and t.SportId = @SportId)
WHEN MATCHED THEN
UPDATE
SET Description ... |
select json test from e2etest.e2etesttable where test = '#replaceme1#' limit 1 |
<reponame>kant/cas-ggircs<gh_stars>1-10
-- Verify ggircs:view_pro_rated_carbon_rate on pg
begin;
select * from swrs.pro_rated_carbon_tax_rate where false;
rollback;
|
<filename>dal-dao-gen/src/main/resources/open/script.sql<gh_stars>1-10
DROP TABLE IF EXISTS `alldbs`;
DROP TABLE IF EXISTS `api_list`;
DROP TABLE IF EXISTS `approve_task`;
DROP TABLE IF EXISTS `databasesetentry`;
DROP TABLE IF EXISTS `databaseset`;
DROP TABLE IF EXISTS `group_relation`;
DROP TABLE IF EXISTS `dal_group`... |
-- Add a flag to notify posters of replies to their comment
ALTER TABLE comments ADD COLUMN notification INTEGER NOT NULL DEFAULT 0;
|
<reponame>thisisronak/obevo<gh_stars>100-1000
create proc SpWithTemp (@MaxCount int) as
begin
select * from #MyTemp
end
GO
sp_procxmode 'SpWithTemp', 'Unchained'
GO |
<filename>src/main/resources/com/google/cloud/spanner/jdbc/DatabaseMetaData_GetColumns.sql
/*
* Copyright 2019 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
*
* http... |
<reponame>Zhaojia2019/cubrid-testcases<filename>sql/_01_object/_10_system_table/_004_db_attribute/cases/1013.sql
-- create a class with a numeric type - (p.0) auto_increment field and retrieve info from db_attribute
create class xoo ( id numeric(10,0) auto_increment , title varchar(100));
insert into xoo(title) value... |
<reponame>LasseWolter/clowdr
alter table "room"."Room" add column "colour" text
not null default '#238090';
|
-- +migrate Up
DROP TABLE template_params;
DROP TABLE template;
-- +migrate Down
SELECT 1;
|
<filename>openGaussBase/testcase/KEYWORDS/sysid/Opengauss_Function_Keyword_Sysid_Case0021.sql<gh_stars>0
-- @testpoint: opengauss关键字sysid(非保留),作为函数名,部分测试点合理报错
--关键字不带引号-成功
drop function if exists sysid;
create function sysid(i integer)
returns integer
as $$
begin
return i+1;
end;
$$ language plpgsql;
/
--关键字带双引号-成... |
/*
----------------------------
0. sqlite3-dbf $1 > ${1}.sql (pasa a sqlite texto commands)
1. convertir a utf8
iconv -f latin1 -t utf8 ${1}.sql ${1}-utf8.sql
2. ahora vi, (luego sed -i)
:%s/${1}/${1}.listado/gc
:%s/TEXT/char/gc
3. resolver comillas simples entre campos
/'\([^,]*\)'\([^,]*\)'/\1\... |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 13, 2022 at 06:26 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<gh_stars>0
-- Database commands --
.databases
$sqlite3 testDB.db .dump > testDB.sql
$sqlite3 testDB.db < testDB.sql
-- Data Type -- https://www.tutorialspoint.com/sqlite/sqlite_data_types.htm
CREATE TABLE exchange (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
symbol TEXT NOT NULL,
create_at INTEGER NOT NULL,
status ... |
delete from user_favourite_games
where game_id = ?
|
<reponame>brothman1/Spam<filename>Spam/SpamDb/Tables/ref.tbl_SecurityGroup.sql
CREATE TABLE ref.tbl_SecurityGroup
(
Id uniqueidentifier not null default newid() PRIMARY KEY CLUSTERED
,Name nvarchar(128) not null
,DomainId tinyint not null
,AppendSessionId uniqueidentifier not null
,RecordAppend datetime2(7) not ... |
<reponame>TomekQ13/index-performance
create index ts_idx on test2 (col_timestamp); |
<gh_stars>0
CREATE TABLE `account_profiles` (
`account_id` int(11) NOT NULL,
`gamespace_id` int(11) NOT NULL,
`payload` json DEFAULT NULL,
PRIMARY KEY (`account_id`,`gamespace_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
<reponame>winn2048/HiveelPay
-- MySQL dump 10.13 Distrib 5.7.21, for macos10.13 (x86_64)
--
-- Host: hiveelco1 Database: pay
-- ------------------------------------------------------
-- Server version 5.7.22
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@... |
-- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 17-09-2020 a las 01:09:07
-- Versión del servidor: 8.0.20-0ubuntu0.20.04.1
-- Versión de PHP: 7.2.32-1+ubuntu20.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START... |
ALTER TABLE ONLY casesvc.category DROP manual;
INSERT INTO casesvc.category(name, longdescription, eventtype, role, generatedactiontype, "group", shortdescription, newCaseSampleUnitType, oldCaseSampleUnitType) VALUES ('RESPONDENT_ENROLLED', 'Respondent Enrolled', 'DEACTIVATED', null, null, null, 'Respondent Enrolled',... |
/*!40101 SET NAMES binary*/;
/*!40014 SET FOREIGN_KEY_CHECKS=0*/;
/*!40103 SET TIME_ZONE='+00:00' */;
INSERT INTO `wp_users` VALUES
(1,"paul","$P$BdR6dBtgQ4Sv5Vs8t0gapqvYzRQ.LQ1","paul","<EMAIL>","","2019-06-17 20:34:11","",0,"paul");
|
SELECT
requirements.name,
requirements.file
FROM
requirements
JOIN courses ON courses.id = requirements.course AND courses.deleted = 0
WHERE
requirements.id = %d AND requirements.deleted = 0
GROUP BY
requirements.id; |
CREATE TABLE subdivision_SE (id VARCHAR(6) NOT NULL, name VARCHAR(255) NOT NULL, level VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
INSERT INTO `subdivision_SE` (`id`, `name`, `level`) VALUES ('SE-K', 'Condado de Blekinge', 'county');
INSERT INTO `subdivisi... |
<filename>com.software5000.ma.server/target/classes/db/migrate/V2_0_1__Update.sql<gh_stars>1-10
-- 配置脚本
CREATE TABLE `BusinessUser` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`realName` VARCHAR(255) NULL,
`sex` VARCHAR(255) NULL,
`mobile` VARCHAR(255) NULL,
`pwd` VARCHAR(255) NULL,
`bindWeChat` INT NULL,
`wxOpenId` VARC... |
<filename>migrations/20200514190000_create_hops_schema.up.sql
CREATE TABLE hops.ai (
id serial NOT NULL,
pos_id int4 NOT NULL,
"server" int4 NOT NULL,
faction int4 NOT NULL,
"map" int2 NOT NULL,
coordinate point NOT NULL,
walking_speed float4 NOT NULL,
running_speed float4 NOT NULL,
CONSTRAINT ai_pkey... |
<reponame>jdkoren/sqlite-parser
-- tkt-d82e3f3721.test
--
-- db eval {
-- CREATE TABLE t1(a INTEGER PRIMARY KEY AUTOINCREMENT, b);
-- INSERT INTO t1 VALUES(null,'abc');
-- INSERT INTO t1 VALUES(null,'def');
-- DELETE FROM t1;
-- INSERT INTO t1 VALUES(null,'ghi');
-- SELECT * FROM t1;
-- }
CREAT... |
-- file:publication.sql ln:14 expect:true
CREATE PUBLICATION testpib_ins_trunct WITH (publish = insert)
|
<gh_stars>10-100
BEGIN;
ALTER TABLE "tokens" ADD "is_expirable" BOOLEAN default true;
COMMIT; |
<filename>lib/data/sql/getAvatarKaiScript.sql
select * from "AvatarKaiScripts" where id = ${id} and "AvatarId" = ${avatarId}
limit 1;
|
<filename>.erda/migrations/cmdb/20220329-dice_member_extra-charset-collate.sql<gh_stars>0
alter table `dice_member_extra` convert to character set utf8mb4 COLLATE utf8mb4_general_ci;
|
<gh_stars>0
drop table if exists @writeDatabaseSchema.@regimenIngredientTable;
CREATE table @writeDatabaseSchema.@regimenIngredientTable (
person_id bigint,
drug_era_id bigint,
ingredient string,
ingredient_start_date date,
ingredient_end_date date,
regimen string,
hemonc_concept_id bigint,
re... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50540
Source Host : localhost:3306
Source Database : qingting
Target Server Type : MYSQL
Target Server Version : 50540
File Encoding : 65001
Date: 2018-11-16 15:56:15
*/
SET FOREIGN_KEY_CHECKS=0;
-- ... |
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROC [dbo].[sp_Sys_GetFunctionEnumList] AS
--生成模块功能的c# 枚举
BEGIN
DECLARE @str VARCHAR(MAX)=''
DECLARE @br VARCHAR(2)=CHAR(13)+CHAR(10)
;WITH FuncInfo AS (
SELECT
*,
(
SELECT TOP 1 FunctionName FROM dbo.SysFunction AS b WITH(NOLOCK) WHERE b.SysFunctio... |
drop table if exists rmt;
-- cleanup code will perform extra Exists
-- (so the .reference will not match)
create table rmt (n int) engine=ReplicatedMergeTree('/test/01158/{database}/rmt', '1') order by n settings cleanup_delay_period=86400;
system sync replica rmt;
insert into rmt values (1);
insert into rmt values (1)... |
<reponame>ntruchsess/tractusx
--
-- PostgreSQL database dump
--
-- Dumped from database version 14.2 (Debian 14.2-1.pgdg110+1)
-- Dumped by pg_dump version 14.2
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conformin... |
CREATE TABLE ApiDB.IsolateGPS (
isolate_gps_id NUMBER(10) NOT NULL,
gazetteer_id VARCHAR(250) NOT NULL,
country VARCHAR(250) NOT NULL,
lat FLOAT NOT NULL,
lng FLOAT NOT NULL,
MODIFICATION_DATE DATE,
USER_READ NUMBER... |
-- Not reversible |
<reponame>xinghun61/infra
-- Copyright 2016 The Chromium Authors. All Rights Reserved.
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- https://developers.google.com/open-source/licenses/bsd
-- Create app framework tables in the monorail DB.
ALTER DAT... |
-- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 29, 2014 at 01:35 AM
-- Server version: 5.6.14
-- PHP Version: 5.5.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... |
INSERT INTO [TestTable2]
([Id] ,SomeValue)
VALUES(@Id, 'T1')
WAITFOR DELAY '00:00:02' |
<reponame>erikrihendri20/kantin<filename>kantin.sql
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 27, 2022 at 11:56 AM
-- Server version: 10.4.16-MariaDB
-- PHP Version: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zon... |
drop table if exists `join1`;
create table `join1` (
`name` varchar(20) not null,
`yomi` varchar(20) not null
);
insert into `join1` VALUES
('林檎', 'リンゴ'),
('蜜柑', 'ミカン'),
('梨', 'ナシ');
drop table if exists `join2`;
create table `join2` (
`name` varchar(20) not null,
`yomi` varchar(20) not ... |
INSERT INTO price (vehicle_id, currency, price) VALUES (1, 'USD', 111.11);
INSERT INTO price (vehicle_id, currency, price) VALUES (2, 'USD', 222.22);
INSERT INTO price (vehicle_id, currency, price) VALUES (3, 'USD', 333.33);
INSERT INTO price (vehicle_id, currency, price) VALUES (4, 'USD', 444.44);
INSERT INTO price (v... |
/****** Object: Table [dbo].[Account] Script Date: 2/15/2018 10:57:22 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Account](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Email] [nvarchar](200) NOT NULL,
[FirstName] [nvarchar](100) NOT NULL,
[LastName] [nvarchar](100) NOT NULL,
[Pas... |
<filename>egov/egov-bpa/src/main/resources/db/migration/main/V20190710124046__bpa_alter_column_WF_STATE_HiSTORY.sql
alter table eg_wf_state_history alter column sendername type character varying(500);
|
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 11, 2017 at 06:02 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>misaka9981/SimpleBlog
-- 当存储过程`proc_temp`存在时,删除。
drop procedure if exists proc_temp;
$$
-- 创建存储过程`proc_temp`
create procedure proc_temp()
begin
declare row_num int;
SELECT count(1)
into row_num
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'blog_user';
... |
-- phpMyAdmin SQL Dump
-- version 4.6.0
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Jun 17, 2018 at 01:00 AM
-- Server version: 10.1.9-MariaDB-log
-- PHP Version: 5.6.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE... |
<filename>inst/sql/camtrap-dp/dwc_occurrence.sql
/*
Created by <NAME> (INBO)
Mapping from Camtrap DP: https://tdwg.github.io/camtrap-dp
Mapping to Darwin Core Occurrence: https://rs.gbif.org/core/dwc_occurrence_2022-02-02.xml
Y = included in DwC, N = not included in DwC
CAMTRAP DP DEPLOYMENTS
deploymentID ... |
<filename>project4/data/data_load/SQL_scripts/trigger5_drop.sql
PRAGMA foreign_keys = ON;
drop trigger trigger5; |
CREATE TABLE country (id NVARCHAR(2) NOT NULL, name NVARCHAR(64) NOT NULL, PRIMARY KEY (id));
INSERT INTO [country] ([id], [name]) VALUES ('AD', 'Andorrë');
INSERT INTO [country] ([id], [name]) VALUES ('AE', 'Emiratet Arabe te Bashkuara');
INSERT INTO [country] ([id], [name]) VALUES ('AF', 'Afganistan');
INSERT INTO [... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.