sql stringlengths 6 1.05M |
|---|
DROP TABLE IF EXISTS ts_events CASCADE;
|
<reponame>microsoft/AzureSynapseScriptsAndAccelerators
-- Query for: 26. Applications
SELECT AppId, COUNT(*) AS Queries FROM pdcrinfo.dbqlogtbl_hst
where StartTime >= CURRENT_TIMESTAMP - INTERVAL '7' DAY
and StartTime < CURRENT_TIMESTAMP
GROUP BY AppId;
|
create table ability
(
id bigint not null auto_increment,
color varchar(255),
description varchar(255),
name varchar(255),
member_id bigint,
parent_id bigint,
primary key (id)
) engine=InnoDB;
create table ability_graph
(
id bigint not null auto_incremen... |
DECLARE exit handler for sqlexception
begin
select 1;
end; |
-- 2018-01-08T12:37:27.630
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Window (AD_Client_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsBetaFunctionality,IsDefault,IsOneInstanceOnly,IsSOTrx,Name,Processing,Updated,UpdatedBy,WindowType,WinHeight,WinWidth) VALUES (0... |
<gh_stars>0
-- Adminer 4.7.5 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
DELIMITER $$
DROP PROCEDURE IF EXISTS `ezpApp`$$
CREATE PROCEDURE `ezpApp`(
IN `app` VARCHAR(64) CHARSET ascii
)
BEGIN
SELECT
SUM(`ezp_estimate`.`hours`) AS `Total_Estimated`
,ROUND(SUM(`ezp_estimate`.`hours`*(100-`e... |
<filename>integration_tests/models/generic_tests/test_equal_rowcount.sql
with data as (select * from {{ ref("data_test_equal_rowcount") }})
select field
from data
|
<filename>database/mkcms.sql
# Host: 127.0.0.1:33060 (Version 5.7.22-0ubuntu18.04.1)
# Date: 2019-03-20 11:44:07
# Generator: MySQL-Front 6.1 (Build 1.26)
#
# Structure for table "mkcms_category"
#
CREATE TABLE `mkcms_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(200) NOT NULL DEFAULT '' C... |
INSERT INTO person (address,first_name,gender,last_name) VALUES ('Joinville','Miguel','Male','Bertemes');
INSERT INTO person (address,first_name,gender,last_name) VALUES ('Joinville','Rogeria','Female','Bertemes');
INSERT INTO person (address,first_name,gender,last_name) VALUES ('Joinville','Reginaldo','Male','Costa'); |
<reponame>angujo/ETL-CDMBuilder<filename>source/org.ohdsi.cdm.framework.etl/org.ohdsi.cdm.framework.etl.optumpanther/ETL/OPTUMPANTHER/CdmSource.sql
truncate table {sc}.CDM_SOURCE;
truncate table {sc}.CDM_DOMAIN_META;
INSERT INTO {sc}.CDM_SOURCE
(CDM_SOURCE_NAME
,CDM_SOURCE_ABBREVIATION
... |
<filename>src/app/voltdb/voltdb_src/tests/testprocs/org/voltdb_testprocs/regressionsuites/fixedsql/fixed-sql-ddl.sql
CREATE TABLE VarcharBYTES(
ID INTEGER DEFAULT 0 NOT NULL,
var2 VARCHAR(2 BYTES),
var80 VARCHAR(80 BYTES),
PRIMARY KEY (ID)
);
CREATE TABLE VarcharTB (
ID INTEGER DEFAULT 0 NOT NULL,
var2 VAR... |
<gh_stars>0
-- @testpoint:opengauss关键字checked(非保留),作为用户名
--关键字checked作为用户名不带引号,创建成功
drop user if exists checked;
CREATE USER checked PASSWORD '<PASSWORD>';
--清理环境
drop user checked;
--关键字checked作为用户名加双引号,创建成功
drop user if exists "checked";
CREATE USER "checked" PASSWORD '<PASSWORD>';
--清理环境
drop user "checked";
--... |
-- --------------------------------------------------------
-- Хост: 127.0.0.1
-- Версия сервера: 5.7.27-log - MySQL Community Server (GPL)
-- Операционная система: Win64
-- HeidiSQL Версия: 11.0.0.5919
-- -------------------------------------------------------... |
<gh_stars>0
USE linkServicesGroup;
INSERT INTO OtherLanguages (languageName) VALUES
('Indigenous Australian'), ('Torres Strait Islander'), ('Arabic'), ('Bengali'),
('Cantonese'), ('Croatian'), ('Czech'), ('French'),
('German'), ('Greek'), ('Hebrew'), ('Hindi'),
('Hungarian'), ('Indonesian'), ('Italian'), ('Japanese'),... |
<gh_stars>0
CREATE TABLE IF NOT EXISTS commands (
id int(11) NOT NULL AUTO_INCREMENT,
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=45202 ;
|
<gh_stars>0
set serveroutput on;
-- Drop Tables
drop table toll_rate cascade constraints;
drop table exit_road cascade constraints;
drop table discount_rate cascade constraints;
drop table message cascade constraints;
drop table video_bill cascade constraints;
drop table payment cascade constraints;
drop table trip cas... |
<gh_stars>1-10
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[AnswerChoice](
[Id] [nvarchar](128) NOT NULL,
[QuestionId] [nvarchar](128) NOT NULL,
[Text] [nvarchar](max) NULL,
[Points] [tinyint] NOT NULL CONSTRAINT [DF_AnswerChoice_Points] DEFAULT ((0)),
CONSTRAINT [PK_AnswerChoice] PRIMA... |
CREATE TABLE short_url
(
pk_id_shorturl smallserial NOT NULL,
modified_at timestamp NOT NULL,
remote_ip inet NOT NULL,
local_ip inet NOT NULL,
local_port integer DEFAULT(1337),
instance_id uuid NOT NULL
); |
-- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 03, 2016 at 03:07 PM
-- Server version: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... |
-- DATA IMPORT
SET IDENTITY_INSERT dbo.location ON
INSERT INTO dbo.location (id,location_name,active) VALUES (1,'Murfreesboro',1);
INSERT INTO dbo.location (id,location_name,active) VALUES (2,'Shelbyville',1);
INSERT INTO dbo.location (id,location_name,active) VALUES (3,'Smyrna',1);
SET IDENTITY_INSERT dbo.location OFF... |
UPDATE item SET `USERCHANGABLE` = 1; |
<filename>5-Mybatis/SQL/mybatis-procedure1.sql
-- get all user info by user_id
CREATE PROCEDURE select_user_by_id
@userId BIGINT,
@userName VARCHAR(50) Output,
@userPassword VARCHAR(50) Output,
@userEmail VARCHAR(50) Output,
@userInfo TEXT Output,
@headImg TEXT Output,
@createTime DATETIME Output
AS
BEGIN
SELEC... |
connect 'jdbc:derby://localhost:1527/city_aaa;create=true';
drop table cities;
create table cities (id varchar(10), name varchar(20), population int, date_mod date);
commit;
quit;
|
<reponame>DzonnyDZ/Caps
ALTER TABLE [dbo].[StoredImage]
ADD CONSTRAINT [PK_StoredImage] PRIMARY KEY CLUSTERED ([StoredImageID] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF);
|
<reponame>vinterra/portal-distribution
create index IX_A9B43C55 on SyncDLFileVersionDiff (expirationDate);
create index IX_F832A75D on SyncDLFileVersionDiff (fileEntryId);
create unique index IX_AC4C7667 on SyncDLFileVersionDiff (fileEntryId, sourceFileVersionId, targetFileVersionId);
create index IX_980323CB on SyncD... |
INSERT INTO `foodie`.`image`
VALUES ('1', 'Deals icon', 'https://d4p17acsd5wyj.cloudfront.net/shortcuts/deals.png');
INSERT INTO `foodie`.`category`
VALUES (1, 'Deals', 1, 'Deals', '1');
INSERT INTO `foodie`.`image`
VALUES ('2', 'Top Eats icon', 'https://d4p17acsd5wyj.cloudfront.net/shortcuts/top_eats.png');
INSERT IN... |
create function dbo.fn_CLR_ShouldntTriggerUnusedParameterWarnings(@StringToProperCase [nvarchar](4000), @TreatAsName [nchar](1))
returns [nvarchar](4000) with execute as caller
as
external name [ProperCase].[ProperCase.Functions].[ProperCase] |
<filename>sql/users.sql
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50553
Source Host : localhost:3306
Source Database : tp5
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-04-21 22:24:06
*/
SET FOREIGN... |
<reponame>device42/DOQL_scripts_examples
/*
- Name: cloud storage
- Purpose: provides details on discovered Cloud storage services.
- Date Created: 10/01/20
- Updated - 4/15/21
- Change view_device_v1 to view_device_v2
*/
Select DISTINCT
ci.cloudinfrastructure_name "Cloud Infrastructure Name"
,ci.accoun... |
<reponame>Eroschang/ranger
-- 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
-- (... |
DELETE FROM search_osm
WHERE
id IN
(SELECT
-- search3.id_link,
-- search3.type_link,
-- search3.district,
search3.id
FROM
(SELECT
search2.id,
search2.id_link,
search2.type_link,
search2.district,
-- search1.region,
bool_and(ST_Disjoint(search1.geom, search2.geom)) as ifdelete
FR... |
<reponame>frankarinze/onepipe<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: May 30, 2019 at 03:06 PM
-- Server version: 5.7.26
-- PHP Version: 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET tim... |
<filename>seckill.sql<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50553
Source Host : localhost:3306
Source Database : seckill
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-07-19 10:07:46
*/... |
<filename>sql/create_table_distance.sql<gh_stars>0
-- ========== ========== ========== ========== ==========
-- DROP TABLE `distance`
DROP TABLE IF EXISTS distance;
-- ========== ========== ========== ========== ==========
-- CREATE TABLE `distance`
CREATE TABLE `distance` (
`odo_id` INTEGER PRIMARY KEY AUTOINCREMENT... |
/* Problem 9. *Peaks in Rila */
USE "Geography";
SELECT
m.MountainRange,
p.PeakName,
p.Elevation
FROM
"Peaks" AS p
INNER JOIN
"Mountains" AS m
ON
p.MountainId = m.Id
WHERE
p.MountainId = 17
ORDER BY
Elevation DESC; |
select peak_name from peaks
order by peak_name; |
<reponame>joelbd/nvsbl
-- DROP TABLE `images_tags`;
-- DROP TABLE `images`;
-- DROP TABLE `tags`;
CREATE TABLE `images` (
`id` varchar(32) NOT NULL, -- MD5
`fileName` varchar(100) NOT NULL,
`fileType` int NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
CREATE TABLE `tags` (
`tag` varchar(100) NOT NULL,
PR... |
INSERT INTO Makes(name)
VALUES("Acura"),("<NAME>"),("<NAME>"),
("BMW"),("Buick"),("Cadillac"),
("Chevrolet"),("Chrysler"),("Dodge"),("Ferrari"),
("Fiat"),("Ford"),("GMC"),("Honda"),("Infiniti"),("Jaguar"),("Jeep"),
("Lamborghini"),("<NAME>"),("Lexus"),("Maserati"),
("McLaren"),("Mitsubishi"),("Porsche"),("RAM"),
("<NAM... |
DROP TABLE IF EXISTS `knoten_lauenburg`;
CREATE TABLE `knoten_lauenburg` (
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`routername` varchar(500) NULL DEFAULT NULL UNIQUE,
`email` varchar(500) NULL DEFAULT NULL,
`key` varchar(500) NULL DEFAULT NULL UNIQUE,
`location` varchar(500) NULL DEFAULT NULL,
`edit` ... |
ALTER TABLE public.redirect_log DROP COLUMN ip_addr;
ALTER TABLE public.redirect_log DROP COLUMN country;
ALTER TABLE public.redirect_log DROP COLUMN referer; |
<reponame>flpoliveira/obi
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 28-Fev-2020 às 04:28
-- Versão do servidor: 10.4.11-MariaDB
-- versão do PHP: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = ... |
<reponame>Phelipe-Sempreboni/databases
-- Comando para verificação infos de owner, tablename, tablespace, cluster, etc.
-- DBA_TABLES - Contem as informações sobre todas as tabelas do banco de dados.
SELECT * FROM DBA_TABLES; |
-- Crime max by year
select max(*) max from crimes whee date_part('year', occurred_at) = :year
-- Crime count by ward for year.
select ward, count(*) from crimes where date_part('year', occurred_at) = 2011 and trim(ward) != '' group by ward order by ward::integer;
-- Crime count by date for year and ward.
select date... |
<filename>typescript/db/migrations/20211022143500_store_stripe_customer_id_in_the_workspace_rather_than_the_subscription/migration.sql
/*
Warnings:
- You are about to drop the column `stripeSubscriptionId` on the `Workspace` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "Workspace" ... |
DROP DATABASE IF EXISTS employee_trackerDB;
CREATE DATABASE employee_trackerDB;
USE employee_trackerDB;
CREATE TABLE department(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(30) NOT NULL,
PRIMARY KEY(id)
);
CREATE TABLE role(
id INT NOT NULL AUTO_INCREMENT,
title VARCHAR(30) NOT NULL,
salary DECIMAL(10, 3),
departm... |
<filename>sqlserver/scripts/sakila/store.sql
SET IDENTITY_INSERT store ON
Insert into store
(store_id,manager_staff_id,address_id,last_update)
Values
('1','1','1','2006-02-15T04:57:12.000')
;
Insert into store
(store_id,manager_staff_id,address_id,last_update)
Values
('2','2','2','2006-02-15T04:57:12.000')
;
SET IDE... |
<reponame>mihai-constantin/ACS
SELECT
id_dep "Nr. departament",
nume,
functie,
salariu,
data_ang AS "Data Angajarii"
FROM angajati
WHERE LOWER(functie) = 'manager'
ORDER BY id_dep; |
set names utf8;
drop table if exists t;
create table t(s1 string collate utf8_ko_cs, s2 string collate utf8_ko_cs_uca);
insert into t values('a','a');
select collation('a'||s1),collation(s2) from t;
select 'a'||s1||s2 from t;
select s1||'a'||s2 from t;
select s1||s2||'a' from t;
select s1 collate utf8_ko_cs || s2 || ... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 23, 2022 at 06:46 AM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 8.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<reponame>geophile/sql-layer
CREATE TABLE binaryformat(
id INT NOT NULL PRIMARY KEY,
bin1 char(32) FOR BIT DATA,
bin2 varchar(32) FOR BIT DATA
); |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Waktu pembuatan: 09 Feb 2020 pada 16.44
-- Versi server: 10.4.6-MariaDB
-- Versi PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
<reponame>DanielGuerrero94/atyc
alter table alumnos.funciones add column updated_at date;
alter table alumnos.funciones add column created_at date;
alter table pac.pacs_destinatarios drop constraint fk_destinatario;
alter table pac.pacs_destinatarios add constraint fk_destinatario foreign key (id_destinatario) referenc... |
<gh_stars>0
/**
* Author: <NAME>
* Created: 26 nov. 2021
* Last Modify: 26 nov. 2021
*/
/* Creo la base de datos DAW2xxxDBDepartamentos */
create database if not exists DB219DWESLoginLogoutTema5;
/* Creo el usuario */
-- create user if not exists 'user219DWESLoginLogoutTema5'@'%' identif... |
<reponame>hjsu/forum
DELETE FROM POSTS;
DELETE FROM TOPICS;
DELETE FROM FORUMS;
DELETE FROM CATEGORIES;
DELETE FROM USERS; |
EXEC sp_rename 'dbo.Kore_Plugins_Google_Sitemap', 'Kore_SitemapConfig';
GO
ALTER TABLE Kore_Blog
ADD MetaKeywords nvarchar(255) NULL
GO
ALTER TABLE Kore_Blog
ADD MetaDescription nvarchar(255) NULL
GO
|
<filename>src/main/resources/db/migration/V190__Add_Instructor_Role.sql<gh_stars>1-10
INSERT INTO `Roles` (`Name`) VALUES ('instructor');
|
ALTER TABLE webpage_webpage ADD COLUMN sortIndex SMALLINT;
UPDATE webpage_webpage SET sortIndex = (ctid::text::point)[1]::smallint; |
CREATE TABLE IF NOT EXISTS Storedsearch (
_id int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT ,
user_id int(11) NOT NULL,
createdAt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
updatedAt datetime DEFAULT NULL,
name VARCHAR(255) NOT NULL,
search TEXT NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER T... |
<reponame>Shuttl-Tech/antlr_psql
-- file:polymorphism.sql ln:717 expect:true
select * from dfunc(a := 'Hello', c := 100)
|
-- Name: TABLE events; Type: ACL; Schema: public; Owner: -
--
GRANT ALL ON TABLE public.events TO client;
--
|
<reponame>dram/metasfresh<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5502735_sys_gh4652-app_migrate_AD_Field_Trl_to_AD_Element_Trl.sql<gh_stars>1000+
ALTER TABLE AD_Element_Trl ADD COLUMN AD_Field_Saved_ID numeric(10,0);
ALTER TABLE AD_Field_Trl ADD COL... |
<reponame>LukeChow1018/weixin
DELETE FROM `wp_attribute` WHERE model_id = (SELECT id FROM wp_model WHERE `name`='youaskservice_group' ORDER BY id DESC LIMIT 1);
DELETE FROM `wp_model` WHERE `name`='youaskservice_group' ORDER BY id DESC LIMIT 1;
DROP TABLE IF EXISTS `wp_youaskservice_group`;
DELETE FROM `wp_attribute`... |
/*
** Copyright (c) 2008-2009, by the California Institute of Technology.
** ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
**
** $Id: load_oco_policy.sql 4686 2010-04-02 00:02:50Z gangl $
*/
/*
** This script loads the OCO dataset policy for the Inventory schema.
*/
/*
** Collection
*/
INSERT INTO c... |
<gh_stars>1-10
rem usage notes:
rem sqlplus sys/change_on_install@orcl @db/create-lucene-role.sql
rem run on the server machine, because it use dbms_java.loadjava
set long 10000 lines 140 pages 50 timing on echo off
set serveroutput on size 1000000
-- Drops
DECLARE
TYPE obj_arr IS TABLE OF VARCHAR2(30);
DRP_STMT VA... |
-- name: create-table-builds
CREATE TABLE IF NOT EXISTS builds (
build_id INTEGER PRIMARY KEY AUTOINCREMENT
,build_repo_id INTEGER
,build_trigger TEXT
,build_number INTEGER
,build_parent INTEGER
,build_status TEXT
,build_error TEXT
,build_event TEXT
,build_a... |
-- Name: GetUploadStatistics
-- Schema: posda_files
-- Columns: ['import_type', 'latest', 'earliest', 'num_import_events', 'num_files']
-- Args: []
-- Tags: ['statistics']
-- Description: Get Summary of import events
--
select
distinct import_type, max(import_time) as latest, min(import_time) as earliest,
count(d... |
CREATE DATABASE IF NOT EXISTS hideout;
CREATE TABLE IF NOT EXISTS hideout.m_users (
m_user_id INT(3) NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT 'ユーザID',
m_user_username VARCHAR(100) NOT NULL COMMENT 'ユーザ名称',
m_user_hashed_password VARCHAR(256) NOT NULL COMMENT '<PASSWORD>スワード'
) engine=InnoDB COMMENT='ユーザマスタ';
... |
<gh_stars>0
CREATE TABLE [portal].[ModuleHistory]
(
[Id] INT IDENTITY (1, 1) NOT NULL,
[ModuleId] INT NOT NULL,
[Time] DATETIME2(3) DEFAULT SYSDATETIME() NOT NULL,
[Change] NVARCHAR(MAX) NOT NULL,
CONSTRAINT [PK_ModuleHis... |
alter table if exists Dataset
drop constraint if exists FKtnwjerv439jr4lmc37uvdp6ha;
alter table if exists Rule
drop constraint if exists FKmf1c6t4ld9isrgivjddortper;
drop table if exists Dataset cascade;
drop table if exists File cascade;
drop table if exists Job cascade;
... |
USE [Monopoly]
GO
/****** Object: Table [Player].[UtilityHistory] Script Date: 2/19/2022 10:18:42 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Player].[UtilityHistory](
[rowid] [int] IDENTITY(1,1) NOT NULL,
[utility] [varchar](50) NOT NULL,
[original_owner] [int] NOT NULL,
[new_o... |
<reponame>boualimabrouk/tsql-scripts<gh_stars>0
-----------------------------------------------------------------
-- Use dm_io_virtual_file_stats to get IO stall statistics per
-- database and file
-- <EMAIL>, go ahead license
-----------------------------------------------------------------
SELECT
CAST(SYSDATETIME(... |
-- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- 主機: 127.0.0.1
-- 產生時間: 2015-10-01: 14:29:58
-- 伺服器版本: 5.6.24
-- PHP 版本: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET... |
CREATE PROCEDURE usp_raise_salary_by_id(id int)
BEGIN
START TRANSACTION;
IF((SELECT count(employee_id) FROM employees WHERE employee_id like id)<>1) THEN
ROLLBACK;
ELSE
UPDATE employees AS e SET salary = salary + salary*0.05
WHERE e.employee_id = id;
END IF;
END
|
<reponame>lgcarrier/AFW<gh_stars>1-10
SET DEFINE OFF;
ALTER TABLE AFW_12_GROUP_UTILS ADD (
CONSTRAINT AFW_12_GROUP_UTILS_FK1
FOREIGN KEY (REF_PRODT)
REFERENCES AFW_11_PRODT (SEQNC)
ON DELETE CASCADE
ENABLE VALIDATE)
/
|
CREATE TABLE [dbo].[Course] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[CatalogNumber] NVARCHAR (MAX) NULL,
[Name] NVARCHAR (MAX) NULL,
[Organization_Id] INT NULL,
CONSTRAINT [PK_dbo.Course] PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [FK_dbo.Course_db... |
<reponame>matortheeternal/mod-picker<filename>setup/old/setup.sql<gh_stars>1-10
/* TEXT TYPE REFERENCE (max length)
* ------------------------------------------------------
* TINYTEXT = 2^8 bytes = 255 char (ascii)
* TEXT = 2^16 bytes = 65,535 char (ascii)
* MEDIUMTEXT = 2^24 bytes = 16,777,... |
<gh_stars>1-10
create or replace table `dataline-integration-testing`.test_normalization.`exchange_rate`
partition by timestamp_trunc(_airbyte_emitted_at, day)
cluster by _airbyte_emitted_at
OPTIONS()
as (
-- Final base SQL model
select
id,
currency,
date,
timestamp_col,
HKD_special... |
<reponame>spiderbbc/QuorumTicket
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 27-08-2016 a las 19:29:16
-- Versión del servidor: 10.0.25-MariaDB-0ubuntu0.16.04.1
-- Versión de PHP: 7.0.8-0ubuntu0.16.04.2
SET SQL_MODE = "NO_AUTO_VAL... |
DROP TABLE IF EXISTS Users
GO
create table Users
(
UserId varchar(50) primary key,
Age varchar(50),
Address varchar(50),
Gender varchar(50),
UserType varchar(50)
)
DROP TABLE IF EXISTS Activities
GO
create table Activities
(
[Column0] bigint,
TransactionId bigint prim... |
<filename>SQL/cart.sql
create table FOOD (
FID INT NOT NULL AUTO_INCREMENT,
Fname VARCHAR(100) NOT NULL,
Fprice FLOAT NOT NULL,
Primary key (FID)
);
create table CUSTOMER (
CID INT NOT NULL AUTO_INCREMENT,
Username VARCHAR(100) NOT NULL,
Pnum VARCHAR(100) NOT NULL,
Password VARCHAR(100) NOT NULL,
Primary key (CID)
);
... |
<reponame>FortySix-NTwo/spring-crud-api
CREATE TABLE users (
_id MEDIUMINT NOT NULL AUTO_INCREMENT,
user_name CHAR(30) NOT NULL,
user_email varchar(25) NOT NULL,
user_pass varchar(50),
PRIMARY KEY (_id)
);
|
drop TABLE `customer`;
|
<gh_stars>10-100
alter table apple_push_credentials alter column apns_key drop not null;
alter table apple_push_credentials add column bundle_id varchar(255); |
<gh_stars>1-10
create table EMAILTEMPLATES_EMLTPTE_FDLINK (
EMAIL_TEMPLATE_ID varchar2(32),
FILE_DESCRIPTOR_ID varchar2(32),
primary key (EMAIL_TEMPLATE_ID, FILE_DESCRIPTOR_ID)
)^
|
<gh_stars>1-10
DROP TABLE IF EXISTS test_entity;
CREATE TABLE test_entity (
id INT AUTO_INCREMENT PRIMARY KEY,
attribute VARCHAR(250) NOT NULL
);
INSERT INTO test_entity (attribute) VALUES
('test1'),
('test2'),
('test3');
|
/*
Copyright 2011 tSQLt
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... |
<reponame>Emiya0306/mdx-kylin
-- 虚拟数据,用于测试 slicer 重复情况
WITH
MEMBER [KYLIN_ACCOUNT].[ACCOUNT_BUYER_LEVEL].[Slicer_0] AS 'Aggregate({[KYLIN_ACCOUNT].[ACCOUNT_BUYER_LEVEL].&[0], [KYLIN_ACCOUNT].[ACCOUNT_BUYER_LEVEL].&[1]})'
SELECT
NON EMPTY Hierarchize(AddCalculatedMembers({DrilldownLevel({DrilldownLevel({[KYLIN_CAL_D... |
-- phpMyAdmin SQL Dump
-- version 4.4.15.10
-- https://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 2017-08-22 11:46:17
-- 服务器版本: 5.6.36-log
-- 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_SET_CLIENT */;
/*!40... |
<reponame>OpenMPDK/SMDK
-- Loads and creates the test UDF's (user-defined functions) defined in
-- UserDefinedTestFunctions.java, using various data types, and with
-- various numbers of arguments.
-- First, drop all the test UDF's (user-defined functions), and remove the class
-- containing them, in case they were lo... |
<filename>src/test/regress/sql/gpi_clean_wait.sql
drop table if exists test_gpi_more_invalid;
create table test_gpi_more_invalid(a int, b int, c int) partition by range(a) (partition p1 values less than (1001), partition p2 values less than (2001), partition p3 values less than (3001));
insert into test_gpi_more_inval... |
# New columns
alter table InputPattern add datatype varchar(255) NULL DEFAULT "LSST_TEST_TYPE" COMMENT 'used in cataloging when type is filepath' after maxV;
alter table ActivityFinalStatus add isFinal bool DEFAULT '1' COMMENT 'default is final' after name;
alter table TravelerType modify state ENUM('NEW', 'ACTIVE', ... |
<filename>my.sql
-- MySQL dump 10.13 Distrib 5.5.52, for linux2.6 (x86_64)
--
-- Host: localhost Database: main
-- ------------------------------------------------------
-- Server version 5.5.52-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE... |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Versão do servidor: 5.7.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULT... |
<reponame>titiscms/oficina
DROP TABLE IF EXISTS TB_DEFEITO;
DROP TABLE IF EXISTS TB_PECA;
DROP TABLE IF EXISTS TB_VEICULO;
DROP TABLE IF EXISTS TB_REGISTRO;
DROP TABLE IF EXISTS TB_DEFEITO_PECA;
DROP TABLE IF EXISTS TB_PECA_VEICULO;
-- DEFEITO --
CREATE TABLE IF NOT EXISTS TB_DEFEITO (
id INT AUTO_INCREMENT PRIMAR... |
<reponame>benmoumene/Online-Movies-Sharing-In-Codeigniter-Version3x<filename>databases/ci_movies.sql<gh_stars>0
/*
SQLyog Enterprise v12.09 (64 bit)
MySQL - 5.5.48 : Database - online_movies
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_... |
-- ***** PRODUCT OVERVIEW SCHEMA DESIGN ****
drop schema if exists public cascade;
grant usage on schema public to public;
grant create on schema public to public;
create schema public;
CREATE TABLE IF NOT EXISTS products (
id INT NOT NULL ,
product_title text NOT NULL,
vendor_name varchar(50) NOT NULL,
review_a... |
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Nov 02, 2018 at 01:54 PM
-- Server version: 5.7.21
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
<gh_stars>0
CREATE TABLE badminto_finalf.t_tip_um LIKE avban.t_tip_um;
ALTER TABLE badminto_finalf.t_tip_um CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
INSERT INTO badminto_finalf.t_tip_um SELECT * from avban.t_tip_um;
ALTER TABLE badminto_finalf.t_tip_um CHANGE COLUMN id_tipm id INT UNSIGNED NOT NULL ... |
<reponame>DavinaLeong/Colours-Repo<gh_stars>0
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.7.9 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 9.3.0.4984
-- ---------------... |
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 12, 2019 at 03:13 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 5.6.36
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.