text stringlengths 6 9.38M |
|---|
DO
$BODY$
DECLARE
trigger_name text := (
SELECT tgname
FROM (pg_trigger JOIN pg_class ON tgrelid=pg_class.oid) JOIN pg_proc ON (tgfoid=pg_proc.oid)
WHERE relname='entity_entityrelationship' AND tgname='update_entity_relationship_activation_history'
);
BEGIN
IF trigger_name IS NULL THEN
... |
CREATE SCHEMA libreria ;
USE libreria ;
CREATE TABLE libro (
libId integer NOT NULL PRIMARY KEY ,
libNombre char (50 ) NOT NULL ,
libPub smallint NULL
) ;
CREATE TABLE autor (
autId integer AUTO_INCREMENT PRIMARY KEY,
autApellido varchar (30 ) NOT NULL DEFAULT "" ,
autNombre varchar (50 ) NOT NULL ,
autEmail char (3... |
-- Database schema for ORES predictions for Draft pages.
USE staging;
CREATE TABLE nettrom_draft_predictions (
rev_id INT NOT NULL PRIMARY KEY,
rev_timestamp DATETIME NOT NULL,
draft_prediction VARCHAR(32) NOT NULL DEFAULT 'OK',
spam_prob FLOAT NOT NULL DEFAULT 0.0,
vandal_prob FLOAT ... |
SELECT name, id FROM `users`;
|
DELETE FROM DRAFT_KNOWLEDGES
WHERE
DRAFT_ID = ?
;
|
\set HIVE_SERVER `echo \'"$HIVE_SERVER"\'`
\set HIVE_CLIENT_TYPE `echo \'"$CLIENT_TYPE"\'`
\set HIVE_PORT `echo \'"$HIVE_PORT"\'`
\set HIVE_USER `echo \'"$HIVE_USER"\'`
\set HIVE_PASSWORD `echo \'"$HIVE_PASSWORD"\'`
\set AUTH_TYPE `echo \'"$AUTH_TYPE"\'`
\c contrib_regres... |
INSERT INTO GLUO_FUENTE_FINANCIACION (fufi_id,
codigo,
nombre,
usu_creador,
usu_modificador,
fecha_creacion,
... |
/* contrib/dict_voikko/dict_voikko--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION dict_voikko" to load this file. \quit
CREATE FUNCTION dvoikko_init(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FU... |
/* User table */
/*
CREATE TABLE User
(
UserID int NOT NULL AUTO_INCREMENT UNIQUE,
Email varchar(255) NOT NULL,
Password varchar(255) NOT NULL,
Firstname varchar(255) NOT NULL,
Lastname varchar(255) NOT NULL,
LastActivation datetime,
HasSubUser boolean DEFAULT FALSE,
HasParent boolean DEFAULT FALSE,
... |
ALTER TABLE classcode ADD COLUMN classcode_creator TEXT;
ALTER TABLE classcode ADD COLUMN classcode_created TIMESTAMP;
ALTER TABLE classcode ADD COLUMN classcode_modifier TEXT;
ALTER TABLE classcode ADD COLUMN classcode_modified TIMESTAMP;
ALTER TABLE classcode ADD COLUMN classcode_type TEXT;
|
INSERT INTO Docteur
VALUES(10,'Luc','Sansom',110,'terrebone','7512 Chemin Euclid','Etudiant',0,0)
/
INSERT INTO Docteur
VALUES(2,'Dollard','Gambi',140,'Douala','1233 Camp yabassi','Interne',0,0)
/
INSERT INTO Docteur
VALUES(1,'Lin','Bo',110,'Laval','6666 Chemin Dubois','Docteur',0,0)
/
INSERT INTO Docteur
VALUE... |
CREATE TRIGGER EstToFreq
AFTER INSERT ON Estudante
FOR EACH ROW
BEGIN
INSERT INTO Frequencia (estudante, curso) VALUES (New.estudanteID, New.curso);
END;
|
#### For Quecque timing check
select t.store_name, r.receipt_timestamp,r.created_at,r.receipt_key,
t.till_key as till
from iris.receipt r
join iris.till t on(r.device_key=t.till_key)
where from_unixtime(r.receipt_timestamp)> '2014-01-03'
order by t.store_name, t.till_key, from_unixtime(r.receipt_timestamp);
#### For r... |
DROP SEQUENCE mh_business_typ_sq;
DROP TABLE mh_business_type CASCADE;
DROP SEQUENCE mh_item_sq;
DROP TABLE mh_item CASCADE;
DROP SEQUENCE mh_item_typ_sq;
DROP TABLE mh_item_type CASCADE;
DROP SEQUENCE mh_vendor_sq;
DROP TABLE mh_vendor CASCADE;
CREATE TABLE mh_business_type (
business_type_id numeric NOT NULL,... |
CREATE OR REPLACE PACKAGE hdbk.fwdr AS
/*
$pkg: HDBK.FWDR
*/
function utc_offset_mow return number;
type iata_record IS record (IATA hdbk.GEO.IATA%type);
type iata_table is table of iata_record index by pls_integer;
type iata_array is table of hdbk.GEO.IATA%type index by pls_integer;
/*
$obj_type: function
$o... |
insert into `t_book`(`id`,`name`,`author`) values
(1,'book1','张三'),
(2,'木4','234'); |
-- phpMyAdmin SQL Dump
-- version 4.4.1.1
-- http://www.phpmyadmin.net
--
-- Host: localhost:8889
-- Generation Time: Oct 31, 2015 at 10:42 PM
-- Server version: 5.5.42
-- PHP Version: 5.6.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... |
update tbl_states
set state_name = '%2',
state_abbr = '%3',
next_state_id = %4,
responsible = %5
where state_id = %1
|
-- 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='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema symfony_m... |
-- phpMyAdmin SQL Dump
-- version 2.9.1.1
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2009 年 03 月 09 日 18:18
-- 服务器版本: 5.2.3
-- PHP 版本: 5.2.3
--
-- 数据库: 'shopnc60'
--
--
-- 导出表中的数据 'shopnc_article'
--
INSERT INTO @shopnc@article (article_id, article_class_id, article_title, article_author, article_... |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Czas generowania: 17 Sty 2021, 23:20
-- Wersja serwera: 10.4.11-MariaDB
-- Wersja PHP: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
REPLACE INTO `role` VALUES (1,'CLIENT'); |
DELETE FROM PS_TZ_CJX_TBL
WHERE
EXISTS( SELECT
'x'
FROM
PS_TZ_CS_KS_TBL
WHERE
TZ_CLASS_ID = ?
AND TZ_APPLY_PC_ID = ?
AND TZ_SCORE_INS_ID = PS_TZ_CJX_TBL.TZ_SCORE_INS_ID) |
CREATE TABLE Contact_Person_Details (
Customer_ID INT,
Name VARCHAR(255) NOT NULL,
Email VARCHAR(255),
Phone_Number BIGINT
);
SELECT
*
FROM
Contact_Person_Details; |
INSERT INTO HtmlLabelIndex values(18820,'╦йльм╪')
/
INSERT INTO HtmlLabelInfo VALUES(18820,'╦йльм╪',7)
/
INSERT INTO HtmlLabelInfo VALUES(18820,'gunt chart',8)
/ |
create table if not exists vouchers (
id int(11) not null auto_increment primary key,
isProcentual boolean not null,
`value` decimal (6, 2),
`timestamp` timestamp default current_timestamp(),
status enum('deleted', 'inactive', 'active') default 'active',
unique(isProcentual, `value`, status)
); |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 17, 2017 at 02:49 AM
-- 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... |
CREATE OR REPLACE EDITIONABLE PACKAGE BLNG.BLNG_API as
/*
$pkg: BLNG.BLNG_API
*/
/*
$obj_desc: *_add: insert row into table *. Could return id of new row.
$obj_desc: *_edit: update row into table *. Object have always one id. first, old data with amnd_state = [I]nactive
$obj_desc: *_edit: inserted as row wit... |
USE employees;
SELECT *
FROM titles;
# In your script, use DISTINCT to find the unique titles in the titles table
SELECT DISTINCT t.title AS 'unique_titles'
FROM titles t;
# show titles and how many employees we have with each title
SELECT
t.title AS 'titles',
count(title) AS 'count'
FROM titles t
GROUP BY ... |
CREATE MATERIALIZED VIEW CMDS_M_DPC_CLA parallel 96 nologging
AS
select distinct
SEIREKI,
SEIREKI_NAME,
WAREKI,
WAREKI_NAME
from TNDS_T_TRANS_JC_YEAR
INNER JOIN TNDS_T_RCP_DPC_IR
ON
TNDS_T_TRANS_JC_YEAR.WAREKI = TNDS_T_RCP_DPC_IR.REQ_YM
order by SEIREKI DESC
;
|
set @ID_Z = 4;
set @id_ajuste = 4;
SELECT zona.nombre into @zona from zona where id_zona = @ID_Z;
INSERT INTO stockDetalle (id_ajusteStock, id_producto, cantidad, dc, observaciones, id_zona)
select @id_ajuste, id_producto, sum(if(dc = "D", cantidad, -cantidad)) as saldo, 'X', CONCAT('Ajuste para dejar stock en cero ... |
CREATE TABLE books(
book_id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) DEFAULT 'NO NAME',
pages INT NOT NULL DEFAULT 0,
stars DOUBLE(2,1) NOT NULL DEFAULT 1,
create_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
updated_at DATETIME DEFAULT NULL ON UPDATE CURRENT_TIMEST... |
ALTER TABLE `users` ADD sex VARCHAR(2) COMMENT '性别',
ADD age TINYINT(4) COMMENT '年龄',
ADD nation VARCHAR(20) COMMENT '名族',
ADD idcard_address VARCHAR(50) COMMENT '身份证所在地',
ADD wechat VARCHAR(50) COMMENT '微信',
ADD qq_number VARCHAR(20) COMMENT 'QQ',
ADD address_book_number INT(11) COMMENT '通讯录人数',
ADD phone_authenticati... |
-- MySQL Script generated by MySQL Workbench
-- mer. 24 avril 2019 17:24:49 CEST
-- 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_... |
DROP DATABASE IF EXISTS fizzbuzz_twitterbot_test;
CREATE DATABASE fizzbuzz_twitterbot_test COLLATE utf8mb4_bin;
|
INSERT INTO DEPT(DEPTNO,DNAME,LOC) VALUES (10,'ACCOUNTING','NEW YORK');
INSERT INTO DEPT(DEPTNO,DNAME,LOC) VALUES (20,'RESEARCH','DALLAS');
INSERT INTO DEPT(DEPTNO,DNAME,LOC) VALUES (30,'SALES','CHICAGO');
INSERT INTO DEPT(DEPTNO,DNAME,LOC) VALUES (40,'OPERATIONS','BOSTON');
|
USE TSQLV4;
-- Step 1
BEGIN TRAN;
UPDATE Sales.OrderDetails
SET unitprice += 1.00
WHERE productid = 2;
-- Step 2
SELECT productid, unitprice
FROM Production.Products
WHERE productid = 2;
COMMIT TRAN;
-- Cleanup
UPDATE Production.Products SET unitprice = 19.00
WHERE productid = 2;
UPDATE Sales.OrderDetails SET unitp... |
-------------------------
--- PRACTICE HOMEWORK 03 ---
--심봉선 사원과 같은 부서의 사원의
--부서title, 사원명, 월평균급여조회
select dept_title, dept_code, trunc(avg(salary)) 월평균급여
from employee JOIN department ON dept_code = dept_id
where dept_code = (select dept_code from employee where emp_name='심봉선')
group by dept_title, dept_code;
selec... |
Step 1:
We need to make sure that we have the necessary sources gcc, cpp, make and their dependencies:
[root@rac_sdb ~]# yum install gcc make
/*
Loaded plugins: aliases, changelog, kabi, presto, refresh-packagekit, security, tmprepo, ulninfo, verify, versionlock
Loading support for kernel ABI
Setting up Install P... |
use AdventureWorksLT2008;
SELECT * FROM SalesLT.CustomerAddress;
SELECT * FROM SalesLT.Address;
SELECT * FROM SalesLT.Customer;
SELECT * FROM SalesLT.SalesOrderDetail;
SELECT * FROM SalesLT.SalesOrderHeader;
--1) Write a query to display all customerid's and their complete Address information who lives in US
SELECT ... |
-- Consulta realizada no Data Warehouse AdventureWorksDW2012
-- Banco de dados exemplo da Microsoft
SELECT DimCustomer.FirstName,
DimCustomer.LastName,
DimCustomer.Gender,
DimCustomer.TotalChildren,
DimDate.DateKey,
DimDate.DayNumberOfMonth,
DimDate.EnglishMonthName,
DimDate.CalendarYear,
DimDate.Ca... |
--!Ups--
alter table user add column address varchar(255) default ('Munich') not null; |
#Make Planets Database
#point at Planets DB
USE Planets;
#drop tables so they can be created again
DROP TABLE IF EXISTS
Texts;
DROP TABLE IF EXISTS
Layer;
DROP TABLE IF EXISTS
Planet;
#Create tables
CREATE TABLE Planet(
DistanceFromSunKM int,
Name Varchar(7),
RotationTimedays int,
MoonCount int
);
CREATE TABLE... |
/*Drop TABLE IF EXISTS FriendEvent, FriendImage, Friends, Event, SubUser, User, Device;*/
CREATE TABLE Device
(
DeviceID int NOT NULL UNIQUE,
PRIMARY KEY (DeviceID)
);
CREATE TABLE User
(
UserID int NOT NULL AUTO_INCREMENT UNIQUE,
Email varchar(255) NOT NULL,
Password varchar(255) NOT NULL,
Firstna... |
CREATE TABLE employees (
id SERIAL PRIMARY KEY,
first_name varchar,
last_name varchar
);
CREATE TABLE departments (
id SERIAL PRIMARY KEY,
name VARCHAR UNIQUE
);
CREATE TABLE combinations(
id serial PRIMARY KEY,
colors varchar[]
);
CREATE TABLE owners(
id serial PRIMARY KEY,
color... |
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
USE tempdb
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID ('#ACCTS') AND TYPE = 'U') DROP TABLE #ACCTS
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID ('#RECEIVABLES') AND TYPE = 'U') DROP TABLE #RECEIVABLES
USE MI... |
insert into ROLES (id, role_name) values (1, 'ROLE_ADMIN');
insert into ROLES (id, role_name) values (2, 'ROLE_TEACHER');
insert into ROLES (id, role_name) values (3, 'ROLE_STUDENT'); |
ALTER TABLE "public"."project_req_developments"
DROP COLUMN "rab_id",
DROP COLUMN "total",
ADD COLUMN "rab_id" int4,
ADD COLUMN "total" numeric(255); |
-- +goose Up
CREATE TABLE house_event_questionnaire_shop_answers
(
id int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
user_id int(10) UNSIGNED NOT NULL,
questionnaire_shop_id int(10) UNSIGNED NOT NULL,
ok BOOLEAN DEFAULT FALSE,
created_... |
/* Subqueries
Uses Multiple Select statements (to pull one column)
*/
SELECT Customer_name, Customer_contact
FROM Customers
WHERE cust_id IN
SELECT customer_id
FROM Orders
WHERE order_number IN (SELECT order_number
FROM OrderItems
WHERE prod_name = 'Toothbrush');
/*... |
-- MySQL dump 10.13 Distrib 5.6.32-78.1, for Linux (x86_64)
--
-- Host: localhost Database: theshig2_tdj
-- ------------------------------------------------------
-- Server version 5.6.32-78.1-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_... |
/*
Navicat MySQL Data Transfer
Source Server : mysql
Source Server Version : 50713
Source Host : localhost:3306
Source Database : guestbook
Target Server Type : MYSQL
Target Server Version : 50713
File Encoding : 65001
Date: 2016-08-16 15:03:24
*/
SET FOREIGN_KEY_CH... |
DROP DATABASE IF EXISTS company_roster_db;
CREATE DATABASE company_roster_db;
USE company_roster_db;
CREATE TABLE department
(
id INT
auto_increment NOT NULL,
name VARCHAR
(30) NOT NULL,
primary key
(id)
);
CREATE TABLE role
(
id INT
au... |
CREATE TABLE IF NOT EXISTS apps (
pk integer PRIMARY KEY,
id VARCHAR(256) UNIQUE NOT NULL,
title VARCHAR(256) NOT NULL,
description VARCHAR(2000),
published_timestamp TIMESTAMP,
last_update_timestamp TIMESTAMP
);
|
alter table hpsetting_wfcenter add showCopy varchar2(5)
/
update hpsetting_wfcenter set showCopy = '1'
/ |
/*
Navicat MySQL Data Transfer
Source Server : 阿Q_75
Source Server Version : 50722
Source Host : 100.100.100.75:3306
Source Database : store
Target Server Type : MYSQL
Target Server Version : 50722
File Encoding : 65001
Date: 2018-07-16 14:48:44
*/
SET FOREIGN_KEY_C... |
set heading off
set linesize 80
set feedback off
spool tmp.sql
select distinct
'prompt Update Cascade on table: ' || table_name ||
chr(10) ||
'execute update_cascade.on_table( ''' || table_name || ''' )'
from user_constraints
where constraint_type = 'P'
and constraint_name in
( select r_constraint_name
from user_c... |
-- 19
-- INNER JOIN entfernt alle Elemente, welche NULL in der Vorgesetzt-Spalte hat.
SELECT P.NAME, (P.GEHALT - P2.GEHALT) AS GEHALTSDIFFERENZ
FROM PERSONAL P
INNER JOIN PERSONAL P2 ON P.VORGESETZT = P2.PERSNR |
use pennwise_db;
INSERT INTO pay_frequency
(name)
VALUES
('One-Time'),
('Weekly'),
('Bi-Weekly'),
('Monthly'),
('Yearly'),
('Twice a Month'), |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 22, 2018 at 11:01 AM
-- Server version: 10.1.29-MariaDB
-- PHP Version: 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.2.11-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 9.4.0.5125
-- ------------------------------------------------... |
DROP PROCEDURE CPI.CREATE_REV_ENTRIES;
CREATE OR REPLACE PROCEDURE CPI.create_rev_entries (
p_assd_no IN gipi_polbasic.assd_no%TYPE,
p_coll_amt IN giac_comm_payts.comm_amt%TYPE,
p_line_cd IN giis_line.line_cd%TYPE,
p_sl_cd giac_acc... |
-- fix inconsistent date field formats and one bad age_group record
truncate table staging_eu_pl_adr.eu_product_labels;
insert into staging_eu_pl_adr.eu_product_labels
select product,
substance,
to_date(substring(spc_date, 1, 10), 'DD/MM/YYYY'), -- convert '(opinion) date format from ISO format to standar... |
ALTER TABLE images_image RENAME TO temp_images_image;
CREATE TABLE "images_image" (
"id" integer NOT NULL PRIMARY KEY,
"image" varchar(100) NOT NULL,
"name" varchar(150) NOT NULL UNIQUE,
"pmhid" varchar(40) NOT NULL,
"included" bool NOT NULL,
"alt_text" text NOT NULL,
"caption" text NOT NULL... |
-- MySQL dump 10.13 Distrib 5.7.25, for Linux (x86_64)
--
-- Host: localhost Database: hippo_water_db
-- ------------------------------------------------------
-- Server version 5.7.25-0ubuntu0.18.04.2
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARA... |
update tbl_records
set responsible_id = null, closure_time = %2
where record_id = %1
|
# GROUP BY LECTURE
# The "GROUP BY" clause is used to aggregate a table into various groups of shared characteristics.
#
# Grouping data is often accompanied with the use of aggregate functions to derive additional information
# about the various groupings.
#
# Most common aggregate functions are:
#
# MIN()
# ... |
DELETE FROM HtmlLabelIndex WHERE id=19990
/
DELETE FROM HtmlLabelInfo WHERE indexid=19990
/
DELETE FROM HtmlLabelIndex WHERE id=19991
/
DELETE FROM HtmlLabelInfo WHERE indexid=19991
/
DELETE FROM HtmlLabelIndex WHERE id=19992
/
DELETE FROM HtmlLabelInfo WHERE indexid=19992
/
INSERT INTO HtmlLabelIndex values(19990,'确认是... |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 05, 2017 at 07:26 PM
-- Server version: 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 */... |
CREATE TABLE `tbl_file` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`file_sha1` char(40) NOT NULL DEFAULT '' COMMENT 'file hash',
`file_name` varchar(256) NOT NULL DEFAULT '' COMMENT 'file name',
`file_size` bigint(20) DEFAULT '0' COMMENT 'file size',
`file_addr` varchar(1024) NOT NULL DEFAULT '' COMMEN... |
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 10, 2016 at 05:32 AM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
-- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 10, 2015 at 03:56 AM
-- Server version: 5.6.16
-- PHP Version: 5.5.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... |
select nexttaskid,
nextcaseid,
nextslaseconds,
nextrownumber,
prevtaskid,
prevcaseid,
prevslaseconds,
prevrownumber
from
(select nexttaskid,
nextcaseid,
nextslaseconds,
nextrownumber
from (select nexttaskid,
... |
SELECT dropIfExists('TABLE', 'obsolete_poheadcol');
|
-- SPECIFIC_FUNCS table
-- 05/20/2016
--
-- Associates "functions" as defined at the overall system level with
-- "functions" defined at the CAN unit(node) implementation level
--
-- FUNCTION_NAME varchar(24) PRIMARY KEY,
-- Specific instance of a FUNCTIONS.FUNCTION_TYPE
--
-- FUNCTION_TYPE varchar(24),
-- Type of... |
CREATE DATABASE Minions
USE Minions
CREATE TABLE Minions(
Id INT PRIMARY KEY,
[Name] NVARCHAR(20) NOT NULL,
Age INT
)
CREATE TABLE Towns(
Id INT PRIMARY KEY,
[Name] NVARCHAR(20) NOT NULL,
)
ALTER TABLE Minions
ADD TownId INT FOREIGN KEY REFERENCES Towns(Id)
INSERT INTO Towns(Id, [Name])
VAL... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 15, 2019 at 07:26 AM
-- Server version: 10.3.15-MariaDB
-- PHP Version: 7.1.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
--
-- Database:... |
CREATE TABLE [AsData_PL].[EI_ApprenticeshipBreakInLearning]
(
[ApprenticeshipIncentiveId] uniqueidentifier NOT NULL,
[StartDate] datetime2(7) NULL,
[EndDate] datetime2(7) NULL,
[CreatedDate] [datetime2](7) NULL,
[UpdatedDate] [datetime2](7) NULL,
[AsDm_UpdatedDateTime] d... |
-- =============================================
-- Author: Javier
-- Create date: June 2011
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE spBuyersTypeSelect
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements... |
create database onecode DEFAULT CHARACTER SET = `utf8`;
grant all on onecode.* to 'onecode_w'@'%' identified by 'onecode';
flush privileges; |
CREATE TABLE carrera_requisito_titulacion (
carrera_id INTEGER NOT NULL REFERENCES carrera(id),
requisito_titulacion_id INTEGER NOT NULL REFERENCES requisitos_titulaciones(id),
PRIMARY KEY(carrera_id, requisito_titulacion_id)
); |
ALTER TABLE addons
ADD COLUMN `iarc_purged` bool NOT NULL DEFAULT false;
|
CREATE DATABASE IF NOT EXISTS utilities;
CREATE TABLE `owner` (
`id_owner` INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
`name` VARCHAR(45) NOT NULL,
`surname` VARCHAR(30) NOT NULL,
`passport_series` VARCHAR(10) NOT NULL,
`passport_number` INT(6) UNSIGNED NOT NULL,
)ENGINE=InnoDB DEFAULT CHARSET=utf8; |
alter table CUBAMAPEXAMPLE_SALES_PERSON add column PHOTO_ID varchar(36) ;
|
-- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 20, 2014 at 05:29 PM
-- Server version: 5.6.12-log
-- PHP Version: 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 ... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 10, 2017 at 03:15 AM
-- 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... |
-- パスワードリセット
drop table if exists PASSWORD_RESETS cascade;
create table PASSWORD_RESETS (
ID character varying(256) not null
, USER_KEY character varying(256)
, ROW_ID character varying(64)
, INSERT_USER integer
, INSERT_DATETIME timestamp
, UPDATE_USER integer
, UPDATE_DATETIME timestamp
, DELETE_FLAG... |
create table product_info
(
product_id varchar(32) not null,
product_name varchar(64) not null comment '商品名称',
product_price decimal(8,2) not null comment '单价',
product_stock int not null comment '库存',
product_description varchar(64) comment '描述',
product_icon varchar(512) comment '小图',
category_type int not nu... |
CREATE TABLE EVENT(ID INT PRIMARY KEY, EVENT_NAME VARCHAR(255),EVENT_DESCRIPTION VARCHAR(4000),
EVENT_DATE DATE, VENUE VARCHAR(255));
CREATE TABLE EVENT_SUBSCRIPTION(ID INT PRIMARY KEY,EVENT_ID INT ,USER_NAME VARCHAR(255),
IS_SUBSCRIBED varchar(10), SUBSCRIPTION_DATE DATE); |
--onatario population
DROP TABLE IF EXISTS ontario_synthetic_population_long;
CREATE TABLE ontario_synthetic_population_long (
rowid integer primary key,
hhid integer,
taz integer,
hhinc integer,
dtype integer,
zone_id integer,
num_pp integer);
COPY ontario_synthetic_population_long from 'C:/mto_longDistance... |
CREATE DATABASE IF NOT EXISTS testDB;
GRANT ALL PRIVILEGES ON DATABASE testDB TO test;
CREATE TABLE IF NOT EXISTS requests (
data VARCHAR
);
|
# This is a fix for InnoDB in MySQL >= 4.1.x
# It "suspends judgement" for fkey relationships until are tables are set.
SET FOREIGN_KEY_CHECKS = 0;
-- ---------------------------------------------------------------------
-- profile
-- ---------------------------------------------------------------------
DROP TABLE I... |
CREATE PROCEDURE [Enhabit].[SearchForListings]
@priceLow decimal,
@priceUpper decimal,
@bedrooms int,
@bathrooms int,
@laundry int,
@parking int,
@animals int,
@airConditioning bit,
@leaseType int,
@buildingType int,
@startDate datetime
AS
BEGIN
SET NOCOUNT ON;
... |
drop table if exists sites;
create table sites
(
label text primary key,
name text,
latitude float,
longitude float,
status text
);
drop table if exists site_data;
create table site_data
(
label text,
metric text,
timestamp timestamp with time zone,
measurement float
);
create index on site_data (label, times... |
SELECT * FROM laravel.migrations; |
select
state_id,
state_name,
state_type
from tbl_states
where template_id = %1
order by state_name
|
BEGIN TRANSACTION;
INSERT INTO users (name, email, entries, joined)
values (
'Jessie',
'jessie@gmail.com',
5,
'2019-12-31'
);
INSERT INTO login (hash, email)
values (
'$2a$10$xqv5dA5PKNITF7QStMsj9O1MGfmwZDX8s4p1tzLczgVD1oNoIt4x.',
'jessie@gmail.com'
);
COMMIT; |
select * from HumanResources.vEmployee
select * from person.BusinessEntity
where BusinessEntityID < 3
select * from HumanResources.Employee
where BusinessEntityID < 3
select * from person.Person
where BusinessEntityID < 3
select * from person.BusinessEntityAddress
where BusinessEntityID < 3
select * from person.Ad... |
CREATE or REPLACE TRIGGER Tri_CRM_CustomerInfoShare after update ON CRM_CustomerInfo
FOR each row
Declare
crmid_1 integer;
oldmanagerstr_1 varchar2(200);
managerstr_1 varchar2(200);
begin
crmid_1 := :new.id;
oldmanagerstr_1 := :old.manager;
managerstr_1 := :new.manager;
if (managerstr_1 <> oldmanagerstr_1 )
the... |
-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64)
--
-- Host: localhost Database: php
-- ------------------------------------------------------
-- Server version 8.0.26
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4010... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.