sql stringlengths 6 1.05M |
|---|
<reponame>hhudson/2122
create or replace PACKAGE "BLOG_JOB"
AUTHID DEFINER
AS
-------------------------------------------------------------------------------
--------------------------------------------------------------------------------
PROCEDURE rotate_log;
-------------------------------------------------------... |
<filename>Registros Lokados.sql
col object_name format a30
select XIDUSN,b.object_name,ORACLE_USERNAME from v$locked_object a , dba_objects b
where a.object_id = b.object_id
order by a.object_id
/ |
INSERT INTO tweb_apbd(`rangkuman`,`berkas_id`,`lembaga_id`, `lembaga_kode`,`pemda_kode`, `wilayah_kode`,`tahun`, `rekening_kode`,`rekening`, `uraian`, `nominal`,`nominal_sebelum`, `nominal_sesudah`, `nominal_perubahan`, `nominal_persen`, `keterangan`, `created_by`, `updated_by`) VALUES
('0','104','50','2.05.01','2.05'... |
<gh_stars>1-10
-- Select full summary of all plm records in db
-- query can take ~1min for single unit, or ~3-5 for all units
DECLARE
@minesite VARCHAR(50) = 'BaseMine';
WITH t as (
SELECT
a.Unit,
CAST(MIN(a.DateTime) as DATE) as MinDate,
CAST(MAX(a.DateTime) as DATE) as MaxDate,
C... |
<reponame>jdkoren/sqlite-parser
-- e_fkey.test
--
-- execsql { SELECT * FROM p1 }
SELECT * FROM p1 |
<filename>src/test/resources/randexpr1.test_202.sql
-- randexpr1.test
--
-- db eval {SELECT coalesce((select max(coalesce((select 19 from t1 where (case when ((abs(coalesce((select max(case when t1.a between (t1.c)+ -b and d then e else d end) from t1 where t1.e in (select (count(*)) from t1 union select max( -a)-coun... |
<reponame>staticfloat/SidewalkWebpage<gh_stars>10-100
# --- !Ups
INSERT INTO version VALUES ('6.3.3', now(), 'Fixes bug where you could not pan away from label before validating');
# --- !Downs
DELETE FROM version WHERE version_id = '6.3.3';
|
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100
-- file:triggers.sql ln:959 expect:true
DELETE FROM european_city_view WHERE city_name = 'Cambridge'
|
<filename>support-files/api/sql/0002_datamanageapi_20190301-0000_mysql_datahub.sql
/*
* Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
*
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
*
* BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
... |
-- Clickstream enriched with user account data
CREATE STREAM customer_clickstream WITH (PARTITIONS=2) AS
SELECT userid, u.first_name, u.last_name, u.level, time, ip, request, status, agent
FROM clickstream c
LEFT JOIN web_users u
ON c.userid = u.user_id;
|
CREATE TABLE platano_db.items (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` text COLLATE utf8mb4_unicode_ci NOT NULL,
`type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
... |
/*
Navicat MySQL Data Transfer
Source Server : qin
Source Server Version : 50726
Source Host : localhost:3306
Source Database : liucy
Target Server Type : MYSQL
Target Server Version : 50726
File Encoding : 65001
Date: 2019-12-25 16:59:04
*/
SET FOREIGN_KEY_CHECKS=0... |
<filename>framework/resources/Functional/subqueries/not_in/s5_1_c_bigint.sql
select count(*) from j6 where c_bigint not in ( select c_bigint from j1) ;
|
<reponame>martinrupp/benchmarks
ET TIMING ON;
SET SCHEMA TPCH;
SELECT COUNT(*) FROM REGION;
SELECT COUNT(*) FROM NATION;
SELECT COUNT(*) FROM SUPPLIER;
SELECT COUNT(*) FROM CUSTOMER;
SELECT COUNT(*) FROM PART;
SELECT COUNT(*) FROM PARTSUPP;
SELECT COUNT(*) FROM ORDERS;
SELECT COUNT(*) FROM LINEITEM;
|
<filename>spring-boot/src/main/resources/schema.sql
create table if not exists customer(id serial primary key, name varchar (255) not null) ; |
<reponame>lintzc/GPDB
-- Install procedure language PL/R
-- CREATE LANGUAGE plr;
-- Data preparation
\echo '-- start_ignore'
DROP FUNCTION IF EXISTS func_plr();
DROP TABLE IF EXISTS func_call_modes_data CASCADE;
\echo '-- end_ignore'
CREATE TABLE func_call_modes_data ( c1 INT, c2 INT ) DISTRIBUTED BY (c1);
INSERT INT... |
<reponame>rodel-talampas/gpdb<filename>src/test/tinc/tincrepo/mpp/gpdb/tests/storage/pg_twophase/commit_drop_tests/trigger_sql/sql/heap_drop_table_trigger.sql
DROP TABLE cr_heap_table;
|
CREATE FUNCTION oracle.get_major_version()
RETURNS text
AS 'MODULE_PATHNAME','ora_get_major_version'
LANGUAGE 'c' STRICT IMMUTABLE;
CREATE FUNCTION oracle.get_major_version_num()
RETURNS text
AS 'MODULE_PATHNAME','ora_get_major_version_num'
LANGUAGE 'c' STRICT IMMUTABLE;
CREATE FUNCTION oracle.get_full_version_num()
... |
-- Revert test:v1.7.0 from mysql
ALTER TABLE `test`
DROP COLUMN `name`,
DROP COLUMN `age`;
|
<reponame>foysal-cse12/assignment
-- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 22, 2016 at 02:17 PM
-- Server version: 5.6.26
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET... |
create table t1 (s1 string collate utf8_en_ci);
create table t2 (s1 string collate utf8_en_cs);
insert into t1 values ('cAbc'), ('caac');
insert into t2 values ('cAbc'), ('caac');
select trim ('c' FROM s1) from t1 order by 1;
select trim ('c' FROM s1) from t2 order by 1;
select trim ('c' FROM cast (s1 as string c... |
--create range partition table with date data type,create table,select data from two tables, they are partition - non partition join
create table range_test(id int not null ,
test_time time,
test_date date,
test_timestamp timestamp,primary key(id,test_date))
PARTITION BY RANGE (test_date) (
PARTITION ... |
<filename>database/blood.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.4
-- Dumped by pg_dump version 12.4
-- Started on 2020-09-07 00:22:52
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_s... |
-- grabs a snapshot of each set's position multiplier at midnight UTC of each day
create or replace view setprotocol.view_daily_position_multipliers as
with position_multiplier_changes as (
-- TODO: Grab the contract creation date of each set and set its default multiplier to 1
select "contract_address" as set_ad... |
<reponame>farizbm/ci-makanan
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 20, 2018 at 04:00 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 =... |
<gh_stars>0
USE [TradeRepository]
GO
DROP TABLE [dbo].[UserFxCurrencyConversionAudit];
GO
DROP TABLE [dbo].[ConversionResults];
GO
DROP TABLE [dbo].[Side];
GO
--USE [master]
--GO
--
--DROP DATABASE [TradeRepository]
--GO |
<filename>Labs/Lab 7/procedure.sql
Create TAble Airport_merged(
airport_id int not null primary key,
airport_name varchar(100) not null,
country_code varchar(10) not null,
altitude int
);
DROP PROCEDURE mergeTables;
CREATE OR REPLACE PROCEDURE mergeTables
IS
airport_id int;
airport_name varchar(100);
airport... |
select a.NP_P3,b.WRITEDATE
from RES_COM_PFT_FCST a
left join RES_REPORT_MAIN b
on a.RES_ID = b.RES_ID
WHERE b.INNER_CODE in (
select INNER_CODE
FROM STK_CODE
WHERE STOCKCODE = '600871'
)
AND b.WRITEDATE
... |
<filename>db/dump-forex_exchange-201901211513.sql<gh_stars>0
-- MySQL dump 10.13 Distrib 5.7.24, for Linux (x86_64)
--
-- Host: localhost Database: forex_exchange
-- ------------------------------------------------------
-- Server version 5.7.24-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S... |
CREATE TABLE [internal].[executables] (
[executable_id] BIGINT IDENTITY (1, 1) NOT NULL,
[project_id] BIGINT NOT NULL,
[project_version_lsn] BIGINT NOT NULL,
[package_name] NVARCHAR (260) NOT NULL,
[package_location_type] NVARCHAR (128) NUL... |
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`uid` int(11) NOT NULL AUTO_INCREMENT,
`fname` varchar(60) NOT NULL,
`lname` varchar(60) NOT NULL,
`username` varchar(50) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`regIP` varchar(18) NOT NULL,
`regDate` varchar(255) N... |
<gh_stars>10-100
CREATE TABLE [dbo].[CacheSets]
(
[Type] INT NOT NULL,
[JSON] NVARCHAR(MAX) NOT NULL,
[EditedDate] DATETIMEOFFSET(7) NOT NULL,
CONSTRAINT [PK_dbo.DeletedItems] PRIMARY KEY CLUSTERED ([Type] ASC)
)
GO
CREATE TRIGGER [dbo].[TRG_CacheSets_Updated]
ON [dbo].[CacheSets]
AFTER UPDATE
AS BEGI... |
<reponame>Shuttl-Tech/antlr_psql
-- file:domain.sql ln:336 expect:true
insert into domtab (col1) values (null)
|
<filename>sql/tables/value_added/fwa_approx_borders.sql
-- fwa_approx_borders.sql
-- For watersheds queries, we want to know if a given location is
-- on a stream that is about to leave BC. Find these streams by intersecting
-- with these lines along the border.
-- Borders should match the FWA boundaries (using the su... |
CREATE TABLE IF NOT EXISTS `urls` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`full` VARCHAR(2048) NOT NULL,
`hash` VARCHAR(16) NOT NULL
);
|
-- 2020-11-08T20:01:25.639Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET AD_Reference_ID=30, IsMandatory='N',Updated=TO_TIMESTAMP('2020-11-08 22:01:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11682
;
-- 2020-11-08T20:01:26.113Z
-- I forgot to set the DICTIONA... |
CREATE SCHEMA IF NOT EXISTS vrt;
CREATE TYPE vrt.blocking AS ENUM ('unblocked', 'blocked');
CREATE TYPE vrt.suspension AS ENUM ('active', 'suspended');
CREATE TABLE vrt.party
(
id BIGSERIAL NOT NULL,
event_id BIGINT NOT NULL,
... |
<filename>FirstHomework/DataTypes/13.MoviesDatabase.sql
--CREATE DATABASE Movies
--USE Movies
CREATE TABLE Directors(
Id INT PRIMARY KEY NOT NULL,
DirectorName NVARCHAR(50) NOT NULL,
Notes NVARCHAR(MAX)
)
CREATE TABLE Genres(
Id INT PRIMARY KEY NOT NULL,
GenreName NVARCHAR(50) NOT NULL,
Notes NVARCHAR(MAX)
)
CREATE ... |
<reponame>himanshug/hive
SELECT 'Upgrading MetaStore schema from 1.2.0 to 1.3.0' AS MESSAGE;
:r 007-HIVE-11970.mssql.sql;
UPDATE VERSION SET SCHEMA_VERSION='1.3.0', VERSION_COMMENT='Hive release version 1.3.0' where VER_ID=1;
SELECT 'Finished upgrading MetaStore schema from 1.2.0 to 1.3.0' AS MESSAGE;
|
<reponame>fidransky/discussment
ALTER TABLE `category` RENAME `discussment_category`;
ALTER TABLE `discussion` RENAME `discussment_discussion`;
ALTER TABLE `post` RENAME `discussment_post`;
ALTER TABLE `topic` RENAME `discussment_topic`;
ALTER TABLE `user_post_reputation` RENAME `discussment_user_post_reputation`;
ALTE... |
<filename>packaging/dbscripts/upgrade/03_03_0610_spice_as_default_display_type_on_blank_template.sql
update vm_static set default_display_type = 1 where vm_guid = '00000000-0000-0000-0000-000000000000';
|
drop table if exists project_insts;
create table project_insts
(
proj_inst_id serial primary key,
proj_id int,
team_id int,
topic_str varchar,
description varchar
);
-- alter table project_insts
-- drop
-- constraint project_insts__proj__id_fkey;
alter table project_insts
add
... |
<reponame>isaacwaithaka/ecleainterview<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 16, 2021 at 07:56 AM
-- Server version: 8.0.22
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACT... |
INSERT INTO `items` (`name`, `label`, `limit`, `rare`, `can_remove`) VALUES
('stones', 'Taş', 10, 0, 1),
('washedstones', 'Yıkanmış Taş', 10, 0, 1),
('gold', 'Altın', 10, 0, 1),
('diamond', 'Elmas', 10, 0, 1),
('copper', 'Bakır', 10, 0, 1),
('iron', 'Demir', 10, 0, 1),
('coal', 'Kömür', 10, 0, 1)
;
|
<gh_stars>0
select title AS "Movie title", DATEDIFF(CURRENT_TIMESTAMP, release_date) AS "Number of days passed" FROM movies WHERE release_date IS NOT NULL; |
<reponame>gryphonshafer/cbqz
# dest.prereq: db/changes/1472568489_create_tables
LOCK TABLES role WRITE;
ALTER TABLE role DROP INDEX user_type;
ALTER TABLE role CHANGE type type TEXT;
UPDATE role SET type = "Administrator" WHERE type = "admin";
UPDATE role SET type = "Director" WHERE type = "director";
UPDATE role SE... |
drop table local_publico cascade;
drop table item cascade;
drop table anomalia cascade;
drop table anomalia_traducao cascade;
drop table duplicado cascade;
drop table utilizador cascade;
drop table utilizador_qualificado cascade;
drop table utilizador_regular cascade;
drop table incidencia cascade;
drop table proposta_... |
<filename>seismik/scripts/read/userphotos.sql
cl scr
SET ECHO OFF
SET VERIFY OFF
SET FEEDBACK OFF
PROMPT " d.schwarz Axklen"
PROMPT " ·················································"
PROMPT " "
PROMPT " ███████╗███████╗██╗███████╗███╗... |
<reponame>jopsyvarghese/ci_test
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 23, 2020 at 01:12 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zon... |
<reponame>JesseTsang/SOEN487-Final-Project
CREATE DATABASE IF NOT EXISTS soen487_w18_team07_logging;
USE soen487_w18_team07_logging;
CREATE TABLE IF NOT EXISTS Log(
Id int NOT NULL AUTO_INCREMENT,
log_class varchar(255),
log_level varchar(10),
log_message varchar(255),
log_timestamp timestamp... |
<reponame>DamVanLong95/SSBH2<filename>ssbh.backup.sql
-- MySQL dump 10.13 Distrib 5.7.30, for Linux (x86_64)
--
-- Host: localhost Database: ssbh
-- ------------------------------------------------------
-- Server version 5.7.30-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... |
<filename>traffictrack.sql<gh_stars>0
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.7.24 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 10.2.0.5599
-- ---------------------... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.4.11-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 10.3.0.5771
-- -----------------------------------------------... |
#设置客户端连接服务器的编码为utf-8
set names utf8;
#丢弃数据库
drop database if exists succulents;
#创建新的数据库
create database succulents CHARSET=utf8;
#进入数据库
use succulents;
#创建保存数据表用户登录注册的信息表 user
create table user(
uid int primary key auto_increment,
uphone varchar(11),
upwd varchar(16)
);
#插入数据
insert into user values(null... |
CREATE PROCEDURE Yammer_updateThreadswithNoAttachment (@NEW_STATUS NVARCHAR(100),
@PREV_STATUS NVARCHAR(100),
@PROCESSEDBY NVARCHAR(100))
AS
BEGIN
UPDATE YM_MESSAGES SET PROCESS_STATUS = @NEW_STATUS WHERE PROCESSED_BY = @PROCESSEDBY AND PROCESS_STATUS = @PREV_STATUS
UPDATE YM_ExportDetails SET Status = @NEW_STATUS ... |
-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 01, 2017 at 04:49 PM
-- Server version: 5.1.53
-- PHP Version: 5.3.4
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_S... |
<reponame>mataliksamil/patika_sql
--1
SELECT title, description FROM film;
--2
SELECT * FROM film WHERE (length > 60) AND (length < 75);
--3
SELECT * FROM film WHERE rental_rate = 0.99 OR (replacement_cost = 12.99 OR replacement_cost = 28.99);
--4
SELECT last_name FROM customer WHERE first_name = 'Mary'; -- Smit... |
<gh_stars>0
--- SQLite
--- Use COUNT to get the count of characters
--- 302
SELECT COUNT(*) name
FROM charactercreator_character;
--- How many of each specific subclass?
--- For the Python, I can iterate through a list
--- cleric: 75
SELECT COUNT(*)
FROM charactercreator_cleric;
--- fighter: 68
SELECT COUNT(*)
FROM... |
<reponame>WahyuSetiawan/website-choosepc<filename>database.sql
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versi server: 5.6.16 - MySQL Community Server (GPL)
-- OS Server: Win32
-- HeidiSQL Versi: 9.1.0.4867
... |
<reponame>tonchevaAleksandra/Microsoft-SQL-SoftUni-Problems
CREATE DATABASE SoftUni
USE SoftUni1
CREATE TABLE Towns (
Id INT PRIMARY KEY IDENTITY,
Name NVARCHAR(20) NOT NULL
)
CREATE TABLE Addresses (
Id INT PRIMARY KEY IDENTITY,
AddressText NVARCHAR(100) NOT NULL,
TownId INT NOT NULL
CONSTRAINT FK_Addres... |
INSERT INTO `mall_product` (`id`, `uid`, `name`, `desc`, `content`, `types`, `price`, `origin_price`, `img`, `buy_link`, `is_valid`, `reorder`, `status`, `sku_count`, `ramain_count`, `view_count`, `score`, `created_at`, `updated_at`) VALUES(1,'b0cc53e48a2d473eb1efd43e4ebfbf03','AKG/爱科技 K3003I入耳式三分频男女通用HIFI经典热销耳机','AKG... |
create table user (
id int not null auto_increment,
first_name varchar(64) not null,
last_name varchar(64) not null,
primary key (id)
);
|
<reponame>ojalaquellueva/gnrs<filename>gnrs_db/sql/gadm_geonames_index_admin_2.sql
-- -----------------------------------------------------
-- Add geonameid to gadm admin 2 (county)
-- -----------------------------------------------------
--
-- gadm_admin_2: some custom fixes
--
-- Affects Mexico and Colombia only
UP... |
<reponame>sunithshetty/Building-Applications-with-Scala<gh_stars>10-100
# --- !Ups
CREATE TABLE Review (ID INT NOT NULL AUTO_INCREMENT,PRODUCT_ID INT NOT NULL,AUTHOR VARCHAR(250),COMMENT VARCHAR(250),PRIMARY KEY ( ID ));
# --- !Downs
# drop table "Review";
|
<gh_stars>100-1000
-- shared.test
--
-- execsql {
-- BEGIN;
-- CREATE TABLE jkl(j, k, l);
-- }
BEGIN;
CREATE TABLE jkl(j, k, l); |
-- quota.test
--
-- execsql { CREATE TABLE t3(a, b) }
CREATE TABLE t3(a, b) |
<filename>examples/message_board/model/sqlite3.sql
begin;
drop table if exists threads;
drop table if exists messages;
create table threads (
id integer primary key autoincrement not null,
title varchar(256) not null
);
create table messages (
id integer primary key autoincrement not null,
reply_to in... |
<reponame>som-mos/eggmorning-spring<gh_stars>0
CREATE TABLE `USER` (
`user_no` bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`email` varchar(100) NOT NULL,
`name` varchar(100) NOT NULL,
`nickname` varchar(50) DEFAULT N... |
-- MySQL Script generated by MySQL Workbench
-- 06/14/17 17:53:19
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
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='TRADITION... |
CREATE DATABASE hello_world_db;
SHOW DATABASES; |
<reponame>ptrick/hdfs-hive-sql-playground
version https://git-lfs.github.com/spec/v1
oid sha256:8178bd9b6249495a9e267eab03840458d65b0d0b7c2c95c57fc1b9608fc198c2
size 3334
|
<filename>Manager_Control/T_Usage_Stats_Data.sql
/****** Object: Table [T_Usage_Stats] ******/
/****** RowCount: 1 ******/
/****** Columns: Posted_By, Last_Posting_Time, Usage_Count ******/
INSERT INTO [T_Usage_Stats] VALUES ('CheckForParamChanged','5/3/2009 1:36:03 PM',7)
|
# Tables using generated columns -- split into a separate file due to only
# being tested/supported in recent versions.
# This file is only used in MariaDB 10.2+; it's separated from the MySQL test
# due to MariaDB not supporting NOT NULL in generated cols.
# Also this package doesn't support MariaDB 10.1's alternativ... |
ALTER TABLE XYZ RENAME COLUMN num TO renum;
|
<filename>embulk-input-postgresql/src/test/resources/org/embulk/input/postgresql/test/expect/incremental/char/insert_more.sql
insert into char_load (name, note) values
('A0', 'more_skip'),
('A4', 'more_skip'),
('A9', 'more_load'),
('A5', 'more_load');
|
select title, akas
from aws.aws_route53_record
where zone_id = '{{ output.zone_id.value }}' and name = 'www.{{ resourceName }}.com.' |
CREATE TABLE {$NAMESPACE}_almanac.almanac_property (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
objectPHID VARBINARY(64) NOT NULL,
fieldIndex BINARY(12) NOT NULL,
fieldName VARCHAR(128) NOT NULL COLLATE {$COLLATE_TEXT},
fieldValue LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT},
UNIQUE KEY `objectPHID` ... |
ALTER TABLE `questions` ADD `threshold` INT NOT NULL AFTER `reply`, ADD `result` INT NOT NULL AFTER `threshold`;
ALTER TABLE `adventures` ADD `selected_scene` INT(11) NOT NULL AFTER `description`, ADD `chaos_factor` INT(2) NOT NULL AFTER `selected_scene`; |
<gh_stars>100-1000
alter table "public"."explorations" drop column "slug" cascade;
|
CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
TYPE 'oracle'
VERSION 1.1
FOREIGN DATA WRAPPER test_fdw_for_fs
OPTIONS (host '192.168.1.1', dbname 'edb', port '5450');
ALTER SERVER "FS_$%{}[]()&*^!@""'`\/#"
OWNER TO enterprisedb;
COMMENT ON SERVER "FS_$%{}[]()&*^!@""'`\/#"
IS 'Test comment';
GRANT US... |
<gh_stars>10-100
INSERT INTO `tbl_widgets` (`id`, `type_id`, `name`, `created_at`, `updated_at`, `deleted_at`) VALUES
(2, 1, 'Content', '2017-02-14 17:34:43', NULL, NULL),
(3, 1, 'Activity Logs', NULL, NULL, NULL),
(4, 1, 'Error Log Details Datatable Widget', NULL, NULL, NULL),
(5, 1, 'Error Log Details Widget', NULL,... |
ALTER TABLE "chat"."Reaction" ADD COLUMN "remoteServiceId" text NULL;
|
-- This is not a source of truth
-- This is just a scratch pad
CREATE OR REPLACE FUNCTION trigger_set_timestamp
()
RETURNS TRIGGER AS $$
BEGIN
NEW."updatedTime" = NOW
();
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
CREATE TABLE "user"
(
"userId" text PRIMARY KEY,
"name" text,
"username" text,
"email" text,
"e... |
<reponame>ivanesamson/binary_veaptv
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Nov 21, 2020 at 06:14 PM
-- Server version: 5.7.30
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `veaptv`
... |
<reponame>bizmaercq/eda-reporting
SET HEAD ON
SET ARRAY 1
SET LINESIZE 10000
SET PAGESIZE 50000
SET LONG 10000
SET ECHO ON
SET TRIMSPOOL ON
SET COLSEP ';'
SET NUMFORMAT 9999999999999999.9999
SPOOL C:\3-12243645591-AUTH_ACSERV.SPL
select TRN_REF_NO,EVENT_SR_NO,AC_CCY,AC_BRANCH,USER_ID
from actbs_daily_... |
<reponame>yunsean/inventory
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80021
Source Host : localhost:3306
Source Schema : inventory
Target Server Type : MySQL
Target Server Version : 80021
File Encoding ... |
<gh_stars>0
CREATE DATABASE IF NOT EXISTS `redsocial` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `redsocial`;
-- MySQL dump 10.13 Distrib 5.7.26, for Linux (x86_64)
--
-- Host: 127.0.0.1 Database: RedSocial
-- ------------------------------------------------------
-- Server version 5.7.26-0ubuntu0.18.10.1
/*!4... |
<filename>employee_db.sql
drop database employee_db;
CREATE DATABASE employee_db;
USE employee_db;
#**department**:
CREATE TABLE department(
dept_id INTEGER AUTO_INCREMENT PRIMARY KEY,
dept_name VARCHAR(30)
);
SELECT * from department;
# **role**
CREATE TABLE role(
role_id INTEGER AUTO_INCREMENT PRIMARY KEY,
... |
<reponame>Tibelian/convivencia
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 07-03-2020 a las 00:21:33
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACT... |
<reponame>EtienneBoutet/meteohack
select
"Latitude",
"Longitude",
"Tm",
"TmOld",
"Tm" - "TmOld" as "TmDiff",
"Tx",
"Date"
from
(
select (array_agg(t1.latitude))[1] as "Latitude",
(array_agg(t1.longitude))[1] as "Longitude",
(array_agg(t1.tm))[1] as "Tm",
max(t2.tm) as "TmOld",
(array_agg(t1.tx))[1] as... |
/* CASE statement - Example 1 */
DECLARE @Item_Example1 VARCHAR(50);
SET @Item_Example1 = 'Banana Milkshake';
SET @Item_Example1 = CASE
WHEN @Item_Example1 = 'Banana Milkshake'
THEN 'Milkshake'
WHEN @Item_Example1 = 'Apple Juice'
THEN 'Juice'
ELSE @Item_Example1
END;
... |
<reponame>PCMBarber/IMS-Example<filename>src/main/resources/sql-data.sql<gh_stars>0
INSERT INTO `ims`.`customers` (`first_name`, `surname`) VALUES ('jordan', 'harrison');
INSERT INTO `ims`.`customers` (`first_name`, `surname`) VALUES ('chris', 'perrins');
INSERT INTO `ims`.`customers` (`first_name`, `surname`) VALUES (... |
-- AlterTable
ALTER TABLE "Load" ADD COLUMN "agreed" MONEY,
ADD COLUMN "offer" MONEY;
|
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 29-06-2017 a las 12:22:57
-- Versión del servidor: 5.7.18-0ubuntu0.16.04.1
-- Versión de PHP: 7.0.18-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
... |
<reponame>nabeelkhan/Oracle-DBA-Life
set echo off
set heading off
set feedback off
prompt
prompt Current Date and Time
prompt
select '*** Time = '||to_char(sysdate,'DD-MON-YY HH:MI:SS')|| ' ***' from dual; |
<filename>CakePhp/streaming/config/schema/streaming.sql
-- MySQL dump 10.13 Distrib 8.0.22, for Linux (x86_64)
--
-- Host: localhost Database: streaming
-- ------------------------------------------------------
-- Server version 8.0.22-0ubuntu0.20.04.3
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... |
SET SERVEROUTPUT ON
DECLARE
c_id employee_detail.ssn %type ;
c_name employee_detail.Name %type ;
c_salary employee_detail.salary %type ;
c_deptno employee_detail.deptno %type;
CURSOR c1
IS SELECT SSN ,NAME,SALARY,DEPTNO
FROM EMPLOYEE_DETAIL;
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO c_id, c_name, c_salary,c_deptno;
EXIT WHEN c... |
<filename>SQL-scripts/getCurrentMetrics.sql
---run this script in the transit-performance database
--USE transit_performance
--GO
IF OBJECT_ID('getCurrentMetrics','P') IS NOT NULL
DROP PROCEDURE dbo.getCurrentMetrics
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE dbo.getCurrentMetrics
-... |
// GENERATED using CqlScriptsGeneratorMain.java
// Keyspace: ig_auth
CREATE KEYSPACE IF NOT EXISTS ig_auth
WITH replication = {
'class': 'SimpleStrategy', 'replication_factor' : 1
};
USE ig_auth;
CREATE TABLE IF NOT EXISTS access_tokens (
user_id uuid,
device_token varchar,
access_token varchar,
time_... |
GO
IF OBJECT_ID('spSearchEmployeesByHiringDate') IS NOT NULL DROP PROCEDURE spSearchEmployeesByHiringDate
GO
CREATE PROCEDURE spSearchEmployeesByHiringDate
(
@StartDate DATETIME
,@EndDate DATETIME
)
AS
BEGIN
SELECT
Id
,Code
,FirstName
,LastName
,HiringDate
FROM Employee
WHERE
HiringDate BETWEEN @St... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.