text stringlengths 6 9.38M |
|---|
-- +migrate Up
CREATE TABLE hod
(
emp_id varchar(20) REFERENCES employee (id) PRIMARY KEY,
dept_id integer REFERENCES department (id) UNIQUE,
start_date DATE NOT NULL,
end_date DATE
);
CREATE TABLE hod_history
(
emp_id varchar(20),
dept_id integer,
start_date DATE NOT NULL,
end_date DA... |
DROP TABLE IF EXISTS t_course;
CREATE TABLE IF NOT EXISTS `t_course`(
`id` BIGINT UNSIGNED PRIMARY KEY AUTO_INCREMENT COMMENT '表主键',
`course_number` VARCHAR(64) UNIQUE NOT NULL COMMENT '课程编号',
`name` VARCHAR(64) COMMENT '课程名称',
`learn_hours` VARCHAR(10) COMMENT '学时',
`credit` VARCHAR(10) COMMENT '学分',
`avg... |
--drop table quotes;
create table quotes (
time timestamp default current_timestamp,
symbol varchar(10),
price float
);
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 20-10-2021 a las 10:05:23
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... |
WITH constraints AS (
SELECT parent_object_id, parent_column_id, Name, definition, 'DEFAULT' AS [ConstraintType] FROM sys.default_constraints
UNION ALL
SELECT parent_object_id, parent_column_id, Name, definition, 'CHECK' AS [ConstraintType] FROM sys.check_constraints)
SELECT
t.Name AS [TableName],
... |
create table user_details (
id varchar(255) not null,
first_name varchar(100),
last_name varchar(100),
middle_name varchar(100),
age integer,
gender varchar(10),
phone varchar(20),
zip varchar(20) null,
primary key (id)); |
CREATE TABLE `operation_log` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`firm_id` INT(11) NOT NULL,
`username` VARCHAR(50) NOT NULL,
`host_id` VARCHAR(50) NOT NULL,
`operation` VARCHAR(50) NOT NULL,
`result` SMALLINT(6) NOT NULL COMMENT '1:success;0:failed',
`create_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,... |
--01
--CREATE DATABASE WMS
--USE WMS
-- tova dava 18/30
CREATE TABLE Clients(
ClientId Int Primary KEY IDENTITY,
FirstName VARCHAR(50) NOT NULL,
LastName VARCHAR(50) NOT NULL,
Phone CHAR(12) NOT NULL
)
CREATE TABLE Mechanics(
MechanicId Int Primary KEY IDENTITY,
FirstName VARCHAR(50) NOT NULL,
LastName VARCHAR(50) NOT... |
#------------------------------------------------------------
# Script MySQL.
#------------------------------------------------------------
#------------------------------------------------------------
# Table: salle
#------------------------------------------------------------
CREATE TABLE salle(
sal... |
/*
This script inserts:
- 3 users - each with different role to have all options available for mocking
*/
--USERS--
INSERT INTO USER_TABLE(user_id,username,password,role,creation_date)
VALUES (1,'admin','password','ROLE_ADMIN',CURRENT_TIMESTAMP());
INSERT INTO USER_TABLE(user_id,username,password,role,creation_date)... |
SELECT 'Maliuha' student FROM DUAL;
|
ET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `dp1sep2016`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `vendita`
--
CREATE TABLE `vendita` (
`id` int(11) NOT NULL,
`quantity` int(11) NOT NULL,
`price` int(11) NOT NUL... |
-- nb: this query assume it will take a variety of field content: refnames, messy free text, and output something "clean"
SELECT DISTINCT coom.id AS id,
STRING_AGG(DISTINCT fcd.datedisplaydate, '␥') AS fieldcollectiondate_ss
FROM collectionobjects_omca coom
left outer join collectionobj... |
comes
-- indented 1
--\template plain
--\endtemplate
text 3
text 4
end
|
CREATE TABLE members (
memberid mediumint NOT NULL AUTO_INCREMENT PRIMARY KEY,
firstname varchar(50) NOT NULL,
surname varchar(50) NOT NULL,
numtel varchar(20) NOT NULL,
mail varchar(100) NOT NULL,
adress varchar(255) NOT NULL,
bankid varchar(29) NOT NULL,
trainingi... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 5.6.21 - MySQL Community Server (GPL)
-- SO del servidor: Win32
-- HeidiSQL Versión: 9.3.0.4984
-- --------------------------------------------------------
/*... |
spool grants_novos_for_users.log
set echo on feedback on timing on
-------------------------------------------------------
-- GRANT DE OBJETOS DE ROLES A USUARIOS MATERA E SISTEMICOS --
-------------------------------------------------------
GRANT "CONNECT" TO "BDD";
GRANT "RESOURCE" TO "BDD";
--------------... |
-- DML/DDL/DCL Part 2
-- Does the following statement use the Data Definition Language (DDL) or the
-- Data Manipulation Language (DML) component of SQL?
SELECT column_name FROM my_table;
Answer: Qurying data from tables is part of the data manipulation language.
|
DELETE
FROM ${ohdsiSchema}.sec_role_permission
WHERE permission_id IN (SELECT id FROM ${ohdsiSchema}.sec_permission WHERE value NOT IN ('user:me:get'))
AND role_id = (SELECT id FROM ${ohdsiSchema}.sec_role WHERE name = 'public');
DELETE
FROM ${ohdsiSchema}.sec_role_permission
WHERE permission_id IN (SELECT id FROM ${o... |
/*
CREATE TABLE IF NOT EXISTS numbers (
number BIGINT,
timestamp BIGINT
);
*/
CREATE TABLE IF NOT EXISTS BittrexBuffer (
id_buffer SERIAL PRIMARY KEY,
id_transaction BIGINT NOT NULL,
b_date DATE NOT NULL,
b_day INT NOT NULL,
b_month VARCHAR(15) NOT NULL, --można zamienić na int
b_year I... |
insert into vgn_mem values('AABBAABB','DOB1','EMAIL1','phone1','Address',78190,'France');
insert into vgn_mem values('BGDBCBDB','DOB2','EMAIL2','phone2','Address2',78360,'France'); |
# Load the airline delays data into MySQL
CREATE DATABASE airlines;
USE airlines;
DROP TABLE IF EXISTS flights;
CREATE TABLE flights (
`year` smallint(4) DEFAULT NULL,
`month` smallint(2) DEFAULT NULL,
`day` smallint(2) DEFAULT NULL,
`dep_time` smallint(4) DEFAULT NULL,
`dep_delay` smallint(4) DEFAULT N... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 12, 2018 at 11:37 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
CREATE TABLE tasks (
id INTEGER PRIMARY KEY,
content TEXT NOT NULL,
limit_time TEXT DEFAULT "",
workload INTEGER,
place_id INTEGER DEFAULT 0,
importance INTEGER
);
CREATE TABLE places (
id INTEGER PRIMARY KEY,
place_name TEXT NOT NULL,
importance INTEGER NOT NULL
);
|
--------------------------------------------------------
-- File created - Monday-June-09-2008
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table TEST_METADATA
--------------------------------------------------------
CREATE TABLE "... |
USE lab2db;
DROP TABLE IF EXISTS person;
CREATE TABLE person (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30) NOT NULL
); |
SELECT Title FROM Ads
ORDER BY Title ASC |
MAP_COUNTRY {
SELECT * FROM Pais WHERE nomePais = ?
}
MAP_LIST_PONTOS_REF {
SELECT PontoReferencia.idPontoRef, PontoReferencia.nome, PontoReferencia.descricao, PontoReferencia.privadoPontoRef,
ROUND(AVG(Avaliacao.estrelas)) AS ava
FROM PontoReferencia LEFT JOIN Avaliacao ON PontoReferencia.idPontoR... |
create table migrate.user (
id bigint(10) auto_increment not null,
login varchar(100) not null,
email varchar(100) not null,
password varchar(100) not null,
password_force_change int(1) not null,
primary key (id)
);
alter table migrate.user add constraint user_uk1 unique(login);
alter table migrate.user... |
-- --------------------------------------------------------
--
-- Estrutura da tabela `tb_cbo`
--
CREATE TABLE `tb_cbo` (
`CBO` varchar(6) DEFAULT NULL,
`Descricao` varchar(140) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Extraindo dados da tabela `tb_cbo`
--
INSERT INTO `tb_cbo` (`CBO`, `Descrica... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 27, 2016 at 08:49 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... |
DROP DATABASE IF EXISTS VTIMarkManagement;
CREATE DATABASE VTIMarkManagement;
USE VTIMarkManagement;
-- câu 1:Tạo table với các ràng buộc và kiểu dữ liệu
DROP TABLE IF EXISTS Trainee;
CREATE TABLE Trainee(
Trainee_ID TINYINT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
First_Name VARCHAR(20) NOT NULL,
Last_Name VARC... |
insert into Users values("user1@gmail.com", "password1", "username1", "N/A");
insert into Users values("user2@gmail.com", "password2", "username2", "N/A");
insert into Users values("user3@gmail.com", "password3", "username3", "N/A");
insert into Users values("user4@gmail.com", "password4", "username4", "N/A");... |
-- QUALITY MODULE COMMON SCHEMA SCRIPT
-- FOREIGN KEYS |
CREATE TABLE `supermarket`.`shop` (
`Shop_id` INT(10) NOT NULL AUTO_INCREMENT ,
`Shop_Name` VARCHAR(30) NOT NULL ,
`Shop_Address` VARCHAR(100) NOT NULL ,
`Shop_Opening_Time` TIME NOT NULL ,
`Shop_Closing_Time` TIME NOT NULL ,
PRIMARY KEY (`Shop_id`)
) ENGINE = InnoDB COMMENT = 'Shop Table';
CREATE TABLE `... |
CREATE TABLE transactions (
id int,
txTime timestamp,
amount decimal
); |
-- 608. Tree Node
-- Given a table tree, id is identifier of the tree node and p_id is its parent node's id.
--
-- +----+------+
-- | id | p_id |
-- +----+------+
-- | 1 | null |
-- | 2 | 1 |
-- | 3 | 1 |
-- | 4 | 2 |
-- | 5 | 2 |
-- +----+------+
-- Each node in the tree can be one of three types:
-- ... |
--Use the **NOT** keyword to select all records in the **Students** table where **City** is NOT "Philadelphia".
SELECT * FROM Students WHERE city IS NOT 'Philadelphia'; |
-- -----------------------------------------------------
-- Table `dbo`.`Stats`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `dbo`.`Stats` ;
CREATE TABLE IF NOT EXISTS `dbo`.`Stats` (
`statId` INT(11) NOT NULL AUTO_INCREMENT ,
`str` INT(11) NULL DEFAULT '0' ,
`int` INT(11) NULL... |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
--
-- Database: `gogreen`
--
-- --------------------------------------------------------
--
-- Table structure for table `admin`
--
CREATE TABLE `admin` (
`id` int(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT NOT ... |
create table UM_USERS (
ID int not null AUTO_INCREMENT,
USERNAME varchar(100) not null,
PASSWORD varchar(100) not null,
EMAIL varchar(100) not null,
PRIMARY KEY(ID)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8 ; |
create table users (
user_id int generated always as identity,
first_name text not null,
last_name text not null,
email text not null,
is_active boolean not null,
password text not null,
salt text not null,
primary key (user_id)
);
create table contacts (
contact_id int generated ... |
CREATE LOGIN [MIDDLEEAST\ssdtsqlpartnersme]
FROM WINDOWS WITH DEFAULT_LANGUAGE = [us_english];
|
CREATE TABLE `user` (
`identity` varchar(45) NOT NULL,
`drugrelated` varchar(1) DEFAULT NULL,
`inspect` varchar(1) DEFAULT '1',
`fullmark` varchar(1) DEFAULT NULL,
`licensetype` varchar(1) DEFAULT NULL,
`name` varchar(45) DEFAULT NULL,
`noticedate` datetime DEFAULT NULL,
`phone` varchar(45) DEFAULT NULL... |
--
-- Database: `clandestine`
--
USE `clandestine`;
-- --------------------------------------------------------
--
-- Table structure for table `message_template`
--
CREATE TABLE IF NOT EXISTS `message_template` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`message` text NOT NULL,
`dis... |
ALTER TABLE job_result
ADD COLUMN result_name character varying(32) DEFAULT '',
ADD COLUMN result_title character varying(256),
ALTER COLUMN shape SET not null,
DROP CONSTRAINT pk_job_result
;
UPDATE job_result SET result_name = '';
ALTER TABLE job_result
ADD CONSTRAINT pk_job_result PRIMARY KEY (job_id, sh... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Czas generowania: 18 Mar 2021, 12:53
-- Wersja serwera: 10.4.11-MariaDB
-- Wersja PHP: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
CREATE TABLE routinebloods (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
StudyNo char(255),
Hour char(255),
UEs char(255),
Labglu char(255),
Venabgs char(255),
Bm char(255),
Bicarbonate char(255),
PRIMARY KEY (id)
);
|
CREATE TABLE file_table(
id INT AUTO_INCREMENT,
name char(50) DEFAULT NULL,
type char(10) DEFAULT NULL,
location CHAR(200) DEFAULT NULL,
PRIMARY KEY (id)
);
create table file_repo (
id int AUTO_INCREMENT,
file BLOB DEFAULT Not NULL,
PRIMARY KEY (id)
); |
SELECT 1 FROM SHY_PETBLOCK pet, SHY_PLAYER play
WHERE pet.shy_player_id = play.id
AND play.uuid = ?; |
SELECT
C.Name AS Customers
FROM
Customers AS C
WHERE
C.Id NOT IN (
SELECT
O.CustomerId
FROM
Orders AS O
); |
INSERT INTO membership(brazilian_id, brazil_id) VALUES
(
/* brazilianId */1,
/* brazilId */1
); |
-- --------------------------------------------------------
-- Хост: 127.0.0.1
-- Версия сервера: 5.7.23 - MySQL Community Server (GPL)
-- Операционная система: Win64
-- HeidiSQL Версия: 9.5.0.5196
-- --------------------------------------------------------
/*... |
SET @num_account = '002341';
SET @date = '2021-10-5';
SELECT IF( sum(if(type_operation.tag = 1, 1, -1) * amount) > 0,
sum(if(type_operation.tag = 1, 1, -1) * amount),
0
) as dolg
From fact_operation, credit_contract, type_operation
WHERE credit_contract.num = @num_account
and credit_contract.f... |
# Ajoute document
INSERT INTO `document` (
`filename_document`,
`taille_document`,
`display_document`,
`fk_client`,
`fk_user`,
`date_upload_document`
) VALUES (
:filename,
:taille,
:display,
:client,
:user,
:date
);
|
INSERT INTO licence_petreg_licence_oper VALUES ('001',
'ExxonMobil Exploration '+'@'+' Production Norway AS',
20756,
2835212,
'9999-12-31',
'2013-05-08');
INSERT INTO licence_petreg_licence_oper VALUES
('006',
'Total E'+'@'+'P Norge AS',
20804,
2410708,
'9999-12-31',
'2013-05-08');
INSERT INTO licence_petreg... |
CREATE TABLE IF NOT EXISTS `hosts` (
hostid serial PRIMARY KEY,
domain TEXT,
onion TEXT,
options TEXT,
created datetime DEFAULT NOW(),
modified datetime,
KEY(`onion`),
KEY(`domain`)
);
|
WITH weapon as (
SELECT player_name,
weapon_name,
SUM(attack_count) sum_attack_count,
RANK() OVER (PARTITION BY player_name ORDER BY SUM(attack_count) DESC) use_rank,
RANK() OVER (PARTITION BY player_name ORDER BY COUNT(weapon_name) DESC) get_rank
FROM `kr_weapons`
... |
-- AlterTable
ALTER TABLE "admin" ADD COLUMN "firstName" CHAR(30);
|
COLUMN owner format a50
COLUMN object_name format a50
SELECT owner, object_name, object_type, status
FROM dba_objects
WHERE LOWER(object_name) LIKE '%&1%'
order by 1,3,4; |
with pth as (
select 1 as rn, h.id, h.parentid,h.typeoe,h.stext,h.begda,h.endda,h.cfo,h.is_archive
from orgeh h
where id = '51047541'
union all
select 2 as rn, h.id, h.parentid,h.typeoe,h.stext,h.begda,h.endda,h.cfo,h.is_archive
from orgeh h
where id = '51054438'
union all
select 3 as rn, h.id, h.parentid,h.type... |
create table agent
(
id blob not null,
creation_time timestamp not null,
last_update_time timestamp not null,
version bigint not null,
name varchar(255) not null,
url varchar(255) not null,
api_key varchar(255),
... |
CREATE DATABASE turner;
USE turner;
CREATE TABLE role (
id int primary key,
name varchar(15) NOT NULL
);
INSERT INTO role VALUES
(1, "admin"),
(2, "editor"),
(3, "author"),
(4, "contributor"),
(5, "users");
/* Ingat buat subscriber (fitur) */
CREATE TABLE users (
id int primary ke... |
DROP TABLE IF EXISTS public.user_roles;
DROP TABLE IF EXISTS public.role;
DROP TABLE IF EXISTS public.users;
CREATE TABLE public.role
(
id bigint NOT NULL,
code character varying(255),
name character varying(255),
CONSTRAINT role_pkey PRIMARY KEY (id)
);
CREATE TABLE public.users
(
id bigint NOT N... |
USE park
--用户表
CREATE TABLE `park_user`(
`userId` bigint(11) unsigned NOT NULL AUTO_INCREMENT,
`realName` varchar(32) NOT NULL DEFAULT '' COMMENT '真实姓名 ',
`passWord` varchar(128) NOT NULL DEFAULT '' COMMENT '密码',
`mobile` varchar(32) NOT NULL DEFAULT '' COMMENT '手机号',
`cardType` tinyint(1) NOT NULL DEFAULT '... |
CREATE TABLE Species (
s_Species_ID varchar (10) not null,
s_Park_name char (45) not null,
s_Category char (25) not null,
s_Order char (25),
s_Family char (25),
s_Scientific_Name varchar (55) not null,
s_Common_Names varchar (170) not null,
s_Record_Status char (18) not null,
s_Occurence varc... |
LISTAR
SBE.tcfg_tipo_documento (id_tipo_documento)
SBE.tcad_upload_documento (id_upload_documento)
SBE.tcad_arquivo_documento_usuario (id_usuario where id_situacao_registro "em aprovação")
SBE.tcad_usuario (id_usuario)
sbe.tcad_solicitacao_cartao (id_usuario where id_situacao_registro "em aprovação")
sbe.tcad_pr... |
/**
* SQL statement for insert new record into FR_CUSTOMER_LIKE_HISTORY
*
* @author: QuocHN
́* $Id: AddLikeService_insertLikeHistory_Ins_01.sql 14570 2014-07-16 08:42:22Z p_hoan_kuokku $
*/
INSERT INTO FR_CUSTOMER_LIKE_HISTORY (
CUSTOMER_IDENTIFY_ID
,SHISETSU_CUSTOMER_VOICE_ID
,CREATE_DATE
... |
ALTER TABLE "ClientFileMetadata" DROP COLUMN "CreatedDate"
|
CREATE DATABASE `IFood` /*!40100 DEFAULT CHARACTER SET latin1 */;
CREATE TABLE `user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`email` varchar(60) NOT NULL,
`password` varchar(100) NOT NULL,
`name` varchar(45) NOT NULL,
`status` enum('AvailableOnline','AvailableOffline','UnavailableOffline') NOT NULL,
`m... |
CREATE SCHEMA toms_marketing_stuff DEFAULT CHARACTER SET utf8mb4;
USE toms_marketing_stuff;
CREATE TABLE publisher_spend (
publisher_spend_id VARCHAR(45) NOT NULL,
publisher_id INT NOT NULL,
month DATE NOT NULL,
spend DECIMAL(10,2) NOT NULL,
PRIMARY KEY (publisher_spend_id)
);
CREATE TABLE publishers (... |
# Host: localhost (Version 5.7.20-0ubuntu0.16.04.1)
# Date: 2017-12-08 16:52:50
# Generator: MySQL-Front 6.0 (Build 2.20)
#
# Structure for table "bgfile"
#
CREATE TABLE `bgfile` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`sid` int(11) unsigned NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL DEFAULT '',
`... |
CREATE PROC [ERP].[Usp_Sel_Requerimiento_By_ID]
@ID INT
AS
BEGIN
SELECT R.ID
,R.Fecha
,R.IdTipoComprobante
,R.Serie
,R.Documento
,R.IdEntidad
,E.Nombre NombreEntidad
,ETD.IdTipoDocumento IdTipoDocumentoEntidad
,ETD.NumeroDocumento NumeroDocumentoEntidad
,R.DiasVencimiento
,R.Fec... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.5 (Ubuntu 12.5-0ubuntu0.20.04.1)
-- Dumped by pg_dump version 12.5 (Ubuntu 12.5-0ubuntu0.20.04.1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_str... |
PARAMETERS [@TesoreriaID] Text (255);
SELECT A.TesoreriaID,
A.Item,
A.TipoOpeID,
C.TipoOpe,
A.RubroID,
D.Llave,
D.Concepto,
A.EntidadID,
G.Llave,
G.TipoDocumento,
G.RUC,
G.RazonSocial,
G.NombreComercial,
A.ComprobanteID,
... |
SELECT [fs].[name] AS [ForeignTableName],
[fschemas].[name] AS [ForeignTableOwner],
[rs].[name] AS [PrimaryTableName],
[rschemas].[name] AS [PrimaryTableOwner],
[sfk].[name] AS [ConstraintName],
[fc].[name] AS [ForeignColumnName],
[rc].[name] AS [PrimaryColumnName],
... |
/*******************************************************************************
* File Name: cyfittergnu.inc
*
* PSoC Creator 4.1
*
* Description:
*
* This file is automatically generated by PSoC Creator.
*
********************************************************************************
* Copyright (c) 2007-2017 Cy... |
-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.0.41-community-nt
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CO... |
SET SERVEROUT ON
CREATE OR REPLACE FUNCTION qtd_salario_maior
(
empid employees.employee_id%TYPE
)
RETURN NUMBER
IS
qtd NUMBER;
BEGIN
SELECT COUNT(*) INTO qtd
FROM employees
WHERE salary > (SELECT salary
FROM employees
WHERE employee_id = empid);
return q... |
create table Users (user_id integer, age integer);
insert into Users (user_id, age) values (1, 23);
insert into Users (user_id, age) values (2, 30);
insert into Users (user_id, age) values (3, 22);
insert into Users (user_id, age) values (4, 43);
insert into Users (user_id, age) values... |
insert into gp_gameid_cfg VALUE("173","幸运大转盘","幸运大转盘");
insert into gp_gameid_cfg VALUE("258","开宝箱活动","开宝箱活动");
insert into gp_gameid_cfg VALUE("204","杭麻周冠军赛","新杭州麻将");
insert into gp_gameid_cfg VALUE("208","双扣争霸赛","双扣争霸赛");
insert into gp_gameid_cfg VALUE("210","四国军棋","四国军棋");
insert into gp_gameid_cfg VALUE("401","测试... |
select * from dba_directories;
grant read,write ON DIRECTORY data_pump_dir to MGPROD;
-- run as oracle on odb80
-- place dmp file in directory tied to "data_pump_dir" use query above to query location
-- *********** Import as MGPROD
-- impdp MGPROD/odb80mgprod@KCDEV SCHEMAS=MGPROD DIRECTORY=data_pump_dir DUMPFILE=... |
--
-- @author: Tomecode.com
-- @Description: Delete all assets which have status 30 i.e. delete
delete from assetxml where assetid in (select a.ID from assets a where a.ACTIVESTATUS=30);
delete from assetrelationships where secondaryid in (select a.ID from assets a where a.ACTIVESTATUS=30);
delete from assetre... |
-- falla porque no existe el DNI y no se cumple la reestriccion de integridad
UPDATE Vigila
SET Num_colegiado='05'
WHERE DNI='01';'
--falla porque no existe el tipo de diabetes y no se cumple la reestriccion de integridad
UPDATE Padece
SET Tipo='Tipo ERROE'
WHERE DNI='01';
--falla por el formato de fecha
UPDATE Di... |
CREATE TABLE public.da_patient_type (
patient_type_cd character varying(32) NOT NULL,
patient_type_name character varying(32),
patient_type_desc character varying(32),
record_status character(1),
loc_cd character varying,
org_cd character varying(8) NOT NULL,
grp_cd character varying(8) NOT... |
CREATE PROC [ERP].[Usp_Sel_Propiedad_Borrador_Pagination]
AS
BEGIN
SELECT PR.ID ID,
PR.Nombre
FROM [Maestro].[Propiedad] PR
LEFT JOIN [PLE].[T6UnidadMedida] UM
ON UM.ID = PR.IdUnidadMedida
WHERE PR.FlagBorrador = 1 AND PR.FlagBorrador = 1
END
|
select login_name,user_name,email,login_password,id from M_USER;
asd@trs.com , a78cda55382fa79dbc6c83e17b26010a , 1 ,
wang_j@shciq.gov.cn , a78cda55382fa79dbc6c83e17b26010a , 2121232 ,
747695656@qq.com , a78cda55382fa79dbc6c83e17b26010a , 2125375 ,
1356041290@qq.com , a78cda... |
# ************************************************************
# Sequel Pro SQL dump
# Version 4096
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# Host: 127.0.0.1 (MySQL 5.6.20)
# Database: xt_sports
# Generation Time: 2015-08-11 01:21:56 +0000
# ***********************************************... |
CREATE DATABASE IF NOT EXISTS seghir_galmot_lecoq;
use seghir_galmot_lecoq;
-- Create table of exemple
CREATE TABLE IF NOT EXISTS users
(
id INT NOT NULL AUTO_INCREMENT,
username VARCHAR(255) NOT NULL,
password VARCHAR(1000) NOT NULL,
mail VARCHAR(1000) NOT NULL,
api_key VARCHAR(1000) NOT NULL,
... |
CREATE PROC ERP.Usp_Del_TrabajadorCuenta
@ID INT
AS
BEGIN
DELETE FROM ERP.TrabajadorCuenta WHERE ID = @ID
END
|
-- Get all invoices where the unit_price on the invoice_line is greater than $0.99.
SELECT * FROM invoice
JOIN invoice_line
ON invoice.invoice_id = invoice_line.invoice_id
WHERE invoice_line.unit_price > .99;
-- Get the invoice_date, customer first_name and last_name, and total from all invoices.
SELECT i.invoice_da... |
INSERT INTO groups (id, name, creator_id, color)
VALUES ('49e6f2b3-b6c5-447c-8f79-e3baa07fa9ec', 'Mamas Retro Centrum', 'a450278e-241e-4206-b3cf-ace05911a7da', 'color-1');
INSERT INTO groups (id, name, creator_id, color)
VALUES ('29d08eb6-a3ad-49b4-8f88-0b88c519f4bb', 'Mamas Retro Gårdsten', 'a450278e-241e-4206-... |
SELECT
CASE WHEN
--A.物件番号
A.SUPPLIES_NO IS NULL THEN B.SUPPLIES_NO --B.物件番号
ELSE A.SUPPLIES_NO END AS SUPPLIES_NO, --A.物件番号
--A.契約番号
CASE WHEN A.CONTRACT_NO IS NULL THEN B.CONTRACT_NO--B.契約番号
ELSE A.CONTRACT_NO END AS CONTRACT_NO --契約番号
FROM
--SUBA(所属契約情報): ... |
create table users (
user_id bigint generated by default as identity,
user_name varchar(255),
first_name varchar(255),
last_name varchar(255),
primary key (user_id));
create table followers (
followed_user_id bigint not null,
follower_user_id bigint not null
);
create table tweets (
tweet_id b... |
/*
Date: 22/04/2021 12:55:08
*/
-- ----------------------------
-- Table structure for book
-- ----------------------------
DROP TABLE IF EXISTS `book`;
CREATE TABLE `book` (
`bookId` int(0) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`author` v... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 06 Apr 2017 pada 08.18
-- Versi 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 ... |
SELECT D.LNAME, D.FNAME, D.SEX, D.DSSN
FROM DOCTOR D, PROJECT P
WHERE PNAME='New medicine for tumor' AND D.DNUM=P.DNUM;
|
CREATE TABLE M_CREDITOS(
PERIODO VARCHAR(6),
TIP_REG INT,
COD_SBS_CLI DECIMAL(10),
COD_EMPRESA DECIMAL(10),
TIP_CREDITO VARCHAR(45),
COD_CUENTA VARCHAR(45),
CONDICION INT,
SALDO DECIMAL(10,2),
CLASIFICACION INT
);
CREATE TABLE M_CLIENTEDEUDA
( PERIODO VARCHAR(6),
TIPREG INT,
CODSBSCLI DECIMAL(10),
F... |
INSERT INTO USER (user_id, password, username)
VALUES ('db34979d-350e-43b7-87d0-f2ce9e39adab', '99C623C85B6594AC:1000:1941B6B430C9A367B47E162AF4D6827F7405DE18', 'u1'),
('db34979d-350e-43b7-87d0-f2ce9e39adaa', '99C623C85B6594AC:1000:1941B6B430C9A367B47E162AF4D6827F7405DE18', 'u2'),
('db34979d-350e-43b7-87d... |
CREATE TABLE users
(
id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
remember_token VARCHAR(255),
remember_identifier VARCHAR(255)
);
INSERT INTO users (id, name, email, password, remember_token, remember_i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.