sql stringlengths 6 1.05M |
|---|
<filename>db_backups/lsapp_20_jan_2020.sql
/*
SQLyog Ultimate v8.55
MySQL - 5.5.5-10.4.11-MariaDB : Database - lsapp_db
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS,... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 19, 2019 at 12:01 PM
-- Server version: 10.1.39-MariaDB
-- 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... |
/*
Navicat MySQL Data Transfer
Source Server : 本机
Source Server Type : MySQL
Source Server Version : 50722
Source Host : localhost:1992
Source Schema : iot
Target Server Type : MySQL
Target Server Version : 50722
File Encoding : 65001
Date: 12/05/2021 14:45:41
*/
SE... |
drop table products_uselsss cascade;
drop table customers cascade;
drop table products cascade;
drop table orders cascade;
drop table others.products cascade;
drop schema schema_test cascade;
create schema others;
create table customers (
customer_id bigserial primary key,
name varchar(20) default '',
na... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 09, 2018 at 01:16 PM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 5.6.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
<gh_stars>1-10
drop table if exists songs;
drop table if exists user_votes;
CREATE TABLE if not exists songs (
link varchar(300) PRIMARY KEY,
upvotes integer,
downvotes integer
);
CREATE TABLE if not exists user_votes (
id integer PRIMARY KEY AUTOINCREMENT,
token varchar(36),
link varchar(300)... |
<gh_stars>10-100
-- Table Definition ----------------------------------------------
CREATE TABLE events (
sequence_id character(26) PRIMARY KEY,
aggregate_id uuid,
user_id uuid,
created_at bigint NOT NULL,
type character varying(255),
data bytea
);
COMMENT ON COLUMN events.sequence_id IS 'github... |
-- Phase 1 create animals table
-- Find all animals whose name ends in "mon".
SELECT * from animals WHERE name LIKE '%mon';
-- List the name of all animals born between 2016 and 2019.
SELECT * FROM animals WHERE date_of_birth BETWEEN '01-01-2016' AND '12-31-2019';
-- List the name of all animals that are neutered an... |
<filename>src/test/resources/sql/insert/ab0f9103.sql
-- file:updatable_views.sql ln:750 expect:true
INSERT INTO rw_view1 VALUES (15)
|
<gh_stars>100-1000
-- original: aggerror.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
CREATE TABLE t1(a);
INSERT INTO t1 VALUES(1);
INSERT INTO t1 VALUES(2);
INSERT INTO t1 SELECT a+2 FROM t1;
INSERT INTO t1 SELECT a+4 FROM t1;
INSERT INTO t1 SELECT a+8 FROM t1;
INSERT IN... |
<reponame>PacktPublishing/Amazon-Redshift-Cookbook
CREATE TABLE orders
(
O_ORDERKEY BIGINT NOT NULL,
O_CUSTKEY BIGINT,
O_ORDERSTATUS VARCHAR(1),
O_TOTALPRICE DECIMAL(18,4),
O_ORDERDATE DATE,
O_ORDERPRIORITY VARCHAR(15),
O_CLERK VARCHAR(15),
O_SHIPPRIORITY I... |
/*
========================================
Find Nullable Distribution Columns
========================================
This query will return any distribution columns in the Azure SQL Data Warehouse Database that are
set to allow NULLs. As a best practice and to avoid data skew, all distribution columns sho... |
<reponame>sarciszewski/onionimbus-old
CREATE TABLE sites (
siteid INTEGER PRIMARY KEY ASC,
owner INTEGER,
created TEXT,
modified TEXT
);
CREATE TABLE dns (
dnsid INTEGER PRIMARY KEY ASC,
site INTEGER,
domain_name TEXT,
hidden_se... |
<gh_stars>0
CREATE OR REPLACE package s2sEDSF424SupplementV11Pkg as
procedure getStateName
(as_state_code IN osp$state_code.state_code%type,
cur_type IN OUT result_sets.cur_generic);
procedure getCountryName
(as_country_code IN osp$country_code.country_code%type,
... |
-- Quest: Still at it
INSERT INTO `gameobject_loot_template` (`entry`, `item`) VALUES ('190643', '38688'); |
<gh_stars>0
CREATE TABLE `actividades_infraestructura_beneficios` (
`id_proyecto` int(50) DEFAULT NULL,
`a31_1_1` varchar(250) COLLATE utf8_bin DEFAULT NULL,
`a31_2_1` text COLLATE utf8_bin,
`a31_1_2` varchar(250) COLLATE utf8_bin DEFAULT NULL,
`a31_2_2` text COLLATE utf8_bin,
`a31_1_3` varchar(250) COLLATE... |
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [CoreXR].[SessionsAndRequests] AS
/*
Copyright 2016 <NAME>
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://... |
<reponame>GEDS1990/szyoa
-------------------------------------------------------------------------------
-- task def escalation
-------------------------------------------------------------------------------
-- notification, reassignment, operation
CREATE TABLE TASK_DEF_ESCALATION(
ID BIGINT NOT NULL,
TYPE VARCHAR... |
INSERT INTO `test` (`x`, `y`) VALUES (1,NULL),(2,NULL),(3,NULL),(3,NULL),(4,NULL),(5,NULL),(6,7);
INSERT INTO `test 3` (x) VALUES (1);
INSERT INTO `test2` (`x`) VALUES (1),(2),(3);
|
-- Deploy ggircs-portal:view_ciip_production to pg
-- requires: table_form_result
/**
This view cannot be cleanly walked back to its original state in this revert file as 'create or replace view' cannot drop columns.
From the postgres docs:
{The new query must generate the same columns that were generated by t... |
/*
Navicat Premium Data Transfer
Source Server : wefe_board-fat
Source Server Type : MySQL
Source Server Version : 50720
Source Host : 10.**.**.33:3306
Source Schema : wefe_board
Target Server Type : MySQL
Target Server Version : 50720
File Encoding : 65001
Date: 27/... |
<reponame>streamingriver/vms
ALTER TABLE `channels` ADD `ffmpeg` INT NULL;
|
select 6 as SRTY, DAT, 'COGS' as ACDB, ITMCT.NME as SADNM, ITMCT.IID as SADID, 1004 as SADTY, SUM(COGSENR.TOT) as DEBT,
'INVENTORY' as ACCR, ITMCT.NME as SACNM, ITMCT.IID as SACID, 1004 as SACTY, SUM(COGSENR.TOT) as CRED
from (select DOWID, ITM, TOT from COGSENR where RVID is null and DOWTY=6) as COGSENR
join SALINV on... |
<filename>rpserver.sql
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 2018-09-18 19:46:03
-- 服务器版本: 10.1.34-MariaDB-0ubuntu0.18.04.1
-- PHP Version: 7.0.31-1+ubuntu18.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START ... |
<reponame>gddhatdisqus/Hive-JSON-Serde-tmp<gh_stars>100-1000
add jar ../../../target/json-serde-1.1.3-jar-with-dependencies.jar;
DROP TABLE json_nested_test;
CREATE TABLE json_nested_test (
country string,
languages array<string>,
religions map<string,array<int>>)
ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerD... |
<gh_stars>0
CREATE DATABASE burgers_db;
use burgers_db;
CREATE TABLE burger (
id int NOT NULL auto_increment,
burger_name varchar(30) NOT NULL,
devoured BOOLEAN default false,
PRIMARY KEY (id)
); |
DROP VIEW IF EXISTS app_summaries CASCADE;
DROP VIEW IF EXISTS app_category_view CASCADE;
DROP VIEW IF EXISTS cat_to_parents CASCADE;
DROP VIEW IF EXISTS app_platform_view CASCADE;
DROP VIEW IF EXISTS app_device_view CASCADE;
DROP VIEW IF EXISTS app_view CASCADE;
DROP VIEW IF EXISTS recommendation_view CASCADE;
DROP VI... |
<filename>DB/proyecto.sql
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 20-07-2019 a las 22:15:02
-- 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;
... |
CREATE TABLE [dbo].[dbachecksChecks]
(
[Group] [nvarchar](max) NULL,
[Type] [nvarchar](max) NULL,
[UniqueTag] [nvarchar](max) NULL,
[AllTags] [nvarchar](max) NULL,
[Config] [nvarchar](max) NULL,
[Description] [nvarchar](max) NULL,
[Describe] [nvarchar](max) NULL
);
GO
|
<reponame>enriqueescobar-askida/UdeS.Cefti.Inf735
CREATE VIEW vFactCurrencyRate AS
SELECT f.CurrencyKey, CurrencyAlternateKey, CurrencyName, FullDateAlternateKey,
f.TimeKey, AverageRate, EndOfDayRate, InsertDate
FROM FactCurrencyRate f
JOIN DimCurrency c ON (c.CurrencyKey = f.CurrencyKey)
JOIN DimTime t ON (t.Tim... |
<filename>Audit/database-access-audit.sql
USE [master]
GO
CREATE SERVER AUDIT LoginAudit
TO FILE
( FILEPATH = N'E:\LoginAudit'
,MAXSIZE = 50 MB
,MAX_ROLLOVER_FILES = 10
,RESERVE_DISK_SPACE = OFF
)
WITH
( QUEUE_DELAY = 1000
,ON_FAILURE = CONTINUE
)
GO
-- Enable the server audit.
ALTER SERVER AUDIT LoginAudit ... |
<filename>animateblog.sql
/*
SQLyog Ultimate v12.09 (64 bit)
MySQL - 5.5.20-log : Database - animateblog
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*... |
<filename>MovieStreaming/database/movie_streaming.sql
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.3.11
-- Tempo de geração: 15-Nov-2020 às 19:20
-- Versão do servidor: 10.4.14-MariaDB
-- versão do PHP: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET... |
CREATE TABLE IF NOT EXISTS state.eg_role
(
id bigint NOT NULL,
name character varying(32) NOT NULL,
description character varying(128),
createddate timestamp without time zone DEFAULT ('now'::text)::timestamp without time zone,
createdby bigint,
lastmodifiedby bigint,
... |
<filename>config/sql/address.sql<gh_stars>1-10
-- addresses
CREATE TABLE IF NOT EXISTS `{prefix}addresses` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`foreign_id` int(10) unsigned NOT NULL,
`model_key` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
`country_id` int(10) unsigned NOT NULL COMMENT '',
`stat... |
DROP DATABASE IF EXISTS db1;
CREATE DATABASE db1;
USE db1;
CREATE TABLE IF NOT EXISTS t1(a UInt8, b UInt64, c Int8, d Int64, e Date, f Date, g DateTime, h String) Engine = Fuse;
CREATE TABLE IF NOT EXISTS t2(a String, b String, c String, d String, e String, f String, g String, h String) Engine = Fuse;
CREATE TABLE IF ... |
<gh_stars>0
{{config
(enabled =
(target.type == 'bigquery' and var("stg_google_ads_etl") == 'stitch')
)
}}
{% if var("marketing_warehouse_ad_group_sources") %}
{% if 'google_ads' in var("marketing_warehouse_ad_group_sources") %}
WITH source AS (
{{ filter_stitch_relation(relation=var('stg_google_ads_stitc... |
<reponame>QuietLearn/contentPay
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1051444685177520130', 'payChannel', 'system', '[0],[system],', '支付渠道', '', '/payChannel', '99', '2', '1', NULL, '1', '0');
INSERT INTO `g... |
DECLARE @readonlyusername varchar(30) = 'nvowebaccess';
DECLARE @writeusername varchar(30) = 'nvo';
--select 'grant execute on ' + name + ' to @readonlyuser', name, create_date from sys.objects where name like 'ivo%' order by create_date desc
SET @readonlyusername = quotename(@readonlyusername)
SET @writeusername = q... |
---- ALTER TABLE ... CHANGE COLUMN , type change
-- constraints : new constraints same as old constraints : NON-UNIQUE INDEX
-- ordering : no order defined
-- name : same name or different
-------------- compound index , precision increase, same name
create table t1 (i1 integer,s2 varchar(3));
insert into t1 valu... |
<reponame>opengauss-mirror/Yat
-- @testpoint: 修复指定防篡改用户表对应的用户历史表hash值,用户表未损坏,进行增改操作
--step1:建模式建表;expect:成功
drop schema if exists s_ledger_database_0018;
create schema s_ledger_database_0018 with blockchain;
drop table if exists s_ledger_database_0018.t_ledger_database_0018;
create table s_ledger_database_0018.t_ledge... |
drop table if exists users;
drop table if exists entries;
create table users(
userid integer primary key,
username text not null,
password text not null
);
create table entries(
id integer primary key,
name text not null,
filename text not null,
dt text not null,
userid integer not null,
FOREIGN KEY(userid)... |
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 80021
Source Host : 127.0.0.1:3306
Source Database : ry
Target Server Type : MYSQL
Target Server Version : 80021
File Encoding : 65001
Date: 2020-09-16 16:25:28
*/
SET FOREIGN_KEY_CHECKS=0;
-- ------... |
-- MariaDB dump 10.19 Distrib 10.5.12-MariaDB, for Linux (x86_64)
--
-- Host: db Database: test
-- ------------------------------------------------------
-- Server version 10.6.4-MariaDB-1:10.6.4+maria~focal
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@... |
SELECT
mc.CountryCode,
m.MountainRange,
p.PeakName,
p.Elevation
FROM Peaks p
JOIN MountainsCountries mc ON mc.MountainId = p.MountainId
JOIN Mountains m ON m.Id = mc.MountainId
WHERE p.Elevation > 2835 AND mc.CountryCode = 'BG'
ORDER BY p.Elevation DESC |
<gh_stars>0
select * from cte_market_cycle
order by SEQ |
CREATE TABLE [dbo].[PUCommLog] (
[Id] BIGINT IDENTITY (1, 1) NOT NULL,
[PUOrderId] BIGINT NOT NULL,
[RequestType] NVARCHAR(100) NULL,
[RequestDate] DATETIME NULL,
[RequestContent] NVARCHAR (MAX) NULL,
[ResponseType] NVARCHAR(100) NULL,
[R... |
<reponame>thetooi/TB-Dev-Codeigniter<filename>torrentempire.sql
-- phpMyAdmin SQL Dump
-- version 3.5.8.2
-- http://www.phpmyadmin.net
--
-- Machine: localhost
-- Genereertijd: 01 apr 2018 om 14:59
-- Serverversie: 5.1.73
-- PHP-versie: 5.3.29
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 ... |
create table `task_list_users` (
id bigint auto_increment primary key,
task_list_id bigint not null,
username varchar(50) not null,
created_by varchar(50) not null,
created_datetime timestamp(2) not null,
last_modified_by varchar(50) not null,
last_modified_datetime timestamp(2) not null,
version smalli... |
TRUNCATE bigtable;
TRUNCATE some_schema.bigtable;
TRUNCATE TABLE bigtable;
TRUNCATE ONLY bigtable;
TRUNCATE TABLE ONLY bigtable;
TRUNCATE bigtable *;
TRUNCATE TABLE bigtable *;
TRUNCATE bigtable, fattable;
TRUNCATE TABLE bigtable, fattable;
TRUNCATE ONLY bigtable, fattable *;
TRUNCATE bigtable RESTART IDENTITY;
TRUNCAT... |
-- phpMyAdmin SQL Dump
-- version 3.4.11.1deb2+deb7u1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Erstellungszeit: 26. Feb 2015 um 06:48
-- Server Version: 5.5.41
-- PHP-Version: 5.4.36-0+deb7u3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT... |
insert into c.foo (foo_id, foo_name) values
(1, 'Foo 1'),
(2, 'Foo 2'),
(3, 'Foo 3');
insert into c.bar (bar_id, bar_name) values
(11, 'Bar 11'),
(12, 'Bar 12'),
(13, 'Bar 13');
insert into c.junction (j_foo_id, j_bar_id) values
(1, 11),
(1, 12),
(1, 12),
(2, 11); |
#########################################################################################
# PROCEDURE
# * Generate notifications for every subscriber to the tag of the
# last created content.
#########################################################################################
create procedure generate_notificati... |
<gh_stars>0
create table languages (
id int unsigned primary key auto_increment,
welcomeMsg varchar(100) not null,
code varchar(3) not null
); |
/**
*
* @author Алексей
* @name qMetrikaStat
* @public
*/
Select *
From mtk_shots t1
Where (:p_label = t1.mtk_label or :p_label is null)
and (:p_start < t1.shot_time or :p_start is null)
and (:p_end >= t1.shot_time or :p_end is null) |
create table ul_bsf_busitype
(
id varchar2(32) primary key, /**主键*/
qq9214_md varchar2(20),/**模块?*/
qq9214_bt varchar2(30),/**业务类型*/
class_name varchar2(200),/**处理类*/
view_path varchar2(200),/**界面路径*/
need_logined varchar2(1)/**是否需要登陆才能访问*/
);
create table ul_bsf_busitype_action
(
id varchar2(32) primary key,
... |
-- phpMyAdmin SQL Dump
-- version 5.1.0-dev
-- https://www.phpmyadmin.net/
--
-- l0m1s
--
-- <EMAIL>
--
-- Host: localhost
-- Generation Time: Jul 22, 2021 at 02:42 PM
-- Server version: 8.0.20-0ubuntu0.19.10.1
-- PHP Version: 7.3.11-0ubuntu0.19.10.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time... |
<filename>src/test/resources/jp/co/tis/gsp/tools/dba/mojo/GenerateDdlMojo_test/specifiedSchemaInEdm/db2/expected/ddl/10_CREATE_INDEX_TEST2.sql<gh_stars>10-100
CREATE TABLE SCHEMA_TEST.INDEX_TEST2 (
INDEX_TEST2_ID BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY,
SUB_ID_1 BIGINT NOT NULL,
SUB_ID_2 BIGINT NOT NULL
);
C... |
<reponame>nickgros-sage/Synapse-Repository-Services<gh_stars>10-100
CREATE TABLE IF NOT EXISTS `AUTHORIZATION_CONSENT` (
`ID` BIGINT NOT NULL,
`ETAG` char(36) NOT NULL,
`USER_ID` BIGINT NOT NULL,
`CLIENT_ID` BIGINT NOT NULL,
`SCOPE_HASH` char(64) NOT NULL,
`GRANTED_ON` BIGINT NOT NULL,
PRIMARY KEY (`ID`),... |
<reponame>disconnect3d/cstrnfinder
SELECT
files.repo_name,
files.path,
contents.content,
contents.lines
FROM
`bigquery-public-data.github_repos.sample_files` files
JOIN (
SELECT
id,
content,
REGEXP_EXTRACT_ALL(content, r'[}].*[\n]') as lines
#REGEXP_EXTRACT_ALL(content, r'Free Software Found... |
/* SYNCHRONOUSLY CALL NAMED LAMBDA FUNCTION */
CREATE OR REPLACE FUNCTION awslambda_fn(fn_name VARCHAR2, fn_argsJson VARCHAR2)
RETURN VARCHAR2
AS LANGUAGE JAVA
NAME 'com.amazonaws.rdbmsinteg.LambdaInvoke.invoke_sync(java.lang.String, java.lang.String) return java.lang.String';
/
GRANT EXECUTE ON awslambda... |
ALTER TABLE `airline_v2`.`link_consumption`
ADD COLUMN `transport_type` TINYINT NULL AFTER `duration`; |
CREATE TABLE t_null
(
x Int16,
y Nullable(Int16)
) ENGINE = Memory
|
--test all with collection
create class t1 (c1 set int, c2 varchar(20));
insert into t1 values({101,102}, 'aaa');
insert into t1 values({102,103}, 'bbb');
insert into t1 values({103,104}, 'ddd');
insert into t1 values({104,105}, 'ccc');
insert into t1 values({105,106}, 'eee');
insert into t1 values({107,108}, 'eee')... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 12, 2017 at 06:22 AM
-- Server version: 10.1.9-MariaDB
-- PHP Version: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 11, 2020 at 07:38 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<gh_stars>0
drop database if exists SVOlanoSAC;
create database SVOlanoSAC;
use SVOlanoSAC;
create table empresa(
id int auto_increment primary key not null,
nombre varchar(40) not null,
ruc char(11) not null,
margen float(4,2) not null,
telefono char(15) not null,
direccion varchar(80) not null
);
create table sessi... |
DROP TABLE IF EXISTS products_in_orders;
|
<reponame>jrg96/tpibufete
CREATE DATABASE tpi_bufete;
USE tpi_bufete;
CREATE TABLE tbl_usuario(
id_usuario INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
email VARCHAR(100) NOT NULL UNIQUE,
password VARCHAR(50) NOT NULL,
nombre_completo VARCHAR(200) NOT NULL,
tipo VARCHAR(10) NOT NULL
);
CREATE TABLE tbl_caso(
id_cas... |
-- 2019-05-09
-- 借助框架后的补充表
-- 创建表 course
CREATE TABLE sys_course
(
course_id INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '课程编号',
course_name VARCHAR(25) NOT NULL UNIQUE COMMENT '课程名',
course_textbook VARCHAR(30) COMMENT '课程使用教材',
textbook_price DOUBLE COMMENT '教材价格',
course_type INT NOT NULL COMMENT '课程类型(0:必修课; 1:... |
<filename>db_siswa.sql
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 04 Apr 2021 pada 07.19
-- Versi server: 10.1.38-MariaDB
-- Versi PHP: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
--SCRIPTS PARA RODAR NO WORKBENCH
CREATE SCHEMA `petshop`;
CREATE TABLE `petshop`. `product` (
`id` INT NOT NULL,
`title` VARCHAR(80) NULL,
`description` TEXT(4000) NULL
PRIMARY KEY(`id`)
); |
<reponame>itedev/symfony2-demo-project<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Дек 26 2013 г., 20:01
-- Версия сервера: 5.5.29-0ubuntu0.12.04.2
-- Версия PHP: 5.3.10-1ubuntu3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = ... |
<reponame>Z3r4t05/FPT<gh_stars>1-10
create proc cau10
@year int
as
select Employees.EmployeeID, LastName, FirstName, Title, Year = @year, [Total Order] from Employees, (select EmployeeID, count(Orders.OrderID) 'Total Order' from Orders where year(OrderDate) = @year group by EmployeeID) as totalOrder
where Employees.Em... |
<gh_stars>1-10
\timing
SELECT pprint_addy(addy[1]), addy FROM reverse_geocode(ST_Point(-71.27593,42.33891)); -- I 90, Weston MA
SELECT pprint_addy(addy[1]), addy FROM reverse_geocode(ST_Point(-71.85335,42.19262)); -- I 90, Auburn, MA 01501
SELECT pprint_addy(addy[1]), addy FROM reverse_geocode(ST_Point(-71.057811,42.... |
<gh_stars>100-1000
CREATE PROCEDURE [dbo].[BugNet_ProjectIssueTypes_GetIssueTypesByProjectId]
@ProjectId int
AS
SELECT
IssueTypeId,
ProjectId,
IssueTypeName,
SortOrder,
IssueTypeImageUrl
FROM
BugNet_ProjectIssueTypes
WHERE
ProjectId = @ProjectId
ORDER BY SortOrder
|
{{ heap_sessions() }}
|
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 2017-06-06 15:50:53
-- 服务器版本: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET... |
/*
Navicat Premium Data Transfer
Source Server : 阿里云-Mysql-root
Source Server Type : MySQL
Source Server Version : 80016
Source Host : 172.16.17.32:3306
Source Schema : book
Target Server Type : MySQL
Target Server Version : 80016
File Encoding : 65001
Date: 11/05/20... |
<gh_stars>0
create table characters_shortcuts_items
(
ItemTemplateId int not null,
ItemGuid int not null,
Id int auto_increment
primary key,
OwnerId int not null,
Slot int not null
)
engine = MyISAM
charset = utf8;
create index OwnerId
on chara... |
<gh_stars>10-100
CREATE PROCEDURE tSQLt.GetNewTranName
@TranName CHAR(32) OUTPUT
AS
BEGIN
SELECT @TranName = LEFT('tSQLtTran'+REPLACE(CAST(NEWID() AS NVARCHAR(60)),'-',''),32);
END;
|
<filename>Daten/Updateskripte/UpdateTo_V0083.sql
--Relative Pfade für Audio
ALTER TABLE Audio_Titel ADD Datei nvarchar(500) NULL;
ALTER TABLE Audio_Playlist_Titel ADD Reihenfolge int NOT NULL DEFAULT 0;
--Audio Spieldauer beim Abspielen berechnen (Performance)
INSERT INTO [Einstellung] (Kontext, Name, Typ, Wert)... |
<reponame>ycq323/alcinoe
/*==============================================================*/
/* Database name: PostgreSql */
/* DBMS name: PostgreSQL 7 */
/* Created on: 04.02.2003 19:59:06 */
/*=====================... |
<reponame>dotnetcore/sharding-core
CREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" (
"MigrationId" character varying(150) NOT NULL,
"ProductVersion" character varying(32) NOT NULL,
CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY ("MigrationId")
);
START TRANSACTION;
CREATE TABLE "AspNetRoles" (
... |
<reponame>tapper/Tapper-Schema
--
-- Created by SQL::Translator::Producer::PostgreSQL
-- Created on Tue Feb 19 16:14:25 2013
--
--
-- Table: host.
--
DROP TABLE "host" CASCADE;
CREATE TABLE "host" (
"id" serial NOT NULL,
"name" character varying(255) DEFAULT '',
"comment" character varying(255) DEFAULT '',
"f... |
-- @testpoint: 插入非法字符,合理报错
drop table if exists name_09;
CREATE TABLE name_09 (id name);
insert into name_09 values (%%%%%);
select * from name_09;
drop table name_09; |
<gh_stars>0
SELECT distinct CITY FROM STATION where MOD(ID,2) = 0;
|
<reponame>MRevitt/PostgreSQL-MV-Fast-Refresh
/* ---------------------------------------------------------------------------------------------------------------------------------
Routine Name: mvComplexFunctions.sql
Author: <NAME>
Date: 12/011/2018
----------------------------------------------------------... |
<reponame>Karen-Harvey/socialbodiesdata<gh_stars>0
-- Karen asked a few questions during our coaching session on 2021-11-24 that I had to work on after the session. These are the answers to the questions.
-- QQ - can we group by country??
-- Mike's notes: this is all 1 query (using 4 subqueries), so copy, paste an... |
Drop Table animals;--done
Drop Table forestFires;--done
Drop Table countries;--done
Drop Table regions;--done
Drop Table populationSamples;--done
Drop Table reports;
Drop Table authors;
Drop Table forests;--done
Drop Table populations;--done
Drop Table geogRanges;--done
Drop Table zones;-- ? not sure if we actually nee... |
/* leave this
l:see LICENSE file
g:utility
r:130426\s.zaglio: short comment
t:sp__info_tbl rep05_delivery_notes
t:sp__info_tbl rep06_delivery_notes_details,@dbg=1
t:sp__info_tbl rep07_files,@dbg=1
*/
CREATE proc sp__info_tbl
@tbl sysname = null,
@opt sysname = null,
@dbg int=0
as
b... |
/*
24. Write a SQL statement that deletes all users without passwords (NULL password).
*/
DELETE FROM Users
WHERE [Password] = NULL |
<gh_stars>0
SELECT MAX(pages),title FROM books; |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 17 Feb 2017 la 14:49
-- Versiune server: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT... |
<filename>EasyWrapper/Assets/ILR/1617/Export/Single/Header.sql
select cast((
select
(
select
CollectionDetails.Collection,
CollectionDetails.Year,
cast(CollectionDetails.FilePreparationDate as date) FilePreparationDate
from
CollectionDetails
for xml auto, type, elements
),
(
selec... |
<reponame>surfgg/dragon-knight<gh_stars>1-10
DROP TABLE IF EXISTS {{ table }};
CREATE TABLE {{ table }} (
id smallint(5) unsigned NOT NULL auto_increment,
type tinyint(3) unsigned NOT NULL default '0',
name varchar(30) NOT NULL default '',
buycost smallint(5) unsigned NOT NULL default '0',
attribute smallint... |
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_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
CREATE TABLE IF NOT EXIST... |
<reponame>newtonsspawn/codewars_challenges<gh_stars>1-10
SELECT id, name
FROM departments
WHERE id IN (
SELECT department_id
FROM sales
WHERE price > 98.00
) |
-- file:rules.sql ln:316 expect:true
delete from rtest_t5
|
<filename>src/test/resources/sql/set/33ae890f.sql
-- file:rangetypes.sql ln:262 expect:true
SET enable_indexscan = t
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.