sql stringlengths 6 1.05M |
|---|
<reponame>Tallgrasssudbury/demschooltools-master
# --- !Ups
ALTER TABLE charge ADD COLUMN referred_to_sm BOOLEAN NOT NULL DEFAULT FALSE;
ALTER TABLE charge ADD COLUMN sm_decision text;
# --- !Downs
ALTER TABLE charge DROP COLUMN referred_to_sm;
ALTER TABLE charge DROP COLUMN sm_decision;
|
<reponame>EL-BID/nexso
CREATE TABLE [dbo].[dnn_EasyDNNNewsModuleCategoryItems] (
[ModuleID] INT NOT NULL,
[CategoryID] INT NOT NULL,
CONSTRAINT [PK_dnn_EasyDNNNewsModuleCategoryItems] PRIMARY KEY CLUSTERED ([ModuleID] ASC, [CategoryID] ASC),
CONSTRAINT [FK_dnn_EasyDNNNewsModuleCategory_EasyDNNNewsCat... |
-- script to agg curves stats
DROP TABLE IF EXISTS psra_bc.psra_bc5930_src_loss_b0, psra_bc.psra_bc5930_src_loss_r2, psra_bc.psra_bc5930_src_loss CASCADE;
-- create table
CREATE TABLE psra_bc.psra_bc5930_src_loss_b0(
source varchar,
loss_type varchar,
loss_value float,
trt varchar
);
-- import exposure from csv
COPY ... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 22, 2020 at 04:27 PM
-- Server version: 5.7.32-0ubuntu0.18.04.1
-- PHP Version: 7.3.21-1+ubuntu18.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET... |
-- file:collate.icu.utf8.sql ln:116 expect:true
SELECT * FROM collate_test1 WHERE b ILIKE 'abc'
|
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 24-07-2019 a las 10:00:55
-- Versión del servidor: 10.1.38-MariaDB
-- Versión de PHP: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
select count(1) from temas_profesor where id = :id |
<gh_stars>0
insert into runStatus (running) values (false);
insert into mashData (measurementTime, mash, flow, herms, hlt) values (now(), 60, 61, 62, 63);
insert into runMode (runMode) values ('PREP')
|
<filename>restservice/src/main/resources/liquibase/create/000-enable_postgis.sql
--liquibase formatted sql
--changeset vaa25:0
CREATE EXTENSION POSTGIS;
--rollback DROP EXTENSION POSTGIS;
|
<reponame>EsupPortail/esup-ecandidat<filename>src/main/resources/db/migration/V2_3_01_00__Exoneration.sql<gh_stars>10-100
ALTER TABLE `candidature`
ADD COLUMN `comp_exo_ext_cand` VARCHAR(200) NULL DEFAULT NULL COMMENT 'complément exonération/extracommunautaire' AFTER `dat_analyse_form`,
ADD COLUMN `mnt_charge_cand`... |
SELECT dblink_send_query('dtest1', 'SELECT * FROM foo WHERE f1 < 3');
|
INSERT INTO `negara`(`id`, `kode_negara`, `nama`) VALUES (1, 'AF', 'Afghanistan');
INSERT INTO `negara`(`id`, `kode_negara`, `nama`) VALUES (2, 'AL', 'Albania');
INSERT INTO `negara`(`id`, `kode_negara`, `nama`) VALUES (3, 'DZ', 'Algeria');
INSERT INTO `negara`(`id`, `kode_negara`, `nama`) VALUES (4, 'DS', 'American... |
<reponame>smruthi98/qiita<filename>qiita_db/support_files/patches/12.sql
-- Dec 26, 2014
-- Adding barcode_type for Illumina Parameters
INSERT INTO qiita.preprocessed_sequence_illumina_params (param_set_name, barcode_type, rev_comp_mapping_barcodes)
VALUES ('barcode_type 8, defaults', '8', false),
('barco... |
-- @testpoint: Hash分区表中修改多条记录
--step1:创建hash分区表 expect:成功
drop table if exists t_partition_hash_0074_01;
create table t_partition_hash_0074_01(
id int,
name varchar(100),
age int)
partition by hash(id)
(partition p1,
partition p2);
--step2:插入数据 expect:成功插入两条数据
insert into t_partition_hash_0074_01 values( 1, '张三', 2... |
<reponame>webreactor/api-fuse
drop table task_list;
drop table task_sent;
CREATE TABLE IF NOT EXISTS `task_list` (
`task_id` BIGINT NOT NULL AUTO_INCREMENT,
`created` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`scheduled` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`scheduled_orig` DATETIME NOT NULL DEFAUL... |
<gh_stars>0
SELECT
LEFT(f1.name, LOCATE('.', f1.name) - 1) AS 'file',
(SELECT COUNT(*) FROM commits AS c
WHERE c.message LIKE CONCAT('%', f1.name, '%')) AS 'recursive_count'
FROM files AS f1
JOIN files AS f2
ON f1.parent_id = f2.id
AND f2.parent_id = f1.id
AND f1.id != f2.id
JOIN commits AS c
ON f1.commi... |
CREATE TABLE `product_sku` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'SKU ID',
`spu_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'SPU ID',
`attrs` text COMMENT '销售属性值{attr_value_id}-{attr_value_id} 多个销售属性值逗号分隔',
`main_url` text COMMENT '商品介绍主图 多个图片逗号分隔',
`banner_url` text COMMENT ... |
PARAMETERS RcCodeArgs TEXT(255);
SELECT PayrollObligations.*
FROM PayrollObligations
WHERE (((PayrollObligations.RcCode)=[RcCodeArgs])); |
ALTER TABLE %PREFIX%config ADD `storage_multiplier` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '1' AFTER `resource_multiplier`; |
CREATE DEFINER=`admin`@`%` PROCEDURE `modifyClass`(crn int, coursename varchar(45), coursecode varchar(7), courselocation int)
BEGIN
UPDATE COURSE SET COURSE_NAME=coursename, COURSE_CODE=coursecode, LOCATION_ID=courselocation
WHERE COURSE_CRN=crn;
END |
drop database if exists Working;
create database Working;
use Working;
drop table if exists Document;
drop table if exists Job;
drop table if exists User;
drop table if exists department;
drop table if exists employee;
drop table if exists facial_register;
drop table if exists notice;
/*=========================... |
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SPC_M007_LST1]') 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_M007_LST1]
GO
/****** Object: StoredProcedure [dbo].[SPC_M001L_FND1]... |
create table t (b char(20)); |
DELIMITER /
alter table SPONSOR add DUNNING_CAMPAIGN_ID VARCHAR(6)
/
alter table SPONSOR add CUSTOMER_NUMBER VARCHAR(40)
/
DELIMITER ;
|
DROP DATABASE IF EXISTS employees_db;
CREATE DATABASE employees_db;
USE employees_db; |
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table account (
id bigint not null,
first_name varchar(255),
last_name varchar(255),
email varchar(255),
mobil... |
-- MySQL Script generated by MySQL Workbench
-- Wed Feb 6 21:09:49 2019
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
-- -----------------------------------------------------
-- Schema cloud
-- -----------------------------------------------------
-- -------------------------------------... |
UPDATE `settings` SET `value` = '{\"version\":\"9.1.0\", \"code\":\"910\"}' WHERE `key` = 'product_info';
-- SEPARATOR --
alter table plans add `order` int unsigned default 0 null after status;
-- SEPARATOR --
SET @rownumber = 0;
-- SEPARATOR --
update plans set `order` = @rownumber := @rownumber+1 order by plan_... |
CREATE OR REPLACE FUNCTION "SPLIT" (input_list varchar2, ret_this_one number, delimiter varchar2)
return varchar2
is
v_list varchar2(32767) := delimiter || input_list;
start_position number;
end_position number;
begin
start_position := instr(v_list, delimiter, 1, ret_this_one);
if start_position > 0 then
end_... |
SELECT * FROM myTable WHERE t = '2017-01-01' - 2d;
|
<gh_stars>0
DELIMITER $$
drop trigger if exists updateSalary$$
CREATE TRIGGER updateSalary
before update on Professors
for each row
BEGIN
declare difference integer;
declare meanSalaryNew integer;
# trigger makes changes only if RangId changed and Salary was passed as 0
if NEW.Salary = 0 and NEW.RangId is not null and ... |
<filename>MVC/MVCExemplos/ComBD/mini-framework/Custom/Base/db_my.sql<gh_stars>0
CREATE TABLE clientes (
id int primary key auto_increment,
nome varchar(50) not null,
email varchar(50)
);
INSERT INTO `clientes` (`nome`, `email`) VALUES
('<NAME>','<EMAIL>'),
('<NAME> Jr.','<EMAIL>'),
('<NAME>','<EMAIL>'),
(... |
-- Deploy roles/anonymous/role to pg
BEGIN;
DO $$
BEGIN
IF NOT EXISTS (
SELECT
1
FROM
pg_roles
WHERE
rolname = 'anonymous') THEN
CREATE ROLE anonymous;
COMMENT ON ROLE anonymous IS 'Anonymous group';
ALTER USER anonymous WITH NOCREATEDB;
... |
-- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Май 19 2014 г., 09:29
-- Версия сервера: 5.6.12-log
-- Версия PHP: 5.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 8.0.25 - MySQL Community Server - GPL
-- Server OS: Win64
-- HeidiSQL Version: 11.2.0.6213
-- ------------------------------------------------------... |
<filename>database/equipmentmagane (3).sql
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th5 30, 2019 lúc 04:09 AM
-- Phiên bản máy phục vụ: 10.1.38-MariaDB
-- Phiên bản PHP: 7.2.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START ... |
create database db_cursoDminhavida;
use db_cursoDminhavida;
create table tb_cate(
id_cat int not null auto_increment primary key,
tipoCur varchar(30) not null,
presen varchar(30) not null,-- solidos ou liquido
duracao varchar(12)
);
create table tb_prod(
id_prod int not null auto_increment primary key,
nomeCur varchar(... |
/*
Ensure that CLR is enabled within the SQL server instance
*/
USE master
GO
CREATE ASYMMETRIC KEY LookupPostcodedll_Key
FROM EXECUTABLE FILE = 'C:\SQLCLR_Postcode_Lookup.dll'
CREATE LOGIN CLR_LookupPostcode_Login FROM ASYMMETRIC KEY LookupPostcodedll_Key
GRANT EXTERNAL ACCESS ASSEMBLY TO [CLR_LookupPostcode_Login... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jun 26, 2021 at 06:12 AM
-- Server version: 5.7.26
-- PHP Version: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
CREATE DEFINER=`neon-user`@`localhost` PROCEDURE `prc_updateVendorRate`(
IN `p_AccountID` INT,
IN `p_TrunkID` INT,
IN `p_processId` INT,
IN `p_tbltempusagedetail_name` VARCHAR(200)
)
BEGIN
SET @stm = CONCAT('UPDATE NeonCDRDev.`' , p_tbltempusagedetail_name , '` ud SET buying_cost = 0,is_rerated=0 WHERE Proces... |
USE employeeTracker ;
INSERT INTO department (name)
VALUES ("IT"), ("HR"), ("MNGMT"), ("SALES"), ("DEV");
INSERT INTO role (title, salary, department_id)
VALUES
('Hardware Technician', 120000, 1),
('Network Administrator', 80000, 1),
('Technical Analyst', 70000, 1),
('Business Analyst', 100000, 4),
... |
DELETE FROM avt_kantonsstrassen_pub.achse;
DELETE FROM avt_kantonsstrassen_pub.bezugspunkt; |
<reponame>DataHandwerk/DataHandwerk-toolkit-mssql<filename>db_DataHandwerk/property/Views/RepoObjectColumnProperty_InheritanceType_resulting_InheritanceDefinition.sql
/*
--The result must be grouped to determine all required calculation variants of an inheritance
SELECT is_StringAggAllSources
, resulting_Inherit... |
ALTER TABLE claim ADD CONSTRAINT unique_claimant UNIQUE (claimant_id);
ALTER TABLE claimant ADD CONSTRAINT unique_address UNIQUE (address_id);
ALTER TABLE claimant ADD FOREIGN KEY (address_id) references address;
|
/****** Object: StoredProcedure [AddE06_Country] ******/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[AddE06_Country]') AND type in (N'P', N'PC'))
DROP PROCEDURE [AddE06_Country]
GO
CREATE PROCEDURE [AddE06_Country]
@Country_ID int OUTPUT,
@Parent_SubContinent_ID int,
@C... |
<filename>src/data_management/queries/key_points.sql
select *
from
(
SELECT
KeyPointID,
[Key Point],
PipelineID as [Pipeline Name],
[Latitude],
[Longitude],
[Description],
[Description FRA]
FROM [PipelineInformation].[dbo].[KeyPoint]
where [KeyPointID] not in ('KP0000', 'KP0064', 'KP0067', 'KP0065', 'KP0062', 'KP0063',... |
IF OBJECT_ID('trg_FiredStaffStatusUpdate','TR') IS NOT NULL
DROP TRIGGER trg_FiredStaffStatusUpdate
GO
CREATE TRIGGER trg_FiredStaffStatusUpdate
ON staffs
INSTEAD OF DELETE
AS
DECLARE @staffID INT
SELECT @staffID = staff_id FROM DELETED
UPDATE staffs SET active = 0, manager_id = NULL
WHERE staff_id = @staffID
|
-- Homework Queries
-------------------
-- 1. List the name(s) of the user(s) born in April who rated at most 8 for the movie 'Notebook'. Output their names sorted in descending order.
SELECT DISTINCT u.name
FROM users u, reviews r, movies m
WHERE u.id = r.user_id
AND EXTRACT(MONTH FROM u.date_of_birth) = 04
AND r.mo... |
ALTER TABLE identity_zone ADD COLUMN config LONGVARCHAR DEFAULT NULL; |
#namespace("goods")
#sql("findListPage")
SELECT
g.*,
gc.category_name AS categoryName,
gr.rule_name AS ruleName
FROM
joy_goods g
LEFT JOIN joy_goods_category gc ON g.category_id = gc.id
LEFT JOIN joy_goods_rule gr ON g.goods_rule_id = gr.id
WHERE
1=1
#if(query.categoryId)
... |
-- @since 1.29
ALTER TABLE /*$wgDBprefix*/externallinks ADD COLUMN el_index_60 varbinary(60) NOT NULL DEFAULT '';
CREATE INDEX /*i*/el_index_60 ON /*_*/externallinks (el_index_60, el_id);
CREATE INDEX /*i*/el_from_index_60 ON /*_*/externallinks (el_from, el_index_60, el_id);
|
<gh_stars>0
CREATE DATABASE projectsdb
CREATE TABLE project(
id SERIAL PRIMARY KEY,
title VARCHAR(255) UNIQUE,
description VARCHAR(255)
); |
<reponame>wernerholzapfel/supereleven2019<gh_stars>0
INSERT INTO public.round (name, period, "startDate", "predictionId") VALUES ('1', '["2019-08-02 20:00:00","2019-08-04 22:00:00"]', '2019-08-02 20:00:00.000000', 'ca6e325f-f711-4c9d-ad5d-c9ade8cd522f');
INSERT INTO public.round (name, period, "startDate", "predictionI... |
CREATE PROCEDURE ClienteConsultaPorNome
@Nome VARCHAR (50)
AS
BEGIN
SELECT
Codigo,
Nome,
CPF,
DataNascimento,
Sexo,
Telefone,
Celular,
CEP,
Endereco,
Bairro,
Cidade,
Estado,
Complemento,
Email,
... |
<reponame>britseye/ff<filename>createtables.sql<gh_stars>0
CREATE TABLE IF NOT EXISTS softcent_britseye.`ffmembers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` tinyint(1) NOT NULL DEFAULT '0',
`fid` varchar(50) DEFAULT NULL,
`moniker` varchar(50) DEFAULT NULL,
`pass` varchar(50) DEFAULT NULL,
`name` varc... |
/*
** Create a database named 'MyDb' and use it for rest of scripts in current
** folder.
*/
-- If database with name 'MyDb' does not exist
if not exists(select * from master.sys.databases where name = 'MyDb')
begin
-- Create the database
create database MyDb
-- Inform the user what happend
print 'Created the MyD... |
--
-- Add tables for genre
--
DROP TABLE IF EXISTS Genre;
CREATE TABLE Genre
(
id INT AUTO_INCREMENT PRIMARY KEY NOT NULL,
name CHAR(20) NOT NULL -- crime, svenskt, college, drama, etc
) ENGINE INNODB CHARACTER SET utf8;
INSERT INTO Genre (name) VALUES
('comedy'), ('romance'), ('college'),
('crime'), ('dram... |
<reponame>wf539/TK70-461<gh_stars>0
--Ch 2 Ex 2
----1. The following query returns 0 rows
SELECT
[shipperid]
, SUM([freight]) AS [Totalfreight]
FROM [Sales].[Orders]
WHERE
[freight] > 20000.00
GROUP BY
[shipperid]
--
----2.
SELECT
[shipperid]
, SUM([freight]) AS [Totalfreight]
FROM [Sales].[Orders]
HAVING [To... |
INSERT INTO municipality_court(municipality_id, court_id) VALUES (1, 1);
INSERT INTO municipality_court(municipality_id, court_id) VALUES (2, 2);
INSERT INTO municipality_court(municipality_id, court_id) VALUES (3, 3);
INSERT INTO municipality_court(municipality_id, court_id) VALUES (4, 4);
INSERT INTO municipality_cou... |
-- demo03 sample
-- Create a set of hard-coded metrics value to give users
-- a feel for how to generate them.
DROP TABLE IF EXISTS ts1;
CREATE TABLE ts1 (
id SERIAL NOT NULL UNIQUE, -- primary key
tstamp TIMESTAMPTZ NOT NULL,
metric TEXT NOT NULL,
value REAL NOT NULL
);
COMMENT ON TABLE ts1 IS 'Basic ti... |
/* 初始化数据 */
insert into cms_model(model_id, channel_template_prefix, content_template_prefix, name, path, has_content, valid_state, delete_flag)
values(1, '', '', '栏目和内容默认字段模型', 'path', '0', '0', '1');
insert into cms_model(model_id, channel_template_prefix, content_template_prefix, name, path, has_content, valid_st... |
/*
ADDRESSES Part 2 of 2
*/
PRINT N'Update data in [dbo].[uCommerce_Address] with data from [dbo].[uCommerce_Customer]'
UPDATE [dbo].[uCommerce_Address]
SET
[FirstName] = c.FirstName,
[LastName] = c.LastName,
[EmailAddress] = c.EmailAddress,
[PhoneNumber] = c.PhoneNumber,
[MobilePhoneNumber] = c.MobilePhoneN... |
<filename>schema/deploy/roles/fhir-uploader/grants.sql
-- Deploy seattleflu/schema:roles/fhir-uploader/grants to pg
-- requires: roles/fhir-uploader/create
-- requires: receiving/fhir
-- requires: warehouse/schema
-- requires: shipping/schema
begin;
-- This change is designed to be sqitch rework-able to make it easie... |
-- file:privileges.sql ln:968 expect:true
ALTER DEFAULT PRIVILEGES IN SCHEMA testns GRANT USAGE ON TYPES to public
|
<filename>migrations/20200508205355_GetResults.up.sql
create or alter view dbo.GetResults as
select top 2200 b.SurebetId,
b.SideIndex,
b.BetId,
b.ApiBetId,
l.BetStatus ApiBetStatus,
l.Price Price,
l.Risk Stak... |
<reponame>esteban14658/adnCeiba
select count(1) from jugador where documento = :documento |
drop sequence if exists hibernate_sequence
drop table if exists address cascade
drop table if exists useraccount cascade
drop table if exists useraccount_address cascade
create table address (id int8 not null, city varchar(255) not null, houseNumber int4, streetName varchar(255) not null, version int8, zipCode int4 not... |
<filename>spring-boot/transactions/src/main/resources/db/migration/V1.0.1__MODEL.sql
CREATE TABLE FOO
( ID INTEGER GENERATED BY DEFAULT AS IDENTITY
, DATA VARCHAR (255) NOT NULL
, CONSTRAINT FOO_PK PRIMARY KEY (ID)
);
CREATE TABLE BAR
( ID INTEGER ... |
<reponame>viswaratha12/dbwarden
/****** Object: StoredProcedure [dbo].[OverrideDTAGenForExternalDTA] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE OverrideDTAGenForExternalDTA
/****************************************************
**
** Desc:
** If settings file contains paramet... |
<reponame>chhavip/debaised-analysis<filename>intents/data/spider_eval/spider/database/device/schema.sql
version https://git-lfs.github.com/spec/v1
oid sha256:1366b367581dfe5b7cf27c5ede39ee398312c1f906d4bd20e790d08963db81d0
size 2357
|
drop table if exists t;
create table t (i int, j int) engine MergeTree order by i;
insert into t values (1, 2);
alter table t add projection x (select * order by j);
insert into t values (1, 4);
set allow_experimental_projection_optimization = 1, force_optimize_projection = 1;
select i from t prewhere j = 4;
SEL... |
# Host: localhost (Version: 5.5.53)
# Date: 2017-06-04 15:31:29
# Generator: MySQL-Front 5.3 (Build 4.234)
/*!40101 SET NAMES utf8 */;
#
# Structure for table "auth_rule"
#
DROP TABLE IF EXISTS `auth_rule`;
CREATE TABLE `auth_rule` (
`name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`data` blob,
`created... |
<gh_stars>1-10
-- takes 12195064.824 ms for select?
# gaia from here: https://arxiv.org/pdf/1804.09378.pdf
\timing
SELECT source_id into catalogdb.gaia_dr2_clean FROM catalogdb.gaia_dr2_source
WHERE parallax_over_error > 10
AND phot_g_mean_flux_over_error>50
AND phot_rp_mean_flux_over_error>20
AND phot_bp_m... |
--+ holdcas on;
drop table if exists foo;
select null into :x;
create table foo (id int) reuse_oid;
insert into foo values (0) into :x;
drop table if exists foo;
drop variable x;
--+ holdcas off;
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 29, 2018 at 04:23 PM
-- Server version: 5.5.8
-- PHP Version: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_... |
/*==============================================================*/
/* Table: S_USER */
/*==============================================================*/
create table S_USER
(
ID_ varchar(32) not null comment '用户标识,主键',
ACCOUNT_ v... |
<gh_stars>0
insert into city values
(3124673,"Congosto de Valdavia","ES",-4.63366,42.715839),
(3124675,"Congosto","ES",-6.52048,42.61755),
(6361289,"Conesa","ES",1.28158,41.5168),
(3124685,"Conesa","ES",1.3,41.51667),
(6357881,"Condemios de Arriba","ES",-3.10077,41.187462),
(3124693,"Condemios de Arriba","ES",-3.12543,... |
/****** Script for SelectTopNRows command from SSMS ******/
SELECT TOP (1000) [ID]
,[Name]
,[Age] + 1
FROM [Minions].[dbo].[PersonalData]
ORDER BY PersonalData.Name; |
<reponame>lamtq1209/lavarel-project<filename>php3.sql
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th12 07, 2021 lúc 10:37 AM
-- Phiên bản máy phục vụ: 10.4.17-MariaDB
-- Phiên bản PHP: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTI... |
-- ***************************************************************************
-- File: 8_27.sql
--
-- Developed By TUSC
--
-- Disclaimer: Neither Osborne/McGraw-Hill, TUSC, nor the author warrant
-- that this source code is error-free. If any errors are
-- found in this source code, please repo... |
IF OBJECT_ID('Report.FundingSummary_1618', 'U') IS NOT NULL
drop table Report.FundingSummary_1618
CREATE TABLE [Report].[FundingSummary_1618](
[SubGroupHeader] [varchar](150) NOT NULL,
[SortOrder] [int] NOT NULL,
[DataSetName] [varchar](100) NOT NULL,
[YTDCalc] [decimal](38, 5) NULL,
[TotalCalc] [decimal](38, 5)... |
-- subqueries another way to combine data from multiple tables
-- (Joins and Set operators are the other way)
-- every JOIN query can be converted into a subquery-based query.
-- we just use queries inside other queries with the help of some operators
-- IN, NOT IN, ANY, ALL , EXISTS
-- every track that has never b... |
<filename>database-admin.sql
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
--
-- Host: localhost Database: Admin_dashboard
-- ------------------------------------------------------
-- Server version 5.7.27-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD... |
# ************************************************************
# Sequel Pro SQL dump
# Versión 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.21)
# Base de datos: facturacion
# Tiempo de Generación: 2018-11-23 21:41:07 +0000
# *********************************... |
<gh_stars>1-10
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.8
-- Dumped by pg_dump version 9.6.8
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('sear... |
<filename>src/test/resources/sql/insert/4e1a8306.sql
-- file:join.sql ln:1644 expect:true
insert into dual default values
|
-- file:tinterval.sql ln:10 expect:true
INSERT INTO TINTERVAL_TBL (f1)
VALUES ('["-infinity" "infinity"]')
|
<filename>src/test/resources/sql/drop_index/979fabb4.sql
-- file:drop_if_exists.sql ln:256 expect:true
DROP INDEX IF EXISTS no_such_schema.foo
|
<filename>additional/college.sql
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 25, 2019 at 09:55 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zon... |
select count(*) from cast_tbl_1 a, cast_tbl_2 b where a.c_varchar = b.c_integer;
|
/*
Navicat MySQL Data Transfer
Source Server : 本地
Source Server Version : 50505
Source Host : localhost:3306
Source Database : shop
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2017-12-18 13:35:20
*/
SET FOREIGN_KEY_CHECKS=0;
-- -----------... |
CREATE TABLE IF NOT EXISTS `loginAttempts` (
`loginAttemptId` int(11) NOT NULL AUTO_INCREMENT,
`username` nvarchar(60) NOT NULL,
`timestamp` datetime NOT NULL,
`ipAddress` varchar(45) NOT NULL,
PRIMARY KEY (`loginAttemptId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
<gh_stars>1-10
INSERT INTO `customers` (`id`, `firstname`, `lastname`, `email`, `pass`, `cc_customerid`, `loggedin`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Mal', 'Zein', '<EMAIL>', '$2a$10$ZeZI4pPPlQg89zfOOyQmiuKW9Z7pO9/KvG7OfdgjPAZF0Vz9D8fhC', 'cus_EL08toK8pfDcom', 0, '2018-08-14 07:52:54', '2019-03-03... |
<reponame>ewengillies/dbt-datamocktool
{% macro dmt_raw_customers() %}
(
{% set records = [
[1,"Michael","P."],
[2,"Shawn","M."]
] %}
{% for record in records %}
select {{ record[0] }} as id, '{{ record[1] }}' as first_name, '{{ record[2] }}' as last_name
{% i... |
begin;
create table profiles(
id int primary key,
username text
);
insert into public.profiles(id, username)
values
(1, 'foo');
select jsonb_pretty(
graphql.resolve($$
query MyQuery {
__typename
profilesCollection {
... |
SELECT
IdTempPaciente as 'IdPersona',
Nombres,
Apellidos,
'' as 'FechaNacimiento',
'' as 'Direccion',
'' as 'Correo',
IdGeografia as 'IdGeografia',
'' as 'Genero',
1 as 'IdEstadoCivil',
'' as 'IdParentesco',
'' as 'Telefono',
'' as 'Celular',
'' as 'Alergias',
'' as 'Medicamentos',
'' as 'Enfermedad',
dui as 'Dui',
... |
-- @testpoint:opengauss关键字relative非保留),作为序列名
--关键字不带引号-成功
drop sequence if exists relative;
create sequence relative start 100 cache 50;
drop sequence relative;
--关键字带双引号-成功
drop sequence if exists "relative";
create sequence "relative" start 100 cache 50;
drop sequence "relative";
--关键字带单引号-合理报错
drop sequence if ... |
-- MySQL Script generated by MySQL Workbench
-- Fri May 3 15:04:02 2019
-- 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='TR... |
<reponame>spimdhanzal0444/pagination_sorting<filename>json.sql
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 09, 2022 at 09:26 PM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 7.4.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
S... |
<reponame>stylepatrick/spring-boot-keycloak-template
CREATE TABLE app
(
id SERIAL PRIMARY KEY,
text varchar
);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.