text stringlengths 6 9.38M |
|---|
INSERT INTO
"rating_logs"
VALUES
($ 1, $ 2, $ 3) RETURNING 1,
1,
"4"
INSERT INTO
"rating_logs"
VALUES
($ 1, $ 2, $ 3) RETURNING 2,
1,
"4"
INSERT INTO
"rating_logs"
VALUES
($ 1, $ 2, $ 3) RETURNING 3,
1,
"4"
INSERT INTO
"rating_logs"
VALUES
($ 1, $ 2, $ 3) R... |
CREATE TABLE "CMDS_M_ICHITAIRO_DIV"
(
"ICHITAIRO" VARCHAR2 (1) NOT NULL ENABLE,
"ICHITAIRO_NAME" NVARCHAR2(10),
CONSTRAINT "CMDS_M_ICHITAIRO_DIV_PK" PRIMARY KEY ("ICHITAIRO") USING INDEX
TABLESPACE NDB_USERS1
)
TABLESPACE NDB_USERS1
NOLOGGING
PARALLEL 96
;
|
DROP SCHEMA IF EXISTS pydbreport;
CREATE SCHEMA `pydbreport` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ;
CREATE TABLE `pydbreport`.`famous_people` (
`id` INT NOT NULL AUTO_INCREMENT ,
`first_name` VARCHAR(150) NULL ,
`last_name` VARCHAR(155) NULL ,
`rating` INT NULL ,
PRIMARY KEY (`id`) );
INSERT INTO `... |
SELECT DISTINCT s.product_id AS product_id, p.product_name AS product_name
FROM sales s
JOIN product p
USING(PRODUCT_id)
WHERE sale_date BETWEEN '2019-01-01' AND '2019-03-31' AND s.Product_id NOT IN
(select product_id
from sales
where sale_date not between '2019-01-01' and '2019-03-31')
-- solution 2
SELECT p.product... |
DECLARE
v_Message varchar2(4000) ;
v_Parameters varchar2(4000);
v_Context varchar2(300);
v_tmp number;
v_userLang varchar2(200);
v_sql varchar2(8000);
v_pName varchar2(255);
v_pValue varchar2(2000);
v_pPos number;
v_l10n varchar2(255);
v_result nvarchar2(2000);
BEGIN
... |
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: php-radius
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.33-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_S... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 19, 2017 at 04:21 AM
-- Server version: 5.7.19
-- PHP Version: 7.1.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
CREATE DATABASE cl_10001;
USE cl_10001;
CREATE TABLE clientes
(
cl_ID INT NOT NULL,
cl_nome VARCHAR(50) NOT NULL,
cl_morada VARCHAR(100),
cl_IP VARCHAR(50) NOT NULL,
cl_port INT NOT NULL,
CONSTRAINT REPETIDO_ID_CLIENTE
PRIMARY KEY(cl_ID)
);
CREATE TABLE moldes
(
m_IDCliente INT NOT NULL,
... |
select
s.name,
m.metrics,
m.value
from
( select
name,
metrics,
value,
messagedate,
messageid
from
inboxtemp
) s
left outer join
( select
metrics,
value,
mod
from
meta_lambda_alert
) m
on
s.met... |
DROP TABLE IF EXISTS `oauth_client_details`;
CREATE TABLE `oauth_client_details` (
`client_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '客户端标 识',
`resource_ids` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '接入资源列表',
`client_secret` varchar(255) CH... |
CREATE DATABASE tutorial_crud;
use tutorial_crud;
CREATE TABLE alumnos (
id INT(11) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
nombre VARCHAR(30) NOT NULL,
apellido VARCHAR(30) NOT NULL,
email VARCHAR(50) NOT NULL,
edad INT(3),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRE... |
#
# Table structure for table 'tt_content'
#
CREATE TABLE tt_content (
tx_kbconttable_flex_ds mediumtext NOT NULL,
tx_kbconttable_flex mediumtext NOT NULL
);
#
# Table structure for table 'tx_kbconttable_tmpl'
#
CREATE TABLE tx_kbconttable_tmpl (
uid int(11) unsigned DEFAULT '0' NOT NULL auto_increment,
pid int(... |
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS = 0;
SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, AUTOCOMMIT = 0;
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS = 0;
-- MySQL dump 10.13 Distrib 8.0.22, for Linux (x86_64)
--
-- Host: 127.0.0.1 Database: fromDb
-- ------------------------------------... |
-- noinspection SqlResolveForFile
-- noinspection SqlNoDataSourceInspectionForFile
INSERT INTO users(id,username,firstname,lastname,email,password,user_status, user_role) VALUES
(1,'admin','Admin','Mc Admin','admin@ikubinfo.al','$2a$10$bZuFl53cd20mgLFaprt3IuIZ5p9kFAXQHW26NvFAFyDFg/JCQdfni',1, 1),
(2,'user','User','Mc ... |
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for client
-- ----------------------------
DROP TABLE IF EXISTS `client`;
CREATE TABLE `client` (
`client_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`client_secret` varchar(255) CHARACTER SE... |
--6. Qual a média do capital social das empresas de pequeno porte por natureza jurídica
CREATE TABLE `hackathon-a3-data.the_data_girls.q06_capital_social_pequeno_porte` (
media_capital_social FLOAT64,
natureza_juridica STRING
);
INSERT INTO `hackathon-a3-data.the_data_girls.q06_capital_social_pequeno_porte`
S... |
DROP TABLE assets;
|
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 26, 2019 at 01:08 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- script for elevating an existing user to admin level
select id into @user_id from wlt.user where username = 'admin@chrismajor.io';
select id into @role_id from wlt.role where name = 'role_admin';
insert into wlt.user_role (user_id, role_id) values (@user_id, @role_id);
|
-- phpMyAdmin SQL Dump
-- version 3.3.7deb7
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Июн 30 2015 г., 14:24
-- Версия сервера: 5.1.73
-- Версия PHP: 5.3.3-7+squeeze19
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_... |
/*Chapter 4*/
-- #1
SELECT *
FROM vendors
JOIN invoices USING (vendor_id);
-- #2
SELECT vendor_name, invoice_number, invoice_date,
invoice_total - payment_total - credit_total AS balance_due
FROM vendors v
JOIN invoices i USING (vendor_id)
WHERE invoice_total - payment_total - credit_total > 0
ORDER BY vendor_name;... |
drop database if exists choitabi;
create database choitabi;
use choitabi;
CREATE TABLE tour (
tour_id INT(11) NOT NULL AUTO_INCREMENT,
tour_name VARCHAR(100) NULL DEFAULT NULL,
price DECIMAL(10,0) NULL DEFAULT NULL,
persons INT(11) NULL DEFAULT NULL,
departure VARCHAR(100) NULL DEFAULT NULL,
region ... |
INSERT INTO profiles(id) VALUES(1)
INSERT INTO profiles(id) VALUES(2)
INSERT INTO profiles(id) VALUES(3)
-- ALTER SEQUENCE profiles_id_seq RESTART WITH 6;
--
INSERT INTO playlists(id, profile_id, title, description, created, updated) VALUES(1, 1, 'The very first playlist', 'Some description', now(), now())
INSERT IN... |
drop table if exists #mnth
;
select distinct
dateadd(d, 1, eomonth(dt1, -1)) as M
,eomonth(dt1) as M2
into #mnth
from bi.tf_gendate('20180101', '20181203')
;
drop table if exists #sl
;
select
sl.ProductId
,sl.Status
,sl.StartedOn
,eomonth(sl.StartedOn) as M2
into #sl
from prd.vw_statusLog sl
... |
UPDATE `creature_template` SET `faction` = '21' WHERE `entry` = '3';
UPDATE `creature_template` SET `faction` = '954' WHERE `entry` = '89';
UPDATE `creature_template` SET `faction` = '35' WHERE `entry` = '304';
UPDATE `creature_template` SET `faction` = '35' WHERE `entry` = '305';
UPDATE `creature_template` SET `factio... |
use carrito_compra;
Create table Marca(
Codigo tinyint identity(1,1),
Nombre varchar(15) not null,
CONSTRAINT PK_Marca_Codigo
PRIMARY KEY(Codigo)
) |
use develop;
CREATE TABLE users (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
age INT UNSIGNED NOT NULL,
created_at DATETIME NOT NULL,
updated_at DATETIME NOT NULL,
PRIMARY KEY(id)
);
INSERT INTO users VALUES(1, "Minha", 26, NOW(), NOW());
|
/*
Navicat MySQL Data Transfer
Source Server : 本地数据库
Source Server Version : 50719
Source Host : localhost:3306
Source Database : pem
Target Server Type : MYSQL
Target Server Version : 50719
File Encoding : 65001
Date: 2018-05-17 10:56:41
*/
SET FOREIGN_KEY_CHECKS=0... |
INSERT INTO BLC_PRICE_DATA(PRICE_DATA_ID,RETAIL_PRICE,SALE_PRICE) values(1,10.99,10.99);
INSERT INTO BLC_SKU_PRICE_DATA(PRICE_DATA_ID,SKU_ID,MAP_KEY) VALUES (1,1,'USD');
INSERT INTO BLC_PRICE_DATA(PRICE_DATA_ID,RETAIL_PRICE,SALE_PRICE) values(2,10.99,10.99);
INSERT INTO BLC_SKU_PRICE_DATA(PRICE_DATA_ID,SKU_ID,MAP_KEY) ... |
drop database if exists shoppingcenter;
create database shoppingenter;
use shoppingcenter;
create table shoppingcenter(
id int not null primary key auto_increment,
location varchar(50) not null
);
create table store(
id int not null primary key auto_increment,
shoppingcenter int not null
);... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 15-Ago-2019 às 14:27
-- Versão do servidor: 10.1.37-MariaDB
-- versão do PHP: 5.6.39
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
DROP TABLE adds IF EXISTS;
CREATE TABLE adds (
id INTEGER IDENTITY PRIMARY KEY,
add_title VARCHAR(80),
add_description VARCHAR(255),
category VARCHAR(30),
type_of_add VARCHAR(30),
price VARCHAR(30),
room_number VARCHAR(30),
contact_name VARCHAR(30),
contact_surname VARCHAR(30),... |
DECLARE
v_result INTEGER;
BEGIN
SELECT col_id
INTO v_result
FROM TBL_DICT_TASKSTATE
WHERE COL_CODE = :p_code;
RETURN v_result;
END; |
insert into soccer_team (country, fifa_code) values
('Russland','RUS'),
('Uruguay','URU'),
('Portugal','POR'),
('Spanien','ESP'),
('Marokko','MAR'),
('Iran','IRN'),
('Frankreich','FRA'),
('Australien','AUS'),
('Peru','PER'),
('Dänemark','DEN'),
('Argentinien','ARG'),
('Island','ISL'),
('Kroatien','CRO'),
('Nigeria','NG... |
CREATE TABLE Cities
(
CityID int PRIMARY KEY,
Name varchar(50)
)
CREATE TABLE Customers
(
CustomerID int PRIMARY KEY,
Name varchar(50),
Birthday date,
CityID int FOREIGN KEY (CityID) REFERENCES Cities(CityID)
)
CREATE TABLE Orders
(
OrderID int PRIMARY KEY,
CustomerID int FOREIGN KEY (CustomerId) REFERENCES Customers... |
-- T-systems --> Homework 22.7.2015
SELECT
*
FROM
track
WHERE
Composer = 'U2';
SELECT
CONCAT(ROUND(Milliseconds / 1000, 2), ' s')
FROM
track
WHERE
Composer = 'U2' AND Name = 'One';
SELECT
FirstName, LastName
FROM
customer
WHERE
Country = 'Czech Republic';
SELECT
Name,
Com... |
use teste;
INSERT INTO `clientes` VALUES
(1,'Gumercindo','Rua 15, 2150','SP'),
(2,'Joaquim Jose','Rua Tiradentes, 50','SP'),
(3,'Joana Darc','Rua dos Martires, 1500','RJ'),
(4,'Maria Beatriz endereço','Rua Ipanema, 230','RJ'),
(5,'Milton Carlos Katoo','Rua Dr Miguel Couto, 81','SP'),
(32,'fgdfgdfg fdfdfd','dfgdfgd 56... |
SELECT * FROM USER_GROUPS
WHERE DELETE_FLAG = 0
ORDER BY INSERT_DATETIME %s;
|
CREATE database People;
use People;
CREATE TABLE person (
-- The start of the "CREATE TABLE" which gives the name of the table as person.
-- You then put the fields you want inside parenthesis after this setup.
id INTEGER PRIMARY KEY,
-- An id column which will be used to exactly identify each row.
... |
-- Adminer 4.1.0 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `Article`;
CREATE TABLE `Article` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`image_id` int(11) DEFAULT NULL,
`date` datetime NOT NULL,
`titre` varchar(25... |
CREATE TABLE IF NOT EXISTS users(
id INTEGER PRIMARY KEY ASC,
name varchar(256) UNIQUE ,
born_date date,
weight float,
height int,
gender INT NOT NULL CHECK (gender in (0,1)),
activity_level int
);
CREATE TABLE IF NOT EXISTS sports(
id INTEGER PRIMARY KEY ASC,
name varchar(128) U... |
select * from portfolios
UPDATE portfolios
SET images = array [
'https://thinksurfmedia.herokuapp.com/portfolios/egp/egp1.jpg',
'https://thinksurfmedia.herokuapp.com/portfolios/egp/egp2.jpg',
'https://thinksurfmedia.herokuapp.com/portfolios/egp/egp3.jpg'] ,
website = 'https://thinksurfmedia.com'
WHERE id =1;
insert i... |
INSERT INTO pais(codigo_pais, descripcion_pais)
VALUES (90, 'Colombia');
INSERT INTO departamento(id_pais, codigo_departamento,
nombre_departamento)
VALUES (1,5,'ANTIOQUIA');
INSERT INTO ciudad(id_departamento, codigo_div_politica, nombre_ciudad)
VALUES (1, 5001000, 'MEDELLIN');
-- TIPOS D... |
-- Create the boundary table
create table FIA.BOUNDARY(
CN varchar(34),
PLT_CN varchar(34),
INVYR numeric(4,0),
STATECD numeric(4,0),
UNITCD numeric(2,0),
COUNTYCD numeric(3,0),
PLOT numeric(5,0),
SUBP numeric(3,0),
SUBPTYP numeric(1,0),
BNDCHG numeric(1,0),
CONTRAST numeric(1,0),
AZMLEFT numeric(3,0),
AZM... |
drop materialized view if exists common.video_views;
create materialized view common.video_views
as (select
case when suh.uid = 0 then suh.client_uid else suh.uid end user_id,
suh.id,
suh.nid,
suh.extra_nid,
suh.created,
suh.join_ms,
suh.watched,
suh... |
drop table if exists user_ cascade;
drop table if exists product_order cascade;
drop table if exists product_inventory cascade;
drop table if exists product cascade;
drop table if exists order_ cascade;
drop table if exists databasechangelog cascade;
drop table if exists databasechangeloglock cascade;
drop table if exi... |
CREATE VIEW dbo.vw_BuscaPessoa
AS
SELECT
PF.IdProfissional,
-1 AS IdPessoaJuridica,
-1 AS IdPessoa,
PF.RegistroConselhoAtual,
PF.Nome,
PF.SituacaoAtual
FROM
dbo.Profissionais PF
UNION
SELECT
-1 IdProfissional,
PJ.IdPessoaJuridica AS IdPessoaJuridica,
-1 AS IdPessoa,
PJ.Reg... |
CREATE TABLE cartcartrule (
id CHAVE NOT NULL,
id_cart CHAVE NOT NULL,
id_cart_rule CHAVE NOT NULL,
CONSTRAINT pk_cartcartrule PRIMARY KEY (id)
); |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- 主机: localhost
-- 生成日期: 2020-10-18 16:29:10
-- 服务器版本: 5.7.26
-- PHP 版本: 7.3.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
use yenertuz;
insert into employees (name, department, salary)
values ('Yener', 'IT', 3000),
('Melek', 'Management', 5000),
('Mert', 'Health', 9000),
('Art', 'IT', 1000),
('Angel', 'Health', 2000),
('Sevim', 'Management', 2500);
|
/*
List1: SEP Customers who have paid off loan L1, and taken L2 in the last 30 days (L2:Originated or just has applied for second loan?)
List 2: SEP Customers who have paid off loan L1 in the last 30 days, but did not take L2 --> should be 30 to 60 days who has already received 3 POL email (never re-apply)
List 3: SEP ... |
SELECT * FROM ACCESS_LOGS
WHERE
NO = ?
;
|
/*
Exercise 1 - Play with table "london"
*/
/*
Add column "bbox" for bounding boxes:
Docs: http://www.postgis.org/docs/AddGeometryColumn.html
SYNOPSIS: AddGeometryColumn(varchar catalog_name, varchar schema_name, varchar table_name, varchar column_name, integer srid, varchar type, integer dimension);
EXAMPLE: ... |
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jul 29, 2020 at 10:43 AM
-- Server version: 8.0.21-0ubuntu0.20.04.3
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
create table ACT_RU_JOB (
ID_ nvarchar(64) NOT NULL,
REV_ int,
CATEGORY_ varchar(255),
TYPE_ nvarchar(255) NOT NULL,
LOCK_EXP_TIME_ datetime,
LOCK_OWNER_ nvarchar(255),
EXCLUSIVE_ bit,
EXECUTION_ID_ nvarchar(64),
PROCESS_INSTANCE_ID_ nvarchar(64),
PROC_DEF_ID_ nvarchar(64),
E... |
DROP DATABASE IF EXISTS sqlize_burgers_db;
CREATE DATABASE sqlize_burgers_db; |
DROP database `db_student`;
CREATE DATABASE `db_student`;
use `db_student`;
CREATE TABLE `Student`(
`s_id` varchar(30) not null primary key,
`s_name` varchar(30) not null,
`s_birth` date not null,
`s_sex` char(2) check(`s_sex`='男' or `s_sex`='女') not null
)DEFAULT CHARSET=utf8;
INSERT INTO `Student`(`s_id`,`s_name`... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 02-Dez-2019 às 14:23
-- Versão do servidor: 10.1.40-MariaDB
-- versão do PHP: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
INSERT INTO HtmlLabelIndex values(18760,'并且')
/
INSERT INTO HtmlLabelIndex values(18761,'在安全级别')
/
INSERT INTO HtmlLabelIndex values(18762,'的人员之中')
/
INSERT INTO HtmlLabelIndex values(18763,'在职位安全级别')
/
INSERT INTO HtmlLabelInfo VALUES(18760,'并且',7)
/
INSERT INTO HtmlLabelInfo VALUES(18760,'and',8)
/
INSERT INTO ... |
DROP TABLE IF EXISTS book_aud;
CREATE TABLE book_aud (
id bigint(20) NOT NULL,
rev int(11) NOT NULL,
revtype tinyint(4) DEFAULT NULL,
title varchar(100) DEFAULT NULL,
author_name varchar(50) DEFAULT NULL,
pages INT(50) DEFAULT NULL,
PRIMARY KEY (`id`,`rev`),
KEY `FK_book_revinfo... |
create table student_mwe(
stu_id varchar(15),
stu_name varchar(35),
stu_address varchar(40),
stu_phone varchar(20),
) |
select * from arr_fund
select * from arr_node where fund_id = 1
select * from arr_level where node_id in (1,2,3,4)
select * from rul_item_type where code = 'ZP2015_POSITION'
select * from arr_data where data_type_id = 7
select * from arr_data_coordinates where data_id in (1072,1073)
|
USE crm;
DROP TABLE IF EXISTS users, authorizations;
CREATE TABLE users
(
row_id bigint unsigned not null AUTO_INCREMENT,
first_name varchar(15) not null,
last_name varchar(15) not null,
email varchar(78) not null,
username varchar(30) not null,
password varchar(40) not null,
salt varchar(3) not null,
verification_co... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Aug 06, 2019 at 05:37 AM
-- Server version: 5.7.25
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... |
create sequence hibernate_sequence start 1 increment 1;
create table car (
id int8 not null,
createddate timestamp,
is_deleted boolean not null,
updated_date timestamp,
color varchar(255),
mark varchar(255),
model varchar(255),
vin varchar(255),
primary key (id)
);
create table use... |
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Czas generowania: 10 Lut 2021, 10:42
-- Wersja serwera: 10.3.16-MariaDB
-- Wersja PHP: 7.3.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Czas wygenerowania: 28 Lis 2010, 19:00
-- Wersja serwera: 5.1.41
-- Wersja PHP: 5.3.1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_R... |
DROP PROCEDURE CPI.GIPIS002_SAVE_OPEN_POLICY;
CREATE OR REPLACE PROCEDURE CPI.gipis002_save_open_policy(
p_par_id IN gipi_wopen_policy.par_id%TYPE,
p_line_cd IN gipi_wopen_policy.line_cd%TYPE,
p_op_subline_cd IN gipi_wopen_policy.op_subline_cd%TYPE,
p_op_iss_cd IN ... |
DECLARE
v_result NVARCHAR2(255);
BEGIN
SELECT Nvl(col_value, :defaultResult)
INTO v_result
FROM tbl_config
WHERE col_name = :p_name;
RETURN v_result;
END; |
delimiter //
drop database if exists school;
//
create database StudMangeSystem;
//
use StudMangeSystem
//
create table userInfo (
userID int not null auto_increment,
account varchar(40) not null unique,
password varchar(40), -- 不加密
name varchar(30),
sex tinyint default 0, -- 0男 1女
Ident tinyint default 1, -- 1学... |
CREATE DATABASE clone_DB;
CREATE TABLE clone_DB.users_data (
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY ,
user_name VARCHAR(255),
user_id VARCHAR(255),
user_pw VARCHAR(255),
information VARCHAR(255),
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE clone_DB.posts_data (
... |
-- Crea una base de datos llamada "friends" y luego importe friends.sql. Esto creará dos nuevas tablas: usuarios y amistades.
-- Usando el siguiente ERD como referencia, escribe una consulta SQL que devuelva una lista de usuarios junto con los nombres de sus amigos.
USE friends;
SELECT * FROM users;
SELECT u.first_n... |
select
pc.Code
,crf.ClientId
,c.fio
,c.Email
-- ,prf.ProductId
-- ,p.StatusName as ProductStatus
from mkt.PromoCodes pc
inner join mkt.ClientReductionFactor crf on crf.ReductionFactorId = pc.Id
inner join Client.vw_client c on c.clientid = crf.ClientId
left join mkt.ProductReductionFactor prf on p... |
use labor_sql;
/*
БД «Кораблі». Перерахувати назви головних кораблів (з
таблиці Ships). Вивести: name, class. Вихідні дані
впорядкувати за зростанням за стовпцем name.
*/
select name, class from ships
where name = class
order by name;
/*
БД «Кораблі». Вивести інформацію про усі класи кораблів для
країни 'Japan'. Вихід... |
CREATE TABLE ProviderIdentifierTBL (
ID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
ProviderID BIGINT UNSIGNED NULL,
ProviderIdentifier VARCHAR(15) NULL,
ProviderIdentifierTypeID INTEGER UNSIGNED NULL,
PRIMARY KEY(ID)
);
CREATE TABLE ProviderIdentifierTypeTBL (
ID INTEGER UNSIGNED NOT NULL,
ProviderIdentifi... |
create table users(
id serial primary key,
created_at timestamp DEFAULT NOW(),
updated_at timestamp DEFAULT NOW(),
deleted_at timestamp DEFAULT NOW(),
"email" text not null,
"password" text not null
); |
CREATE or REPLACE PROCEDURE Prj_TaskProcess_UpdateParent
(parentid_1 integer, flag out integer ,
msg out varchar2,
thecursor IN OUT cursor_define.weavercursor )
AS
begindate_1 varchar2(30);
enddate_1 varchar2(30);
workday_1 number;
finish_1 number;
begin
select min(begindate), max(enddate), sum(workday... |
CREATE TABLE instituciones_reguladoras (
id serial NOT NULL PRIMARY KEY,
nombre VARCHAR(50) NOT NULL
); |
/*
MySQL Data Transfer
Source Host: localhost
Source Database: notepad
Target Host: localhost
Target Database: notepad
Date: 2020/7/8 19:34:19
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for note
-- ----------------------------
CREATE TABLE `note` (
`id` int(11) NOT NULL AUTO_INCR... |
SELECT
f.ProductId,
CONCAT(c.FirstName, ' ', c.LastName) AS [CustomerName],
f.Description AS [FeedbackDescription]
FROM Feedbacks AS f
JOIN Customers AS c ON c.Id = f.CustomerId
WHERE f.CustomerId IN (SELECT TOP 100 PERCENT CustomerId FROM Feedbacks GROUP BY CustomerId HAVING COUNT(*) > 2 ORDER BY CustomerId )... |
CREATE TABLE klienci (
ID_klienta SERIAL PRIMARY KEY NOT NULL,
imie varchar NOT NULL,
nazwisko varchar NOT NULL,
ulica varchar NOT NULL,
nr_domu varchar NOT NULL,
kod_pocztowy varchar NOT NULL,
miejscowosc varchar NOT NULL
);
CREATE TABLE konta (
ID_konta SERIAL PRIMARY KEY NOT NULL,
... |
CREATE TABLE `social_connections_issuer` (
`user_id` bigint(20) unsigned NOT NULL,
`issuer_content_id` varchar(255) NOT NULL,
`ctime` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`issuer_content_id`, `user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
/*
* Copyright 2021 Google LLC
*
* 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 i... |
USE MASTER;
use EMP_DEPT;
CREATE DATABASE EMP_DEPT;
select * from Department;
select * from Employees;
sp_help Department;
SELECT* FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS
WHERE CONSTRAINT_TYPE = 'foreign KEY'
AND TABLE_NAME = 'Employees' AND TABLE_SCHEMA = 'dbo';
ALTER TABLE Department add primary key(DEPTNO);
--... |
CREATE or REPLACE PROCEDURE workflow_CurOpe_UpdatebySubmit
(userid_2 integer, requestid_1 integer,groupid_1 integer,flag out integer,msg out varchar2,thecursor IN OUT cursor_define.weavercursor)
AS
currentdate char(10);
currenttime char(8);
begin
select to_char(sysdate,'yyyy-mm-dd') into currentdate from dual;
sele... |
CREATE TABLE courses
(
idCourse INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
Title VARCHAR(45) NOT NULL,
idProfessor INT,
FOREIGN KEY (idProfessor) REFERENCES professors (idProfessor) ON DELETE CASCADE ON UPDATE CASCADE
);
CREATE UNIQUE INDEX ID_Course_UNIQUE ON courses (idCourse);
CREATE INDEX CoursesProfe... |
declare
v_date date;
v_performedby nvarchar2(255);
v_CaseworkerId Integer;
v_CaseId Integer;
v_name nvarchar2(255);
v_EventTypeId Integer;
v_EventTypeCode nvarchar2(255);
v_DateEventId Integer;
v_MultipleAllowed number;
v_CanOverwrite number;
begin
v_CaseId := :CaseId;
v_... |
DROP DATABASE IF EXISTS testdb;
CREATE DATABASE testdb;
use testdb;
create table testdb.counter(
id int,
sno int);
|
drop table Order;
drop table Customer;
drop table Drink;
drop table Location;
/*
drop is used for in case i'd want to alter a certain table,
its easier to drop and recreate with seed data
as opposed to going through refactoring your database
among other things
*/
create table Customer
(
customerID int identity ... |
--xes_pad_audition_stu_info学员信息表,关联xes_pad_audition_finance_info找出在试听之前课程的财务信息和新老学员(关联所有学员的财务状况)
DROP TABLE IF EXISTS test.xes_pad_audition_stu_info_status;
CREATE TABLE IF NOT EXISTS test.xes_pad_audition_stu_info_status AS
SELECT stu.city_id,
stu.city_name,
stu.student_id,
stu.cla_id,
... |
-- phpMyAdmin SQL Dump
-- version 4.0.10.20
-- https://www.phpmyadmin.net
--
-- Počítač: localhost
-- Vygenerováno: Pát 29. lis 2019, 12:59
-- Verze serveru: 5.6.40
-- Verze PHP: 5.3.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Databáze: `xnacar00`
--
-- ----------------... |
CREATE TABLE session_config (id int NOT NULL AUTO_INCREMENT,
session_id varchar(50) DEFAULT NULL,
session_alias varchar(50) DEFAULT NULL,
first_ip varchar(50) DEFAULT NULL,
second_ip varchar(50) DEFAULT NULL,
PRIMARY KEY (id)
);
|
DROP PROCEDURE IF EXISTS `DBCourseGetExistsPlatform`;
CREATE PROCEDURE `DBCourseGetExistsPlatform` ()
READS SQL DATA
begin
show tables like 'Course';
end; |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 16, 2020 at 11:05 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
CREATE TABLE account (
AccountId VARCHAR(20),
PRIMARY KEY (AccountId),
AccountName VARCHAR(255),
CustomerRecordId2 VARCHAR(20)
);
CREATE TABLE contact (
ContactId VARCHAR(20),
PRIMARY KEY (ContactId),
ContactName VARCHAR(255)
);
|
-- DROP TABLE IF EXISTS customer;
CREATE TABLE IF NOT EXISTS customer
(
id BIGINT(20) NOT NULL,
name VARCHAR(30) NULL DEFAULT NULL,
email VARCHAR(50) NULL DEFAULT NULL,
PRIMARY KEY (id)
);
-- DROP TABLE IF EXISTS service;
CREATE TABLE IF NOT EXISTS service
(
id BIGINT(20) NOT NULL,
name VARCHAR(40) NULL ... |
BANCO DE DADOS - CARROS
LETRA D:
SELECT mar.nome, mar.pais,
COUNT(mo.codigo_marca) AS qtd_carros
FROM marca AS mar
LEFT JOIN modelo AS mo
ON mar.codigo = mo.codigo_marca
GROUP BY mar.nome; |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 18 Jul 2019 pada 08.24
-- Versi Server: 10.1.26-MariaDB
-- PHP Version: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
insert into client values
(99, 'Mason', 'Daisy', 'daisy@kitchen.com'),
(100, 'Crawley', 'Violet', 'dowager@dower-house.org'),
(88, 'Branson', 'Tom', 'branson@gmail.com');
insert into driver values
(12345, 'Snow', 'Jon', 'January 1, 1990', 'The Wall', 'BGSW 420', false),
(22222, 'Tyrion', 'Lannister', 'January... |
DROP TABLE IF EXISTS submission_sections; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.