sql stringlengths 6 1.05M |
|---|
call table_rotate('test_cs', 'test_table_rotate', 3);
SELECT
max(id) from test_cs.test_table_rotate into @id
;
SELECT
max(id) from test_cs.test_table_rotate__2 into @id__2
;
SELECT
@id IS NULL and @id__2 = 17
; |
<filename>Scripts/Trace_Flag/Trace_Flag_8727.sql
/*
Trace Flag Demo: 8727
!!! Undocumented trace flag !!!
Function: Can be used to prevent unwanted index union plans.
SQL Server Version: ?
Information link: https://github.com/ktaranov/sqlserver-kit/blob/master/SQL%20Server%20Trace%20Flag.md#8727
*/
USE StackOverflow20... |
<gh_stars>0
CREATE KEYSPACE IF NOT EXISTS apidevops WITH replication = {'class':'SimpleStrategy', 'replication_factor':3};
CREATE TABLE IF NOT EXISTS apidevops.user (
id uuid PRIMARY KEY,
name text,
password <PASSWORD>,
host text,
request text,
data blob
);
... |
<filename>mybatis-plus/src/test/resources/cache/init.ddl.sql
CREATE TABLE IF NOT EXISTS cache (
id BIGINT(20) NOT NULL,
name VARCHAR(30) NULL DEFAULT NULL ,
PRIMARY KEY (id)
);
insert into cache values (1,'a');
insert into cache values (2,'b');
insert into cache values (3,'c');
insert into cache values (4,'d');
ins... |
<filename>Stryx/BlacklistUpdater/prisma/migrations/20210224045613_add_economy/migration.sql
-- CreateTable
CREATE TABLE "economy" (
"id" SERIAL NOT NULL,
"guildId" TEXT NOT NULL,
"userId" TEXT NOT NULL,
"cash" INTEGER NOT NULL,
"bank" INTEGER NOT NULL,
PRIMARY KEY ("id")
);
|
<reponame>j-jordan/Ed-Fi-ODS-Implementation
-- 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.
CREATE... |
<reponame>alexdavliatov/atomy
CREATE SCHEMA IF NOT EXISTS transaction;
-- transactions
CREATE TABLE IF NOT EXISTS transaction.transactions
(
id BIGSERIAL,
uid UUID NOT NULL DEFAULT gen_random_uuid(),
ref JSONB,
state VARCHAR(255) NOT NULL,
created_at... |
<reponame>gamebeta01/game
/*
SQLyog v12.2.6 (64 bit)
MySQL - 5.5.40 : Database - gamebeta
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OL... |
--create transmission
create table transmission(
transmission_id serial primary key,
name varchar(150) NOT NULL,
type_transmission smallint NOT NULL
);
--create engine
create table engine(
engine_id serial primary key,
name varchar(150) NOT NULL,
type_engine smallint NOT NULL
);
--create box
creat... |
COMMENT ON COLUMN dlms_device.device_identification IS 'Business key; identification of this device.';
COMMENT ON COLUMN dlms_device.icc_id IS 'International integrated circuit card identifier of the SIM chip of this device.';
COMMENT ON COLUMN dlms_device.communication_provider IS 'Communication provider for this devi... |
-- 1304 Number of persons with at least one measurement occurrence, by measurement_concept_id by calendar year by gender by age decile
--insert into @results_schema.heracles_results (cohort_definition_id, analysis_id, stratum_1, stratum_2, stratum_3, stratum_4, count_value)
select c1.cohort_definition_id... |
-- recreate export schema exp{{datasetKey}}
DROP SCHEMA IF EXISTS exp{{datasetKey}} CASCADE;
CREATE SCHEMA exp{{datasetKey}};
SET search_path TO exp{{datasetKey}},public;
CREATE TABLE __coverage AS
-- ATTACH MODE
SELECT s.subject_dataset_key, subject_rank AS rank, subject_name AS name, array_to_string(array_re... |
<reponame>ngalaiko/sturdy<gh_stars>100-1000
alter table workspace_sync add column drop_commits text[]; |
-- @author prabhd
-- @created 2012-12-05 12:00:00
-- @modified 2012-12-05 12:00:00
-- @tags dml HAWQ
-- @db_name dmldb
-- @execute_all_plans True
-- @description test12: Join on the distribution key of target table. Insert Large number of rows
\echo --start_ignore
set gp_enable_column_oriented_table=on;
\echo --end... |
--cast DATETIME(L)TZ constant values to date/time with time zone data types
set timezone 'Asia/Seoul';
--test: cast ts constant values to date/time with local time zone types
select cast(datetimeltz'2019-01-02 12:00:01.999' as datetime with local time zone);
select cast(datetimeltz'2019-01-02 12:00:01.999' as dateti... |
SET LOCAL inplace_upgrade_next_system_object_oids = IUO_PROC, 4768;
CREATE OR REPLACE FUNCTION pg_catalog.gs_read_block_from_remote
( int4,
int4,
int4,
int2,
int2,
int4,
xid,
int4,
xid,
boolean)
RETURNS SETOF record LANGUAGE INTERNAL ROWS 1 STRICT as 'gs_read_block_from_remote_c... |
<reponame>akremer/adapters<gh_stars>0
/*
Warnings:
- The primary key for the `Account` table will be changed. If it partially fails, the table could be left without primary key constraint.
- The primary key for the `Session` table will be changed. If it partially fails, the table could be left without primary ke... |
<gh_stars>0
CREATE TABLE B_SALE_AUXILIARY
(
ID int NOT NULL IDENTITY (1, 1),
TIMESTAMP_X datetime NOT NULL,
ITEM varchar(255) NOT NULL,
ITEM_MD5 varchar(32) NOT NULL,
USER_ID int NOT NULL,
DATE_INSERT datetime NOT NULL
)
GO
ALTER TABLE B_SALE_AUXILIARY ADD CONSTRAINT PK_B_SALE_AUXILIARY PRIMARY KEY (ID)
GO
ALTER ... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 07, 2019 at 05:40 PM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
<filename>wish/php_wish.sql
# Host: localhost (Version: 5.7.26)
# Date: 2021-12-11 09:10:42
# Generator: MySQL-Front 5.3 (Build 4.234)
/*!40101 SET NAMES utf8 */;
#
# Structure for table "cookieuser"
#
DROP TABLE IF EXISTS `cookieuser`;
CREATE TABLE `cookieuser` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userna... |
<filename>seeds/seed.users.sql<gh_stars>0
INSERT INTO users (name)
VALUES
('Brooklyn'),
('Derrick'); |
<reponame>pandubaguspr/Sistem-Informasi-Inventori-Barang<filename>sipenjualan.sql
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 14 Agu 2020 pada 16.23
-- Versi server: 10.4.8-MariaDB
-- Versi PHP: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTO... |
SELECT
a.file_id,
LOGICAL_NAME = a.name,
PHYSICAL_FILENAME = a.physical_name,
FILEGROUP_NAME = b.name,
FILE_SIZE_MB = CONVERT(DECIMAL(12,2),ROUND(a.size/128.000,2)),
MAX_FILE_SIZE_MB = CONVERT(DECIMAL(12,2),ROUND(a.max_size/128.000,2)),
SPACE_USED_MB = CONVERT(DECIMAL(12,2),ROUND(FILEPROPERTY(a.name,'SpaceUsed'... |
<filename>inventaris_obat.sql
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 16, 2020 at 06:01 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone =... |
<gh_stars>0
insert into e_regions(e_regions_code, e_regions_description, e_regions_description2, e_regions_visible, e_regions_e_nations_id) values('ITC1', 'Piemonte', '', 1, (select e_nations_id from e_nations where e_nations_code = 'IT'));
insert into e_regions(e_regions_code, e_regions_description, e_regions_descrip... |
/*
<NAME>, <EMAIL>, @kekline on Twitter, LinkedIn, and Facebook
--Database Design : Naming standards
Inconsistent naming standards can cause confusion and even lead to plan cache
bloat. Look for the presence consistent and meaningful names.
Look for stored procedures starting with 'sp_', as well as inconsistent namin... |
<filename>src/main/java/sqlFiles/createTables/createPersons.sql
CREATE TABLE persons (
personID INT NOT NULL IDENTITY(1,1),
firstName VARCHAR(255) NOT NULL,
lastName VARCHAR(255) NOT NULL,
address VARCHAR(255) NOT NULL,
country VARCHAR(255) NOT NULL,
phoneNumber VARCHAR(255) NOT NULL,
type VARCHAR(255) NO... |
INSERT INTO regions (id, name, created_at, updated_at) VALUES ('GB', 'United Kingdom', NOW(), NOW());
|
/*
Navicat Premium Data Transfer
Source Server : node-dd-signal
Source Server Type : SQLite
Source Server Version : 3030001
Source Schema : main
Target Server Type : SQLite
Target Server Version : 3030001
File Encoding : 65001
Date: 24/02/2021 21:20:26
*/
PRAGMA foreign_keys =... |
<reponame>MasayukiOzawa/SQLServer-Util
-- ディストリビューションの確認
SELECT
*
FROM
sys.dm_pdw_nodes n
LEFT JOIN
sys.pdw_distributions d
ON
d.pdw_node_id = n.pdw_node_id
ORDER BY distribution_id
GO
-- オブジェクトのデータ格納状態の取得
SELECT
ps.pdw_node_id,
ps.distribution_id,
SUM(ps.used_page_count) * 8.0 / 1024.0 AS... |
-- create tables
CREATE TABLE `[db_prefix]_main` (
`ID` int(11) unsigned NOT NULL auto_increment,
`ProfileID` int(11) unsigned NOT NULL,
`RSSUrl` varchar(255) NOT NULL,
`Quantity` int(11) unsigned NOT NULL,
`Description` varchar(255) NOT NULL,
`Status` enum('active','passive') NOT NULL default 'passive',
... |
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: May 10, 2021 at 07:15 AM
-- Server version: 10.3.28-MariaDB-cll-lve
-- PHP Version: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... |
<filename>asion-bot/asion-bot-core/src/test/resources/database/schema/init.ddl<gh_stars>0
--
-- 命名规范:
-- 组织名称_模块名称_表名称
-- 如:
-- asion_sample_sample
-- 例子主表:
DROP TABLE IF EXISTS asion_sample_sample;
CREATE TABLE asion_sample_sample (
id BIGINT NOT NULL AUTO_INCREMENT COMMENT 'id',
text VARCHAR(255) COMM... |
create table t_account
(
id BIGINT(19) auto_increment comment '用户编号账目表编号'
primary key,
user_id BIGINT(19) null comment '用户编号',
balance DECIMAL(65) null comment '当前金额',
total_expend DECIMAL(65) null comment '消费总金额'
)
collate = utf8_bin;
|
<filename>01_测试数据准备/01_数据库随机类函数/07_rand_idcard_no.sql<gh_stars>0
-- for mysql
-- 说明: 生成随机身份证号码,依赖函数rand_date()。
-- 根据《中华人民共和国国家标准GB 11643-1999》中有关公民身份号码的规定,公民身份号码是特征组合码,由十七位数字本体码和一位数字校验码组成。
-- 排列顺序从左至右依次为:六位数字地址码,八位数字出生日期码,三位数字顺序码和一位数字校验码。
-- 顺序码的奇数分给男性,偶数分给女性。校验码是根据前面十七位数字码,按照ISO 7064:1983.MOD 11-2校验码计算出来的检验码。
-- 使... |
explain plan for select c3 from dfs.drillTestDir.`DRILL_6118_parquet_without_partitioning_view` where c1<3; |
<reponame>photogamerun/weiwodb
-- database: presto; groups: with_clause; tables: nation,region; queryType: SELECT
WITH wnation AS (SELECT n_nationkey, n_regionkey FROM nation),
wregion AS (SELECT r_regionkey, r_name FROM region)
select n.n_nationkey, r.r_regionkey from wnation n join wregion r on n.n_regionkey = r.r... |
<reponame>MCZbase/DDL<gh_stars>1-10
CREATE OR REPLACE FUNCTION "CONCATPARTSINLOAN"
(
COLLECTION_OBJECT_ID IN NUMBER
, TRANSACTION_ID IN NUMBER
)
-- List counts for parts of a cataloged item in a loan.
--
-- Given a collection_object_id (probably from specimen_part.derived_from_cat_item)
-- and a transacti... |
select create_hypertable(
'error-data', 'point',
partitioning_column => 'transaction-id',
number_partitions => 1,
create_default_indexes => false,
associated_table_prefix => 'ed'
);
alter table "error-data"
set (
timescaledb.compress,
timescaledb.compress_orderby = '"server-id", point desc',
timescaled... |
-- RESOURCE GROUP: Rg1_$%{}[]()&*^!@"'`\/#
-- DROP RESOURCE GROUP "Rg1_$%{}[]()&*^!@""'`\/#"
CREATE RESOURCE GROUP "Rg1_$%{}[]()&*^!@""'`\/#";
ALTER RESOURCE GROUP "Rg1_$%{}[]()&*^!@""'`\/#"
SET cpu_rate_limit = 0, dirty_rate_limit = 0;
|
ALTER TABLE "public"."inputparamval"
ALTER COLUMN "value" DROP NOT NULL,
ADD COLUMN "tseriesid" int4,
ADD CONSTRAINT "fk_inputparamval_tseries" FOREIGN KEY ("tseriesid") REFERENCES "public"."timeseries" ("tseriesid");
|
<filename>account (1).sql
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 16, 2020 at 04:33 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... |
DROP MATERIALIZED VIEW IF EXISTS echo_eicu_icd CASCADE;
CREATE MATERIALIZED VIEW echo_eicu_icd as
SELECT patientunitstayid, MAX(icd_chf) as icd_chf, MAX(icd_afib) as icd_afib,
MAX(icd_renal) as icd_renal, MAX(icd_liver) as icd_liver,
MAX(icd_copd) as icd_copd, MAX(icd_cad) as icd_cad, MAX(icd_stroke) as icd_stroke... |
<filename>database.sql
-- MySQL dump 10.13 Distrib 8.0.20, for Linux (x86_64)
--
-- Host: localhost Database: database1
-- ------------------------------------------------------
-- Server version 8.0.20-0ubuntu0.20.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_S... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 07, 2019 at 11:58 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 13.2
-- Dumped by pg_dump version 13.2
-- Started on 2021-06-16 21:06:32
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_catalo... |
<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : PHPMyAdmin
Source Server Version : 50611
Source Host : 127.0.0.1:3306
Source Database : db_kanaka
Target Server Type : MYSQL
Target Server Version : 50611
File Encoding : 65001
Date: 2019-05-09 05:32:18
*/
S... |
<gh_stars>0
delete from ServicioEntity;
insert into ServicioEntity (nombre, categorias, descripcion, imagen) values ('Plomeria', 'agua y tuberias', 'Aqui va una descripcion detallada del servicio', 'data/images/servicio1.png');
insert into ServicioEntity (nombre, categorias, descripcion, imagen) values ('Climat... |
<reponame>SkillsFundingAgency/DC-Data-LARS
CREATE TABLE [dbo].[TBStandardLookupVersion] (
[StandardLookupVersion] VARCHAR (50) NOT NULL,
[Created_On] DATETIME NULL,
[Created_By] VARCHAR (150) NULL,
[Modified_On] DATETIME NULL,
[Modified_By] VARCH... |
CREATE DATABASE people;
CREATE TABLE people
(
id INT(14) UNIQUE AUTO_INCREMENT,
name VARCHAR(200) NOT NULL,
picture LONGBLOB NULL,
height FLOAT(10, 2) NULL,
weight FLOAT(10, 2) NULL,
gender TINYINT(1) NOT NULL,
birthdate DATE NOT NULL,
biography LONGTEXT NULL
);
INSERT INTO people(name, gender, birthdate) VA... |
<reponame>imixun/MXHarbor
--
-- 导出`yourphp_category`表中的数据 `yourphp_category`
--
INSERT INTO `yourphp_category` VALUES ('1', '新闻中心', 'news', '', '0', '2', 'Article', '0', '1', '0', '公司新闻11', '公司新闻', '公司新闻', '0', '0', '1', '0', '', '1', '/index.php?m=Article&a=index&id=1', '', '', '0', '', '1', '1', '4', '0', '0', '0',... |
<filename>player/server/src/sql/insert/queue-song.sql
INSERT INTO {{ tableName }} (
index,
user_id,
song_id
) VALUES (
{{ index }},
'{{ userID }}',
'{{ songID }}'
); |
SELECT FirstName
,LastName
FROM Employees
WHERE ReportsTo IS NULL;
|
<reponame>BAMGames/eu
CREATE TABLE T_RESULT (
ID BIGINT NOT NULL AUTO_INCREMENT,
DIE INTEGER,
`COLUMN` INTEGER,
RESULT VARCHAR(255),
PRIMARY KEY (ID)
); |
<reponame>Crypto-ALE/tmou-mapa
CREATE INDEX idx_ways_nodes_way_id ON ways_nodes(way_id);
CREATE INDEX idx_ways_nodes_node_id ON ways_nodes(node_id);
CREATE INDEX idx_ways_nodes_node_order ON ways_nodes(node_order ASC);
CREATE INDEX idx_teams_items_team_id ON teams_items(team_id);
CREATE INDEX idx_teams_items_item_name ... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50528
Source Host : localhost:3306
Source Database : open-platform
Target Server Type : MYSQL
Target Server Version : 50528
File Encoding : 65001
Date: 2019-03-18 05:00:01
*/
SET FOREIGN_KEY_CHECKS=0;... |
<filename>src/SFA.DAS.EAS.Employer_Financial.Database/StoredProcedures/GetPaye_ByRef.sql<gh_stars>1-10
CREATE PROCEDURE [employer_financial].[GetPaye_ByRef]
@Ref NVARCHAR(16)
AS
Select TOP 1
paye.EmpRef as EmpRef,
paye.Name as RefName
from
[employer_financial].AccountPaye paye
WHERE
paye.EmpRef = @Ref
|
<gh_stars>1-10
SELECT *
FROM message_persist_duration
WHERE migration_request_id = :migrationRequestId
AND message_type = :messageType FETCH FIRST ROW ONLY; |
<filename>transform/snowflake-dbt/models/sources/sheetload/sheetload_gitlab_slack_stats_source.sql
WITH source AS (
SELECT *
FROM {{ source('sheetload', 'gitlab_slack_stats') }}
), renamed AS (
SELECT
date::DATE AS entry_date,
-- running totals
full_membe... |
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: tools-db (MySQL 5.5.5-10.1.39-MariaDB)
# Database: s51409__toolsdirectory
# Generation Time: 2019-11-23 23:27:42 +0000
# ******************... |
-- Ways
CREATE MATERIALIZED VIEW osm_ways_z0 AS
SELECT id, tags, st_simplify(geom, 78271.516953125 / POWER(2, 0)) as geom
FROM osm_ways
WHERE geom IS NOT NULL
AND tags ?| ARRAY[
'aeroway', 'amenity', 'boundary', 'amenity', 'highway', 'man_made',
'landuse', 'natural','power', 'railway', 'route', 'waterway'
];
... |
<gh_stars>0
alter table activity rename to travel_path;
alter table activity_track_points rename to travel_path_track_points;
alter table travel_path_track_points rename column activity_id to travel_path;
alter table report_activity rename to report_travel_path;
alter table report_travel_path rename column activity_i... |
CREATE TABLE [dbo].[EVehicleBrakes]
(
--From MergedXSDs XSD
--From 'genericRailML' Namespace
[EVehicleBrakesId] BIGINT NOT NULL,
[VehicleBrake] SMALLINT NOT NULL,
[VehicleBrakeOperation] BIGINT NOT NULL,
[MechanicalBrakeEffort] SMALLINT NOT NULL,
[EddyCurrentBrake] BIGINT NOT NULL,
CONSTRAINT [PK_EVeh... |
<filename>comptes.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost
-- Généré le : mar. 03 nov. 2020 à 14:23
-- Version du serveur : 10.3.25-MariaDB-0+deb10u1
-- Version de PHP : 7.3.19-1~deb10u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone =... |
DELETE FROM public.plv8_modules WHERE module = 'math/fixPrecision';
INSERT INTO public.plv8_modules (module, autoload, source) VALUES ('math/fixPrecision', FALSE,
$FUNCTION$'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = fixPrecision;
/**
* Round a floating point numbe... |
<gh_stars>10-100
ALTER TABLE test.t ALTER COLUMN c NULL |
SELECT
wsa.id,
wsa.MostRecentWaterConditionDate,
(
SELECT wsainner.mlsperKg
FROM study.waterScheduledAnimals wsainner
WHERE wsa.id = wsainner.id AND wsa.MostRecentWaterConditionDate = wsainner.date
) AS mlsperKg,
(
SELECT wsainner.condition
FROM study.waterScheduledAnimals wsainner
W... |
<reponame>ziveo/ckan<gh_stars>1-10
/*
This script configures the permissions for the datastore.
It ensures that the datastore read-only user will only be able to select from
the datastore database but has no create/write/edit permission or any
permissions on other databases. You must execute this script as a database
... |
-- New field in archive table to preserve revision IDs across undeletion.
-- Added 2005-03-10
ALTER TABLE /*$wgDBprefix*/archive
ADD
ar_rev_id int unsigned;
|
<filename>sql/0.13.0/04_update_previous_next_buttons.sql
UPDATE `preferences_text` SET `placeholder` = 'Next', `default` = 'Previous' WHERE `id` = '527';
UPDATE `preferences_text` SET `placeholder` = 'Next', `default` = 'Previous' WHERE `id` = '559';
UPDATE `preferences_text` SET `placeholder` = 'Next', `default` = 'Pr... |
SELECT
nsts.stst_supplier AS supplier,
count(*) AS reqs_over_72
FROM
reshare_derived.sup_tat_stats nsts,
reshare_derived.sup_tat_stats nsts2
WHERE
nsts.stst_req_id = nsts2.stst_req_id
AND (nsts.stst_from_status IS NULL
AND nsts.stst_to_status = 'RES_IDLE'
AND nsts2.stst_from_stat... |
<reponame>UAMS-DBMI/PosdaTools
/*
This edit belongs to PT-931,
Create a Warning message for outdated queries called from Operation Popups
*/
alter table spreadsheet_operation add column outdated bool default false;
|
<filename>conf/evolutions/collins/11.sql<gh_stars>100-1000
# --- Include new common server base fields
# --- !Ups
INSERT INTO asset_meta (name, priority, label, description) VALUES ('BASE_PRODUCT', 1, 'Base Product', 'Formal product model designation');
INSERT INTO asset_meta (name, priority, label, description) VALU... |
AUTOCOMMIT OFF;
-- MODULE DML001
-- SQL Test Suite, V6.0, Interactive SQL, dml001.sql
-- 59-byte ID
-- TEd Version #
-- AUTHORIZATION HU
set schema HU;
--O SELECT USER FROM HU.ECCO;
VALUES USER;
-- RERUN if USER value does not match preceding AUTHORIZATION comment
-- date_time print
-- TEST:0001 SELECT wi... |
<reponame>eventuate-tram/eventuate-tram<filename>eventuate-tram-in-memory/src/main/resources/eventuate-tram-embedded-schema.sql
CREATE SCHEMA IF NOT EXISTS eventuate AUTHORIZATION SA;
drop table if exists eventuate.message;
CREATE TABLE eventuate.message (
ID VARCHAR(1000) PRIMARY KEY,
DESTINATION VARCHAR(1000) N... |
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50714
Source Host : 127.0.0.1:3306
Source Database : aojiaodajie
Target Server Type : MYSQL
Target Server Version : 50714
File Encoding : 65001
Date: 2017-09-27 15:43:53
*/
SET FOREIGN_... |
<gh_stars>10-100
ALTER TABLE categories DROP COLUMN name;
|
USE [master]
GO
IF OBJECT_ID('dbo.sp_HealthCheck') IS NULL
EXEC ('CREATE PROCEDURE [dbo].[sp_HealthCheck] AS RETURN 0;');
GO
ALTER PROCEDURE [dbo].[sp_HealthCheck] (
@Option varchar(1) = 0
, @Status varchar(10) = 'ACTIVE'
, @Orderby varchar(1) = 1 )
--WITH EXECUTE AS 'dbo'
AS
BEGIN
/*
Created By:... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 14.2
-- Dumped by pg_dump version 14.3
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', '', fal... |
USE M_OpFlix;
SELECT * FROM Lancamentos;
SELECT Titulo FROM Lancamentos;
SELECT * FROM Categorias;
SELECT Categoria FROM Categorias;
SELECT * FROM Usuarios;
SELECT Nome FROM Usuarios; |
<filename>storage/database/geonames/countries/ke.sql
-- MySQL dump 10.13 Distrib 5.6.35, for osx10.9 (x86_64)
--
-- Host: localhost Database: laraclassified
-- ------------------------------------------------------
-- Server version 5.6.35
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 ... |
<reponame>ipanjul990/kecamatanP
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 23, 2019 at 09:48 AM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zon... |
CREATE TABLE wind_boss_gen_timer.user
(
`id` INT NOT NULL AUTO_INCREMENT COMMENT 'id',
`email` VARCHAR(500) NOT NULL COMMENT '메일',
`password` VARCHAR(200) NOT NULL COMMENT '비밀번호',
PRIMARY KEY (id)
);
ALTER TABLE wind_boss_gen_timer.user COMMENT '유저'; |
from flask_login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from app import db, login_manager
class Employee(UserMixin, db.Model):
__tablename__ = 'employees'
id = db.Column(db.Integer, primary_key=True)
email = db.Column(db.String(120), index=True, unique... |
<filename>update/core-update.v2.0.10-v2.0.11.sql<gh_stars>1-10
BEGIN;
CREATE OR REPLACE VIEW "liquid_feedback_version" AS
SELECT * FROM (VALUES ('2.0.11', 2, 0, 11))
AS "subquery"("string", "major", "minor", "revision");
DROP FUNCTION "delegation_info"
( "member"."id"%TYPE,
"unit"."id"%TYPE,
"area"."id"... |
/*
* Practice > SQL > Advanced Select > The PADS
* https://www.hackerrank.com/challenges/the-pads/problem
*/
SELECT CONCAT(name, '(', SUBSTRING(occupation, 1, 1), ')')
FROM occupations
ORDER BY name ASC;
SELECT CONCAT('There are a total of ', COUNT(occupation), ' ', LOWER(occupation), 's.')
FROM occupations
GROUP... |
REPLACE INTO ?:status_descriptions (`status_id`, `description`, `email_subj`, `email_header`, `lang_code`)
SELECT
status_id,
'Рассматриваемый' as description,
'был создан успешно.' as email_subj,
'Ваш запрос на возврат был создан успешно.' as email_header,
'ru' as lang_code
FROM ?:statuses
WHERE sta... |
DROP TABLE IF EXISTS site;
CREATE TABLE site (
site_id int not null auto_increment,
code varchar(255),
title varchar(255),
subtitle varchar(255),
link varchar(255),
author varchar(90),
email varchar(90),
power varchar(255),
theme varchar(255),
class varchar(255),
articles in... |
<reponame>AjinkyaBangale2/Leetcode-SQL-Solutions
# https://leetcode.com/problems/nth-highest-salary/
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT
BEGIN
RETURN (
# Write your MySQL query statement below.
SELECT distinct Salary FROM
(SELECT
Salary, dense_rank() OVER (ORDER BY Sa... |
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 14, 2021 at 03:29 PM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
<filename>source/common/views/dbo.vw_logAnalysisMessages.sql
-----------------------------------------------------------------------------------------------------
--
-----------------------------------------------------------------------------------------------------
RAISERROR('Create view : [dbo].[vw_logAnalysisMessag... |
-- file:rowsecurity.sql ln:956 expect:true
DELETE FROM x1 WHERE f_leak(b) RETURNING *
|
<gh_stars>10-100
drop table if exists users; |
/*
Take care if you want to use `AcctBalance` when calculating an account balance (saldo) in a report.
It could be that the report result is okay, but the user sees it wrong because it is not
similar with the results of `acctBalanceToDate` which is used in the report `Saldobilanz`.
It's not a problem of correctnes... |
-- 2018-06-29T17:27:19.443
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_ImpFormat (AD_Client_ID,AD_ImpFormat_ID,AD_Org_ID,AD_Table_ID,Created,CreatedBy,FormatType,IsActive,IsMultiLine,Name,Processing,Updated,UpdatedBy) VALUES (0,540020,0,540999,TO_TIMESTAMP('2018-06-29 17:27:19','YYY... |
<reponame>ptrick/hdfs-hive-sql-playground
version https://git-lfs.github.com/spec/v1
oid sha256:19d3c7fb7eb732ad0b017db5534b76dc2cf893c89afec1b7dafdb047bfb28443
size 320
|
<filename>DMS5/udfGetFilename.sql
/****** Object: UserDefinedFunction [dbo].[udfGetFilename] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[udfGetFilename]
/****************************************************
** Examines @filePath to look for a filename
** If found, returns... |
----------------------------------------------------------------
-- [base_disks] Table
--
Create or replace FUNCTION InsertBaseDisk(
v_disk_id UUID,
v_disk_interface VARCHAR(32),
v_wipe_after_delete BOOLEAN,
v_propagate_errors VARCHAR(32),
v_disk_alias VARCHAR(50),
v_disk_description VARCH... |
<reponame>kll5h/ShinetechOA
INSERT INTO DICT_TYPE(ID,NAME,TYPE) VALUES(1,'省直辖市','string');
INSERT INTO DICT_INFO(ID,TYPE_ID,NAME,VALUE,PRIORITY) VALUES(1,1,'北京','北京',1);
INSERT INTO DICT_INFO(ID,TYPE_ID,NAME,VALUE,PRIORITY) VALUES(2,1,'天津','天津',2);
INSERT INTO DICT_INFO(ID,TYPE_ID,NAME,VALUE,PRIORITY) VALUES(3... |
<gh_stars>10-100
PROC $sc_$cpu_fm_filerename_stress
;*******************************************************************************
; Test Name: FM_FileRename_Stress
; Test Level: Build Verification
; Test Type: Functional
;
; Test Description
; The purpose of this test is to stress the File Manager (F... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.