sql stringlengths 6 1.05M |
|---|
-- indexes for columns used in where condition in messaging app queries
CREATE INDEX notification_sending_status_index
ON notification (sending_status);
CREATE INDEX notification_send_only_after_index
ON notification (send_only_after);
CREATE INDEX notification_delivery_channel_index
ON notification (delivery_cha... |
drop table if exists t1;
create table t1(a int, b date, c nchar, d enum('red','yellow','blue','green'));
insert into t1 values(1,'2013-1-2',n'h',1);
insert into t1 values(1,'2013-1-2',n'h',1);
insert into t1 values(2,'2013-12-2',n'W',2);
insert into t1 values(2,'2013-10-12',n'w',2);
insert into t1 values(2,'2013-10-12... |
-- @testpoint: opengauss关键字enable(非保留),作为函数名,部分测试点合理报错
--关键字不带引号-成功
drop function if exists enable;
create function enable(i integer)
returns integer
as $$
begin
return i+1;
end;
$$ language plpgsql;
/
drop function if exists enable;
--关键字带双引号-成功
drop function if exists "enable";
create function "enable"(i integer... |
--按条件获取用户
IF EXISTS (SELECT * FROM sysobjects WHERE name = 'User_Query' AND schema_name(uid) = 'dbo')
DROP PROCEDURE dbo.User_Query;
GO
CREATE PROCEDURE dbo.User_Query
@NickName varchar(100),
@PageIndex int,
@PageSize int,
@Total int output
WITH ENCRYPTION
AS
SELECT @Total = count(*)
FROM ... |
<filename>sql/yjbb/603728.sql
EXEC [EST].[Proc_yjbb_Ins] @Code = N'603728',@CutoffDate = N'2017-09-30',@EPS = N'0.3685',@EPSDeduct = N'0',@Revenue = N'12.07亿',@RevenueYoy = N'13.71',@RevenueQoq = N'-0.79',@Profit = N'1.18亿',@ProfitYoy = N'15.02',@ProfiltQoq = N'-20.10',@NAVPerUnit = N'5.1356',@ROE = N'10.24',@CashPerUn... |
/* ---------------------------------------------------------------------------------------------------------------------------------
Routine Name: generateTestDataPackages.sql
Author: <NAME>
Date: 25/11/2020
--------------------------------------------------------------------------------------------------... |
/*
* Desarrollado por : DennisM.Andino
* Contactame a mi correo : <EMAIL>
* mi canal de Youtube: CodigoCompartido
* proyecto disponible en : https://github.com/dennis-andino/GT
*/
INSERT INTO ROLES(baseon,privilege, announcement, Messenger, ownsched, createtutoring, crudstudent, denytutoring, jointutoring, foro)
V... |
INSERT INTO t1 VALUES ('WARZONE') ON CONFLICT DO NOTHING;
|
<gh_stars>0
-- MySQL dump 10.13 Distrib 5.7.21, for macos10.13 (x86_64)
--
-- Host: localhost Database: bookmarks
-- ------------------------------------------------------
-- Server version 5.7.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_... |
/*
Navicat MySQL Data Transfer
Source Server : web
Source Server Version : 50154
Source Host : 192.168.3.11:3306
Source Database : weixinqiang
Target Server Type : MYSQL
Target Server Version : 50154
File Encoding : 65001
Date: 2014-02-21 13:52:34
*/
SET FOREIGN_KEY_CHECKS=0;
-- -... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Oct 28, 2020 at 04:45 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 27, 2019 at 04:19 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- Crear tabla
CREATE TABLE rest (
comida TEXT
);
|
CREATE TABLE [dbo].[Schools_Composite]
(
[EOHashInitial] VARBINARY (20) NOT NULL,
[EOHashAlternative] VARBINARY (20) NOT NULL,
CONSTRAINT [PK_Schools_Composite] PRIMARY KEY ([EOHashInitial],[EOHashAlternative])
)
GO
CREATE UNIQUE INDEX [UK_Schools_Composite_EOHashAlternative]
ON [dbo... |
USE MLtools;
GO
CREATE OR ALTER PROCEDURE Generator.GetDates
@DateData AS dbo.DateEntity READONLY
AS
/******************************************************************************
* Name : Generator.GetDates
* Purpose : Generates a table of random dates.
* Inputs : @DateData - table type of dates.
* Outputs ... |
ALTER ROLE postgres WITH PASSWORD '<PASSWORD>';
|
/*
Warnings:
- A unique constraint covering the columns `[name]` on the table `roles` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateTable
CREATE TABLE "_RoleToUser" (
"A" TEXT NOT NULL,
"B" TEXT NOT NULL
);
-- CreateIndex
CREATE UNIQUE INDEX "_RoleToUser_AB_unique" ON... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.2.6-MariaDB-log - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL Version: 9.4.0.5125
-- ---------------------------------------------... |
<reponame>ianlancaster/denverseocoach.com<gh_stars>0
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZON... |
select count(*) from demo_product_info |
<gh_stars>10-100
LOAD DATA LOCAL INFILE "__PathToCsv__"
INTO TABLE INDX_OBJIDO
CHARACTER SET 'latin1'
COLUMNS TERMINATED BY '__Separator__'
OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 LINES
(`Offset`, `Vcn`, `IsNotLeaf`, `LastLsn`, `FromIndxSlack`, `DataOffset`, `DataSize`, `Padding1`, `... |
-- trigger used for redirecting persistence to I18N description table $i18nTblName
create trigger ${triggerName}
instead of #if(${operation} == 'I') insert #elseif (${operation} == 'U') update #else delete #end on $i18nDetailTblName
referencing #if( ${operation} != 'D' ) new as new #end #if( ${operation} != 'I' ) old a... |
<gh_stars>10-100
INSERT INTO HELP_TOPIC (id, name) VALUES (8881, 'Getting Started');
INSERT INTO HELP_TOPIC (id, name) VALUES (8882, 'Application Usage');
INSERT INTO HELP_TOPIC (id, name) VALUES (8883, 'Features');
INSERT INTO HELP_TOPIC (id, name) VALUES (8884, 'About');
INSERT INTO HELP_ITEM (HELP_TOPIC_ID, TI... |
<gh_stars>1-10
-------------------------------------------------------------------------------
-- whitelist app
-------------------------------------------------------------------------------
CREATE TABLE WHITELIST_APP(
ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL,
NAME VARCHAR(5... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50720
Source Host : localhost:3306
Source Database : tools_manage
Target Server Type : MYSQL
Target Server Version : 50720
File Encoding : 65001
Date: 2018-11-04 13:27:43
*/
SET FOREIGN_KEY_CHECKS=0;
... |
INSERT INTO `db_patches` VALUES ('PHPOE-2088');
-- security_functions
UPDATE `security_functions` SET `_view` = 'Assessments.index|Assessments.view|Results.index' WHERE `id` = 1015;
|
<reponame>szw12asd/yii2
/**
* @package yii2-dynagrid
* @author <NAME> <<EMAIL>>
* @copyright Copyright © <NAME>, Krajee.com, 2015
* @version 1.4.1
*/
--
-- Table structure for table `tbl_dynagrid`
--
DROP TABLE IF EXISTS `tbl_dynagrid`;
CREATE TABLE `tbl_dynagrid` (
`id` varchar(100) NOT NULL COMMENT... |
<filename>database/mysql/src/main/resources/com/intel/mtwilson/database/mysql/20160728140000_add_pcr_banks.sql
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: dczech
... |
<filename>mail/SQL/mssql/2009103100.sql<gh_stars>10-100
-- Updates from version 0.3.1
ALTER TABLE [dbo].[messages] ADD CONSTRAINT [FK_messages_user_id]
FOREIGN KEY ([user_id]) REFERENCES [dbo].[users] ([user_id])
ON DELETE CASCADE ON UPDATE CASCADE
GO
ALTER TABLE [dbo].[cache] ADD CONSTRAINT [FK_cache_user_id... |
---- ALTER TABLE ... CHANGE COLUMN
-- ordering : change ordering
-- name : change or not
-- CLASS attribute
create class t1 class attribute( i1 integer, i2 integer ) (i3 integer);
update t1 set class t1.i1=1;
update t1 set class t1.i2=2;
insert into t1 set i3=10;
select class t1.i1, class t1.i2,i3 from t1 order by ... |
alter table achievements_hunt.games add icon_url varchar(1024);
alter table achievements_hunt.games add release_date varchar(255);
alter table achievements_hunt.achievements add icon_url varchar(1024);
alter table achievements_hunt.achievements add locked_icon_url varchar(1024);
create table achievements_hunt.companie... |
SET DEFINE OFF;
--SQL Statement which produced this data:
--
-- SELECT * FROM FIRE_ADM.SAGSEVENTINFO;
--
Insert into SAGSEVENTINFO
(OBJECTID, REGISTRERINGFRA, BESKRIVELSE, SAGSEVENTID)
Values
(67, TO_TIMESTAMP_TZ('10/12/2018 12:52:26.000000 +01:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'), 'Observationens indsættel... |
<filename>bd_incidencias.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 24-03-2020 a las 19:53:00
-- Versión del servidor: 10.1.35-MariaDB
-- Versión de PHP: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START... |
-- ***************************************************************************
-- File: 3_3.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 repor... |
--create database account_service default charset=utf8mb4;
CREATE TABLE IF NOT EXISTS `wechat_account` (
`open_id` bigint(20) NOT NULL,
`user_id` bigint(20) NOT NULL,
`create_time` datetime NOT NULL,
PRIMARY KEY (`open_id`)
) Engine=InnoDB default charset=utf8mb4;
--CREATE TABLE IF NOT EXISTS `username_a... |
-- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: ship
-- ------------------------------------------------------
-- Server version 8.0.22
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!401... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 22, 2020 at 01:24 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
drop procedure if exists Sp_Laydiemdanhgia;
delimiter //
CREATE PROCEDURE `Sp_Laydiemdanhgia`(in i int)
begin
select
d.IdDiadiem as Id,
count(bv.IdDiadiem) as review_count,
sum(bv.Diemdanhgia) as review_sum
from tbl_diadiem d
left join tbl_baiviet bv on bv.IdDiadiem = d.IdDiadiem
where d.IdDiadiem = i
gr... |
-- MySQL dump 10.13 Distrib 5.5.34, for debian-linux-gnu (i686)
--
-- Host: localhost Database: goiche
-- ------------------------------------------------------
-- Server version 5.5.34-0ubuntu0.12.04.1-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@... |
<reponame>Darknessteel/APIHogarMascotas
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 09-02-2021 a las 06:16:32
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET t... |
CREATE procedure GetCurrentActivities(
@branch_id int = null
)
as
begin
if(not exists(select 1
from incident i (nolock)
join enum_incident_type eit (nolock) on eit.id = i.incident_type and eit.need_to_be_started = 1
where
started_on is not null ... |
<gh_stars>0
-- <NAME>
UPDATE `creature_template` SET `minlevel`=26, `maxlevel`=26 WHERE `entry`=1663;
-- Kam Deepfury
UPDATE `creature_template` SET `minlevel`=27, `maxlevel`=27 WHERE `entry`=1666;
-- Defias Prisoner
UPDATE `creature_template` SET `maxlevel`=24, `faction`=17 WHERE `entry`=1706;
-- Defias Captive
UPD... |
Alter
TABLE user_group
RENAME tO "lamorosso"; |
/****** Object: StoredProcedure [GetDoc] ******/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[GetDoc]') AND type in (N'P', N'PC'))
DROP PROCEDURE [GetDoc]
GO
CREATE PROCEDURE [GetDoc]
@DocID int
AS
BEGIN
SET NOCOUNT ON
/* Get Doc from table */
... |
<reponame>aalperyilmaz/-Java-JPA-Spring-RestApi-VetClinic-Project<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 06 Eki 2021, 16:30:57
-- Sunucu sürümü: 10.4.20-MariaDB
-- PHP Sürümü: 7.3.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START... |
--------------------------------------------------------
-- DDL for Table BAREME
--------------------------------------------------------
CREATE TABLE "G11_FLIGHT"."BAREME"
( "CAT_NUM" NUMBER(2,0),
"BAREME_PLACE" NUMBER(3,0),
"BAREME_PTS" NUMBER(3,0)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 ... |
CREATE TABLE payment_pricepoints (
)
ENGINE = Log
|
CREATE DATABASE IF NOT EXISTS QQFishing default charset utf8 COLLATE utf8_general_ci;
use QQFishing;
CREATE TABLE `user` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(20) NOT NULL,
`username` varchar(50) NOT NULL,
`pw_hash` varchar(128) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEF... |
drop view if exists C_Invoice_Candidate_SelectionIncompleteGroups;
create or replace view C_Invoice_Candidate_SelectionIncompleteGroups as
select distinct
s.AD_PInstance_ID,
ic.C_Order_ID,
o.DocumentNo as OrderDocumentNo,
ic.C_Order_CompensationGroup_ID
from T_Selection s
inner join C_Invoice_Candidate ic on (ic.C_... |
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you ma... |
<reponame>dryks/diccionario
-- T33223: Remove obsolete ar_text and ar_flags columns
-- (and make ar_text_id not nullable and default 0)
ALTER TABLE archive
DROP COLUMN ar_text,
DROP COLUMN ar_flags,
ALTER COLUMN ar_text_id SET DEFAULT 0;
ALTER COLUMN ar_text_id SET NOT NULL;
|
alter table periksa_status_tagihan
drop column status_pembayaran; |
# changes for authentication scheme support
alter table users add column auth_scheme VARCHAR (50) NOT NULL after confirmkey;
update users set auth_scheme = 'daisy';
alter table users change column password password VARCHAR (50);
# changes for multi-value field support
alter table thefields add column value_seq bigint ... |
<gh_stars>0
--$Id$--
alter table REPORT_REPORT alter column REPORT_TYPE drop not null;
alter table REPORT_TEMPLATE alter column TEMPLATE_FILE_ID drop not null;
|
CREATE TABLE projects (
project_id SERIAL PRIMARY KEY NOT NULL,
project_name TEXT NOT NULL,
project_url TEXT,
project_license TEXT,
project_verified BOOLEAN NOT NULL,
project_auto_approvable BOOLEAN NOT NULL DEFAULT false
); |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 25, 2021 at 01:30 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.3.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... |
<filename>doc/metadata_ddl_script.sql<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50529
Source Host : localhost:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50529
File Encoding : 65001
Date: 2021-01-06 15... |
CREATE TABLE `menus` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
<gh_stars>1-10
CREATE TABLE IF NOT EXISTS sqllion_users (
user_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
first_name VARCHAR(20) NOT NULL,
last_name VARCHAR(40) NOT NULL,
email VARCHAR(60) NOT NULL,
pass VARCHAR(256) NOT NULL,
reg_date DATETIME NOT NULL,
battalion ENUM("1s... |
drop table if exists member_profile;
CREATE TABLE member_profile (
uuid varchar PRIMARY KEY,
name varchar,
role varchar,
pdlId varchar,
location varchar,
workEmail varchar,
insperityId varchar,
startDate date,
bioText varchar
);
drop table if exists checkins;
CREATE TABLE checkins (
id va... |
DROP USER webgoat_guest CASCADE;
CREATE USER webgoat_guest IDENTIFIED BY webgoat DEFAULT TABLESPACE users;
GRANT CONNECT, RESOURCE TO webgoat_guest;
GRANT CREATE PROCEDURE TO webgoat_guest;
CREATE TABLE WEBGOAT_guest.EMPLOYEE (
userid INT NOT NULL PRIMARY KEY,
first_name VARCHAR(20),
last_name VARC... |
<reponame>rodel-talampas/gpdb<gh_stars>1-10
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
insert into test_fastseqence select i , 'aa'||i from generate_series(1,100) i;
|
--primary key (on multiple columns) related change
create table coo(col1 double not null, col2 char varying(10), col3 list, col4 bit varying(20), primary key(col1, col2, col4));
insert into coo values(111.11111, 'aaa', {1, 2, 3}, B'10010');
insert into coo values(222.22222, 'aaa', {1, 2, 3}, B'01011');
insert into c... |
<gh_stars>1-10
--test rw column with joining 2 tables
create table "join"(
"insert" int,
"from" char(10),
"key" time
);
create table "like"(
"into" int,
"order" char(10),
"limit" enum('aa', 'bb', 'cc')
);
insert into "join" values(1, 'a', '1:1:1');
insert into "join" values(2, 'b', '1:1:1');
insert into "join"... |
<reponame>mkoula/dibi-postgres
IF OBJECT_ID('orders', 'U') IS NOT NULL DROP TABLE orders;
IF OBJECT_ID('products', 'U') IS NOT NULL DROP TABLE products;
IF OBJECT_ID('customers', 'U') IS NOT NULL DROP TABLE customers;
CREATE TABLE products (
product_id int NOT NULL IDENTITY(11,1),
title varchar(50) NOT NULL,
PRIMA... |
GRANT USAGE ON *.* TO 'adbcj-other-user'@'localhost';
DROP USER 'adbcj-other-user'@'localhost';
CREATE USER 'adbcj-other-user'@'localhost' IDENTIFIED BY 'adbcj-other-user';
GRANT ALL PRIVILEGES ON * . * TO 'adbcj-other-user'@'localhost';
DROP TABLE IF EXISTS simple_values;
CREATE TABLE simple_values (
int_val int... |
<filename>sql/init.sql
CREATE TABLE IF NOT EXISTS `packages` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'primary key',
`gmt_create` datetime(3) NOT NULL COMMENT 'create time',
`gmt_modified` datetime(3) NOT NULL COMMENT 'modified time',
`package_id` varchar(24) NOT NULL COMMENT 'package id',
`... |
<filename>trains/schema.sql
DROP TABLE IF EXISTS trains;
CREATE TABLE trains (
id INTEGER PRIMARY KEY AUTOINCREMENT,
trainNumber TEXT UNIQUE NOT NULL,
origin TEXT NOT NULL,
destination TEXT NOT NULL
) |
<filename>Administratives-China(Street)-6.sql
/*
* _____ ______
* /_ / ____ ____ ____ _________ / __/ /_
* / / / __ \/ __ \/ __ \/ ___/ __ \/ /_/ __/
* / /__/ /_/ / / / / /_/ /\_ \/ /_/ / __/ /_
* /____/\____/_/ /_/\__ /____/\____/_/ \__/
* /____... |
-- Adminer 4.5.0 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
SET NAMES utf8mb4;
DROP TABLE IF EXISTS `brands`;
CREATE TABLE `brands` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`status` tinyint(1) NOT NULL DE... |
<reponame>asimshazad/GEL_Assessment
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 13, 2021 at 01:17 AM
-- Server version: 10.3.31-MariaDB-0ubuntu0.20.04.1
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
ST... |
use AdventureWorks2008R2
go
/**********************************************************************************************************************************/
--Trivial, no attribute
select *
from Sales.SalesPerson
/*****************************************************************... |
<reponame>AdamAndersonFalafelSoftware/FalafelDB<gh_stars>0
exec dbo.drop_if_exists 'dbo.aspnet_CreateUser'
go
-- Helper procedure to create asp.net membership users in SQL
create procedure dbo.aspnet_CreateUser
@ApplicationName nvarchar(256),
@UserName nvarchar(256),
@Password nvarchar(128),
@Email nvarchar(256),
... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.0-3.el7.remi
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Creato il: Mar 30, 2022 alle 01:49
-- Versione del server: 10.5.10-MariaDB
-- Versione PHP: 7.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Feb 02, 2018 at 11:10 AM
-- Server version: 10.1.25-MariaDB-1
-- PHP Version: 7.1.11-0ubuntu0.17.10.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
<gh_stars>0
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: itstore
-- ------------------------------------------------------
-- Server version 5.7.19-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 10, 2017 at 02:34 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
-- 1 up
create table if not exists relations (
id serial primary key,
name text
);
|
-- UPDATE: 2018-07-10
-- * ADDS PROFILE_IMAGE FIELD TO USERS TABLE
ALTER TABLE users ADD profile_image VARCHAR(75) NULL;
|
<reponame>Didikabdul1997/tokobuah
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jun 12, 2019 at 07:45 PM
-- Server version: 10.1.40-MariaDB-0ubuntu0.18.04.1
-- PHP Version: 7.2.19-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET ti... |
<filename>migreringer/src/main/resources/db/migration/defaultDS/1.0/V1.1_16__fjern_antall_timer.sql
alter table IAY_AKTIVITETS_AVTALE drop antall_timer cascade;
alter table IAY_AKTIVITETS_AVTALE drop antall_timer_fulltid cascade;
|
<reponame>aliakseimaniuk/blog-examples
CREATE TABLE [Warehouse].[StockItemHoldings] (
[StockItemID] INT NOT NULL,
[QuantityOnHand] INT NOT NULL,
[BinLocation] NVARCHAR (20) NOT NULL,
[LastStocktakeQuantity] INT NOT NULL,
[LastCostPric... |
CREATE TABLE [VMBackup].[ActionState]
(
[Id] INT IDENTITY(1,1) NOT NULL,
[ActionStateName] NVARCHAR(128) NOT NULL,
CONSTRAINT [PK_ActionState] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
... |
<reponame>blackcatdevs/Strava<gh_stars>1-10
CREATE PROCEDURE Landing.SP_get_activities
@before_date DATETIME = NULL,
@after_date DATETIME = NULL,
@page VARCHAR(5) = NULL,
@per_page VARCHAR(5) = NULL --max is 200
AS
--get activities, for last 2 days if not called with parameters
--this requires a valid ac... |
--
-- Find the lung disorders with an associated morphology equal to edema
-- Expression Constraint: < 19829001 |disorder of lung|: 116676008 |associated morphology| = 79654002 |edema|
--
SELECT tc.subtypeId, pt.term
FROM snap_transclose as tc,
snap_pref as pt
WHERE tc.supertypeId = 19829001
AND pt.conceptId = tc.sub... |
<reponame>athas/mlk
drop table employee;
create table employee (
email varchar(200) primary key not null,
name varchar(200) not null,
passwd varchar(200) not null,
note varchar(2000),
last_modified date
);
insert into employee (name, email, passwd)
... |
<reponame>ThatSkiPatroller/UTA-AUS-FSF-PT-12-2020-U-C
DROP DATABASE IF EXISTS top_songsDB;
CREATE database top_songsDB;
USE top_songsDB;
CREATE TABLE top5000 (
position INT NOT NULL,
artist VARCHAR(100) NULL,
song VARCHAR(100) NULL,
year INT NULL,
raw_total DECIMAL(10,4) NULL,
raw_usa DECIMAL(10,4) NULL,
... |
-- Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
-- SPDX-License-Identifier: Apache-2.0
---------------------------------------------------------------------------------------------------
-- V100: Append-only schema
--
-- This is a major redesign of the index database... |
CREATE TABLE text_messages(
id serial PRIMARY KEY,
message varchar(255) NOT NULL
);
|
<gh_stars>1-10
-- Add the "id" column and make it the primary key
SELECT fn_db_add_column('gluster_volume_bricks', 'id', 'UUID');
UPDATE gluster_volume_bricks set id = uuid_generate_v1();
ALTER TABLE gluster_volume_bricks DROP CONSTRAINT pk_gluster_volume_bricks;
ALTER TABLE gluster_volume_bricks ADD CONSTRAINT pk_glus... |
<reponame>DavidBenko/gateway
CREATE TABLE IF NOT EXISTS "push_devices" (
"id" SERIAL PRIMARY KEY,
"push_channel_id" INTEGER NOT NULL,
"name" TEXT NOT NULL,
"type" TEXT NOT NULL,
"token" TEXT NOT NULL,
"expires" INTEGER NOT NULL,
"data" JSONB NOT NULL,
UNIQUE ("push_channel_id", "name"),
FOREIGN KEY("p... |
<reponame>zishuimuyu/jeewx<gh_stars>100-1000
SELECT * FROM qywx_newstemplate AS qn where 1=1
<#include "QywxNewstemplateDao_condition.sql"> |
-- Your SQL goes here
create table mud_data
(
url text not null primary key,
data text not null,
created_at timestamp not null,
expiration timestamp not null
)
|
<reponame>GiorgioCaculli/B3_Application_Entreprise_Multi-Tiers_et_Veille_Technologique
-- Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (https://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
select sign(null) en, sign(10) e1, sign(0) e0, sign(-0.1) em1;
> ... |
<reponame>opengauss-mirror/Yat
-- @testpoint:opengauss关键字limit(保留),作为游标名
--前置条件
drop table if exists limit_test cascade;
create table limit_test(cid int,fid int);
--关键字不带引号-失败
start transaction;
cursor limit for select * from limit_test order by 1;
close limit;
end;
--关键字带双引号-成功
start transaction;
cursor "limit" fo... |
<filename>openGaussBase/testcase/KEYWORDS/resource/Opengauss_Function_Keyword_Resource_Case0035.sql
-- @testpoint: opengauss关键字resource(非保留),设置角色使用的resource pool名称
--step1:查看资源池信息; expect:成功
select * from pg_resource_pool;
--step2:设置角色使用的resource pool名称; expect:成功
DROP ROLE if exists manager;
CREATE ROLE manager RESO... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 12-Ago-2019 às 15:15
-- Versão do servidor: 10.1.13-MariaDB
-- PHP Version: 5.6.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
CREATE TABLE `collection` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`owner` int unsigned NOT NULL,
`public` tinyint(1) NOT NULL DEFAULT 0,
`created_at` int unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
FOREIGN KEY (`owner`) REFERENCES `user` (`id`)
... |
<reponame>CodyYuill/Burger-Bars
### Schema
CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE waiting
(
id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(120)
);
CREATE TABLE devoured
(
id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(120)
);
|
<filename>Programs_2.sql
[1] /*The SQL IN Operator
The IN operator allows you to specify multiple values in a WHERE clause.
The IN operator is a shorthand for multiple OR conditions.*/
SELECT column_name(s)
FROM table_name
WHERE column_name IN (value1, value2, ...);
[2] /*The SQL BETWEEN Operator*/
SELECT column_nam... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.