text stringlengths 6 9.38M |
|---|
CREATE TABLE sysdbschema (
id chave NOT NULL,
schema CHARACTER VARYING(50) NOT NULL,
id_sysdbdatabase chave,
active BOOLEAN NOT NULL,
CONSTRAINT pk_sysdbschema PRIMARY KEY (id),
CONSTRAINT fk_sysdbschema_sysdbdatabase FOREIGN KEY (id_sysdbdatab... |
CREATE DATABASE scheme_db;
USE scheme_db;
DROP TABLE IF EXISTS schemes;
CREATE TABLE schemes (
scheme_id INT AUTO_INCREMENT,
name CHAR(32),
version INT,
dt DATETIME,
swarm_1 CHAR(24),
swarm_2 CHAR(24),
swarm_3 CHAR(24),
swarm_4 CHAR(24),
swarm_5 CHAR(24),
swarm_6 CHAR(24),
... |
CREATE KEYSPACE IF NOT EXISTS KucheriavaONETOONE
WITH replication = {
'class' : 'SimpleStrategy',
'replication_factor' : 1
}
AND durable_writes = FALSE;
USE KucheriavaONETOONE;
CREATE TYPE IF NOT EXISTS full_name_type (
first_name text,
middle_name text,
last_name text
);
CREATE TYPE IF NOT EXISTS signaturer (
... |
# --- !Ups
create table so_user_info (
id INT AUTO_INCREMENT,
name VARCHAR,
so_account_id INT PRIMARY KEY NOT NULL,
about_me VARCHAR(255),
so_link VARCHAR (100),
location VARCHAR(30)
);
create table so_tag (
id INT AUTO_INCREMENT,
name VARCHAR(20) NOT NULL PRIMARY KEY);
create table so_reputation(
... |
-- 执行秒杀存储过程
-- row_count():返回上一条修改类型的sql(delete,update,insert)的影响行数
-- row_count(): 0:未修改数据;>0 :表示修改的行数;<0:sql错误/未执行修改的sql
DELIMITER $$ -- ; 转换为 $$
CREATE PROCEDURE `wesley`.`execute_seckill`
(IN `v_seckill_id` bigint,IN `v_phone` bigint,IN `v_kill_time` timestamp,OUT `r_result` int)
BEGIN
DECLARE insert_count INT ... |
INSERT INTO food_chat_db.restaurant (restaurant_name,city,star_rating,price_range,reservation,vegan_option,delivery_option,website)
VALUES (%s,%s,%s,%s,%s,%s,%s,%s)
ON DUPLICATE KEY
UPDATE city = VALUES(city), star_rating = VALUES(star_rating), price_range = VALUES(price_range),
reservation = VALUEs(reservat... |
select xo.order_number, xl.line_number, xa.address_name, xc.customer_name, xi.name, xw.warehouse_name
from xx_orders xo,
xx_order_lines xl,
xx_address xa,
xx_customers xc,
xx_items xi,
xx_warehouse xw
where xo.order_id = xl.order_id
and xo.customer_id = xc.customer_id
and xc.addre... |
DROP TABLE IF EXISTS `t_project`;
CREATE TABLE `t_project` (
`id` varchar(32) NOT NULL COMMENT '项目ID',
`name` varchar(64) DEFAULT NULL COMMENT '项目名称',
`svn_url` varchar(512) DEFAULT NULL COMMENT '项目文档的svn地址',
`round` varchar(10) DEFAULT NULL COMMENT '测试周期的第几轮',
`start_date` date NULL DEFAULT NULL COMMENT '开始... |
DROP DATABASE IF EXISTS machine ;
CREATE DATABASE machine CHARACTER SET UTF8 ;
GRANT ALL PRIVILEGES ON machine.* TO machine@localhost IDENTIFIED BY 'machine';
FLUSH PRIVILEGES;
GRANT select,delete,update,create,drop ON machine.* TO machine@localhost IDENTIFIED BY "machine"; |
-- phpMyAdmin SQL Dump
-- version 4.1.14.8
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Sam 19 Novembre 2016 à 11:29
-- Version du serveur : 5.1.73
-- Version de PHP : 5.4.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT... |
/*
SQLyog Ultimate v11.24 (32 bit)
MySQL - 5.5.28 : Database - blog
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@... |
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 09, 2016 at 03:59
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.5.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... |
CREATE PROC dbo.usp_EmployeesBySalaryLevel (@SalaryLevel VARCHAR(10))
AS
SELECT
FirstName,
LastName
FROM Employees
WHERE dbo.ufn_GetSalaryLevel(Salary) LIKE @SalaryLevel |
# --- !Ups
create table product_stock (
id bigint not null,
is_deleted boolean,
product_id BIGINT,
distributor_id BIGINT,
reseller_id bigint,
stock bigint,
user_id bigint,
created_at ... |
drop table if exists mbta_stops_facilities;
drop table if exists mbta_routes_stops;
drop table if exists mbta_lines;
drop table if exists mbta_routes;
drop table if exists mbta_stops;
drop table if exists mbta_facilities;
CREATE TABLE mbta_lines (
id varchar(100) NOT NULL,
long_name varchar(200) DEFAULT NULL,
s... |
SELECT cp.col_id AS Id,
cp.col_id AS Col_Id,
cp.col_name AS NAME,
cp.col_allowdelete AS AllowDelete,
cp.col_casepartycase AS Case_Id,
(SELECT CASESTATE_ISFINISH
FROM vw_dcm_simplecase
WHERE id = cp.col_casepartycase)
AS CaseState_IsFinish,
cp.col_de... |
set client_encoding TO 'UTF8';
GRANT ALL PRIVILEGES ON DATABASE grimdawn TO grimdawn;
CREATE SCHEMA grimdawn AUTHORIZATION grimdawn;
CREATE TABLE grimdawn.constellations
(
name character varying(255) NOT NULL,
adcth integer,
armor integer,
armor_absorb integer,
armor_pct integer,
armor_piercin... |
delete from HtmlLabelIndex where id=30490
/
delete from HtmlLabelInfo where indexid=30490
/
INSERT INTO HtmlLabelIndex values(30490,'电子签章')
/
INSERT INTO HtmlLabelInfo VALUES(30490,'电子签章',7)
/
INSERT INTO HtmlLabelInfo VALUES(30490,'ElectronicSignature',8)
/
INSERT INTO HtmlLabelInfo VALUES(30490,'電子簽章',9)
/
delete f... |
/*
Database that holds the records of students, their papers and their grades.
*/
CREATE TABLE students (
id INT AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(100)
);
CREATE TABLE papers(
title VARCHAR (255),
grade INT,
student_id INT,
FOREIGN KEY (student_id) REFERENCES students(id)
);
----------------------... |
SELECT
qc.id as mhid, qc.name as mhnombre, q.id as idquiz,
truncate((qa.maxmark * qas.fraction*100/maxmark ),1) as notaporcentaje,
(Select case notaporcentaje=truncate((qa.maxmark * qas.fraction*100/maxmark ),1)
WHEN notaporcentaje<40 THEN 'D'
WHEN (40.0<=notaporcentaje) and (notaporcentaje<50.0) THEN 'R'
WHEN (... |
-- Create a database hbtn_0d_usa and table states.
CREATE DATABASE IF NOT EXISTS hbtn_0d_usa;
USE hbtn_0d_usa;
CREATE TABLE IF NOT EXISTS states (id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, name VARCHAR(256) NOT NULL);
|
CREATE TABLE user_countries(
chatId bigint not null unique,
countryId int not null,
topicId int
); |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 02, 2021 at 04:17 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- create database
create or replace database reddit;
use reddit;
-- file format
create or replace file format myjsonformat
type = 'JSON'
strip_outer_array = true;
-- stage
create or replace stage my_json_stage
file_format = myjsonformat
url = 's3://myredditkinesiss3bucket';
-- TABLE
create or replace tabl... |
CREATE DATABASE bangumi;
USE bangumi;
CREATE TABLE october (
id int,
description text
);
CREATE TABLE bangumi_secret (
flag text
);
INSERT INTO october VALUES
(1, '成績優秀で世渡り上手な高校2年生・矢口八虎は、悪友たちと遊びながら、毎日を過ごしていた。
誰もが思う“リア充”……そんな八虎は、いつも、どこかで虚しかった。
ある日、美術室で出会った1枚の絵に、八虎は心を奪われる。
「絵は、文字じゃない言語だから」
絵を通じてはじ... |
-- 04. Insert record in both tables
INSERT INTO Towns (Id, Name)
VALUES (1,'Sofia'),
(2,'Plovdiv'),
(3,'Varna')
INSERT INTO Minions (Id, Name, Age, TownId)
VALUES (1, 'Kevin', 22, 1),
(2, 'Bob', 15, 3),
(3, 'Steward', NULL, 2)
-- 05. Truncate table Minions
TRUNCATE TABLE Minions
-- 06. Drop all table... |
ALTER TABLE deployments DROP COLUMN js_env_vars;
|
--@Autor: Flores Fuentes Kevin y Torres Verastegui Jose Antonio
--@Fecha creación: 18/06/2020
--@Descripción: Prueba para función genera_folio_pago
set serveroutput on
Prompt =======================================
Prompt Prueba para la función genera folio pago
Prompt ========================================
declar... |
USE ProjetoGufi;
INSERT INTO TiposUsuarios(TituloTipoUsuario)
VALUES ('Administrador')
,('Comum');
INSERT INTO Usuarios(IdTipoUsuario,NomeUsuario,Email,Senha)
VALUES (1,'Mateus','admin@admin.com','1234')
,(2,'Miguel','miguel@gmail.com','4321')
,(2,'Leonardo','leo@yahoo.com','leo123');
INSERT INTO Instituico... |
SET SERVEROUTPUT ON;
CREATE OR REPLACE TRIGGER insert_into_site
AFTER INSERT OR DELETE ON RoomDetails
REFERENCING OLD AS old NEW AS new
FOR EACH ROW
BEGIN
IF INSERTING THEN
IF :new.roomRate >= 14000 THEN
insert into RoomDetails1@site_link1 values (:new.roomNo, :new.roomType, :new.roomRate, :new.review);
... |
/*
MySQL Data Transfer
Source Host: localhost
Source Database: contactos
Target Host: localhost
Target Database: contactos
Date: 26/01/2015 12:46:16 p.m.
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for contactos
-- ----------------------------
DROP TABLE IF EXISTS `cont... |
CREATE TABLE IF NOT EXISTS EMPLOYEE (
name varchar(100) not null primary key
);
CREATE TABLE IF NOT EXISTS MONTH (
month_name varchar(10) not null primary key,
month_number int not null unique
);
CREATE TABLE IF NOT EXISTS ACTIVITY_TYPE (
activity_name varchar(100) not null,
act_type varchar(100) not null,
isn... |
insert into tbl_dbbackup (
field_null,
field_text,
field_integer,
field_numeric,
field_real,
field_blob,
"Field_Case"
) values (
null,
'TEXT',
123,
123.456,
789.012,
'BLOB',
'Field_Case'
);
insert into "Tbl_DBBackup_Case" ("Field_Text", "Field_Integer") values ('TEXT', 123); |
ALTER TABLE requisitos_ingreso RENAME TO requisito_ingreso_obligatorio;
ALTER SEQUENCE requisitos_ingreso_id_seq RENAME TO requisito_ingreso_obligatorio_id_seq; |
WITH cashflows AS(
SELECT
coalesce(prior.category,current.category) as account,
coalesce(prior.amount,0) as prior,
coalesce(current.amount,0) as current,
round(coalesce(prior.amount,0)*(EXTRACT(DOY FROM current_timestamp)::numeric/365),2) as pro_rated,
round(coalesce(current.amount,0) - coalesce(prior.amount,0)*(E... |
-- !Ups
alter table objects
add planned_use VARCHAR(250) default NULL null after reserved_for;
alter table objects
add deposit_place VARCHAR(250) default NULL null after planned_use;
-- !Downs
alter table objects drop column planned_use;
alter table objects drop column deposit_place;
|
drop table pizzasabor;
drop table pizza;
drop table borda;
drop table comanda;
drop table mesa;
drop table precoportamanho;
drop table tamanho;
drop table saboringrediente;
drop table ingrediente;
drop table sabor;
drop table tipo;
create table tipo (
codigo integer not null,
nome varchar(100) not null... |
/*
Query returns monthly costs and credits by project
*/
SELECT
project.name AS project,
EXTRACT(MONTH FROM usage_start_time) AS month,
ROUND(SUM(cost), 2) AS costs,
ROUND(SUM((SELECT SUM(amount) FROM UNNEST(credits))), 2) AS credits
FROM `bqutil.billing.billing_dashboard_export`
GROUP BY project, month
ORDER ... |
drop table if exists Books;
create table Books
(BookID int unsigned not null auto_increment primary key,
Book varchar(50),
Writer varchar(50),
Price int(7),
Descreption text,
);
insert into Cookies values (NULL,"Oreo","Nabisco",140,"These things are 140 Calories");
insert into Cookies values (NULL,"Oreo2","Camus"... |
delete mainmenuconfig where infoid in (select id from mainmenuinfo where parentid=624)
/
delete mainmenuinfo where parentid=624
/
|
/* Backup All the data in database */
sudo mysqldump DATABASENAME > dataBackup.sql
/* Backup Onlu the table schemas */
sudo mysqldump -d DATABASENAME > dataBackup.sql
|
-- this script is commented due to a new quota design that
-- not requires default quota.
-- select fn_db_add_column('quota', 'is_default_quota', 'BOOLEAN');
|
/*
SQLyog Ultimate v8.32
MySQL - 5.5.27 : Database - chunjieboot
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FO... |
DELETE FROM `wp_model` WHERE `name`='custom_reply_news' ORDER BY id DESC LIMIT 1;
DROP TABLE IF EXISTS `wp_custom_reply_news`;
DELETE FROM `wp_model` WHERE `name`='weisite_cms' ORDER BY id DESC LIMIT 1;
DROP TABLE IF EXISTS `wp_weisite_cms`;
|
ACTIVITY 2-3
--1. How many copies of the book titled The Lost Tribe are owned by the library branch whose name is "Sharpstown".
SELECT SUM( no_of_copies ) AS COPIES FROM BOOK_COPIES
inner JOIN LIBRARY_BRANCH
ON LIBRARY_BRANCH.Branchild= BOOK_COPIES.Branchild
INNER JOIN BOOK
ON BOOK_COPIES.BookId=book.BookId
WHERE ... |
CREATE DATABASE /*!32312*/ IF NOT EXISTS `homyaki_web`/*!40100 DEFAULT CHARACTER SET utf8 */;
USE `homyaki_web`;
CREATE TABLE `interface_handlers` (
`name` char(128) NOT NULL,
`handler` char(128) DEFAULT NULL,
`description` char(128) DEFAULT NULL,
PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW... |
-- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 08-10-2013 a las 21:33:18
-- Versión del servidor: 5.5.32
-- Versión de PHP: 5.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC... |
--@Autor: Flores Fuentes Kevin y Torres Verástegui José Antonio
--@Fecha de creación: 16/06/2020
--@descripción: Consultas
/*Este archivo contendrá 5 o más consultas. El criterio es libre. Se debe emplear el uso de los siguientes elementos.
- joins (inner join, natural join, outer join)
- funciones de agregación (grou... |
-- AlterTable
ALTER TABLE `userinfo` ADD COLUMN `key` VARCHAR(191) NOT NULL DEFAULT '-1';
|
-- 1
select distinct state, city, zip
from Customer;
-- 2
select empname, department, phone, email
from Employee
where phone Like "3-%";
-- 3
select *
from Resource_tbl
where rate between 10 and 20
order by rate;
-- 4
select *
from EventRequest
where status in("Approved", "Denied") and dateauth like "2018-07-%";... |
USE `hefesto`;
DROP procedure IF EXISTS `sppacienteInsert`;
DELIMITER $$
USE `hefesto`$$
CREATE PROCEDURE `sppacienteInsert` (OUT pacienteId int(11), IN nombre varchar(45), IN segundoNombre varchar(45), IN apellidoPaterno varchar(45), IN apellidoMaterno varchar(45), IN fechaNacimiento date, IN numeroSeguroSocial varch... |
select cppi.*
from pmt.Payment p
inner join pmt.CreditCardPaymentInfo ccpi on ccpi.PaymentId = p.id
inner join pmt.CreditPilotPaymentInfo cppi on cppi.CreditCardPaymentInfoId = ccpi.Id
where p.id = 2002029
select fpi.*
from pmt.Payment p
inner join pmt.CreditCardPaymentInfo ccpi on ccpi.PaymentId = p.id
inner joi... |
insert into
LauncherGroupItems
(
[LauncherGroupId],
[LauncherItemId],
[Sequence],
[CreatedTimestamp],
[CreatedAccount],
[CreatedProgramName],
[CreatedProgramVersion]
)
values
(
/* LauncherGroupId */ @LauncherGroupId,
/* LauncherItemId */ @LauncherItemId,
/* Sequen... |
/* SSNL Database Template */
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `activeplayers`
-- ----------------------------
DROP TABLE IF EXISTS `activeplayers`;
CREATE TABLE `activeplayers` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Server` int(11) NOT NULL,
`Spectating` int(11)... |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 22-Nov-2017 às 18:26
-- Versão do servidor: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
-- <서브쿼리>
-- Abel직원보다 급여를 더 많이 받는 지원들?
--Abel의 급여 확인
select salary from employees where last_name = 'Abel';
-- 서브쿼리를 사용
-- 단일행 연산자 ( =, >,<,<=,=>,<>,!=)
select employee_id,last_name, salary
from employees where salary > (select salary
from employees
... |
CREATE DATABASE student_information_TrailB;
USE student_information_TrailB;
DROP DATABASE student_information_TrailB;
CREATE TABLE student_data (
id INT NOT NULL AUTO_INCREMENT,
student_no BIGINT,
first_name VARCHAR(255) NOT NULL,
surname VARCHAR(255) NOT NULL,
programme VARCHAR(255),
PRIMARY KEY (id)
);
CREATE TAB... |
DROP TABLE IF EXISTS `document`;
CREATE TABLE `document` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb... |
select
TZ_TYPE_IMG,
TZ_NOW_IMG
from
PS_TZ_SITEI_MNPF_T
where
TZ_SITEI_ID=?
and TZ_MENU_ID=?
and TZ_SKIN_ID=(
select
TZ_SKIN_ID
from
PS_TZ_SITEI_DEFN_T
where
TZ_SITEI_ID = ?
) |
drop view if exists view_rt_precincts_per_barangay;
create or replace view view_rt_precincts_per_barangay
(district_id, district, municipality_id, municipality, barangay_id, barangay, precinct_count)
as
select
rt_district.id,
rt_district.name,
rt_municipality.id,
rt_municipality.... |
create database classmem;
\c classmem
create role classviewer with login;
create table students (
id serial,
firstname text,
lastname text,
class text
);
grant select on students to classviewer;
insert into classviewer(firstname, lastname,class) VALUES
('john','bonipart','cpsc240'),
('alice','hooligan',... |
INSERT INTO genres
VALUE ('vargenre') |
CREATE PROCEDURE [Report].[EDWStatusLatestData]
AS
SELECT Telephony.ReportingSystem
,ServiceStatus.ServiceStatus
,Telephony.CalendarDate + CAST(LatestTelephonyActivity AS DATETIME) AS LatestTelephonyActivity
,CaseActions.CalendarDate + CAST(LatestCaseActions AS DATETIME) AS LatestCaseActions
FROM
(
SELECT ... |
USE `mark`;
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for tag
-- ----------------------------
DROP TABLE IF EXISTS `tag`;
CREATE TABLE `tag` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tag_name` varchar(255) NOT NULL unique,
`create_date` datetime DEFAULT CURRENT_TIMESTAMP,
`a... |
create view ADM.VW_TIPO_ASENTAMIENTO AS
select DISTINCT cl_tipo_asentamiento from adm.c_colonia
|
SELECT inc.id, inc.us_state, inj.name AS injury, a.name AS affected_area, c.name AS cause FROM incidents inc
JOIN injuries inj ON inc.injury_id = inj.id
JOIN affected_areas a ON inj.affected_area_id = a.id
JOIN causes c ON inc.cause_id = c.id;
|
CREATE TABLE sample_user (
id INTEGER NOT NULL AUTO_INCREMENT,
username VARCHAR(32) NOT NULL,
email VARCHAR(40) NOT NULL,
pass VARCHAR(40) DEFAULT NULL,
created_at DATETIME NOT NULL,
activation_key VARCHAR(32) DEFAULT NULL,
activated TINYINT(1) DEFAULT 0,
PRIMARY KEY (id)
) ENGINE=InnoD... |
delete from HtmlLabelIndex where id=26481
/
delete from HtmlLabelInfo where indexid=26481
/
INSERT INTO HtmlLabelIndex values(26481,'理由')
/
INSERT INTO HtmlLabelInfo VALUES(26481,'理由',7)
/
INSERT INTO HtmlLabelInfo VALUES(26481,'Reason',8)
/
INSERT INTO HtmlLabelInfo VALUES(26481,'理由',9)
/ |
begin
dbms_lock.sleep(10);
end;
/ |
CREATE DATABASE IF NOT EXISTS `Memory` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `Memory`;
-- MySQL dump 10.13 Distrib 8.0.25, for Win64 (x86_64)
--
-- Host: 40.83.114.235 Database: Memory
-- ------------------------------------------------------
-... |
INSERT INTO configure (date_open, date_edit, type, name, title, card)
VALUES (CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'VIEW', 'doc_base', 'doc_base',
'
<view extend="">
<item format="Include" view="task_base_fields" />
<item format="Include" view="doc_base_fields" />
</view... |
create table takes_course
(username varchar2(14) not null,
crn number(10) not null,
course_grade number(5,2),
constraint pk_takes_course primary key(username, crn),
constraint fk_username_takes_course foreign key (username) references site_user(username) on delete cascade,
constraint fk_crn_takes_course foreign k... |
create database yurnerola;
use yurnerola;
create table hosts
(
host_id int(5) primary key auto_increment,
host_ip varchar(15),
host_pwd varchar(30),
host_addr varchar(30)
);
|
CREATE TABLE dict.systemStatus (
systemstatusid INT PRIMARY KEY NULL,
name VARCHAR(256) NOT NULL,
description VARCHAR(1024)
)
|
USE `gaming_platform`;
/*!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 */;
/*!50503 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE... |
/***********************************************************************************
|| QUERY INFORMATION
||
|| Department: Data Warehouse
|| Programmer: Luis Fuentes
|| Date: 04/03/2018
|| Category: Table creation
||
|| Description: Creates table T_DIM_CLIENT_EMPLOYEE
||
|| Pa... |
DROP TABLE tbl_Member;
create table tbl_member(
memid varchar(20) not null,
pw varchar(20) not null,
email varchar(30) not null,
phone varchar(13) not null,
address varchar(100),
payment varchar(50),
memberDate DATE
);
alter table tbl_member add primary key (memid);
... |
CREATE DATABASE IF NOT EXISTS database_dental;
USE database_dental;
CREATE TABLE Usuarios(
usuario_id INT (100) NOT NULL AUTO_INCREMENT ,
usuario_correo VARCHAR(100) NOT NULL,
usuario_clave VARCHAR(100) NOT NULL,
usuario_permiso VARCHAR(10) NOT NULL
);
ALTER TABLE Usuarios
ADD PRIMARY KEY (usuario_... |
drop table if exists portfolio_loss_histogram;
create table portfolio_loss_histogram
(
reporting_date varchar(50),
bucket varchar(50),
frequency integer(50),
version integer(50)
); |
/*20. Given a position code and its corresponding missing-k list specified in Question 19.
Find every skill that is needed by at least one person in the given missing-k list. List
each skill code and the number of people who need it in the descending order of the people counts.*/
with missing_skills AS(
select per... |
CREATE INDEX shelfNum_idx
ON Book (shelfnum);
CREATE INDEX category_idx
ON Book (category);
CREATE INDEX capacity_idx
ON BeitMidrashHall (capacity)
|
#tbusermain
ALTER TABLE tbusermain CHANGE invitateCode inviteCode VARCHAR(8);
ALTER TABLE tbusermain ADD userIcon VARCHAR(500);
#tbusertemp
ALTER TABLE tbusertemp CHANGE invitateCode inviteCode VARCHAR(8);
ALTER TABLE tbusertemp ADD userIcon VARCHAR(500);
|
CREATE TABLE tb_evento_amizade_recompensa
(
tripulacao_id INT(10) UNSIGNED ZEROFILL NOT NULL,
recompensa_id INT(10) UNSIGNED NOT NULL,
CONSTRAINT tb_evento_amizade_tb_usuarios_id_fk FOREIGN KEY (tripulacao_id) REFERENCES tb_usuarios (id)
ON DELETE CASCADE
ON UPDATE CASCADE
);
CREATE INDEX tb_even... |
create or replace view player_purchase_daily as
select
pd.player_id,
pd.created_ts::date registration_date,
coalesce(platform, cashier_platform) purchase_platform,
message_ts::date purchase_date,
sum(amount / rate) total_amount_gbp,
count(1) num_purchases
from external_transaction et, currency_rates cr, player_de... |
/*
Navicat MySQL Data Transfer
Source Server : localhost_3366
Source Server Version : 50505
Source Host : localhost:3366
Source Database : baidunews
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2016-06-20 19:13:22
*/
SET FOREIGN_KEY_CHECKS=0... |
ALTER PROCEDURE PR_SEL_UPD
(
@NM_ALUNO VARCHAR (100),
@NR_RA VARCHAR (20)
)
AS
BEGIN
SELECT
NM_ALUNO AS Aluno,
NR_RA AS RA
FROM
TB_AD
WHERE
NM_ALUNO = @NM_ALUNO
COLLATE LATIN1_GENERAL_CI_AI
OR
NR_RA = @NR_RA
END
EXEC PR_SEL_UPD
@NM_ALUNO = 'Teste 02',
@NR_RA = '12345' |
delete from SystemlogItem where itemid = '100'
/
insert into SystemLogItem (itemid,lableid,itemdesc) values('100',19859,'新闻类型设置')
/
|
CREATE TABLE `userInfo` (
`userId` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键Id',
`userName` varchar(24) NOT NULL COMMENT '用户名',
`password` varchar(16) NOT NULL COMMENT '登录密码',
`name` varchar(16) NOT NULL COMMENT '真实姓名',
`sex` int(1) NULL COMMENT '性别',
`age` int(3) NULL COMMENT '年龄',
`email` varchar... |
ALTER TABLE workflow_createdoc ADD defaultDocType char(1) NULL
/
|
create database bamazon;
use bamazon;
create table products(
item_id integer auto_increment not null,
product_name varchar(45) not null,
department_name varchar(45) not null,
price decimal(10,4) not null,
stock_quantity integer(10) not null,
primary key (item_id)
);
Select * From bamazon.products;
|
--1 마당서점의고객이요구하는다음질문에대해SQL 문을작성하시오.
--(5) 박지성이구매한도서의출판사수
select custid from customer where name = '박지성';
select count(publisher)
from book , orders
where book.bookid = orders.bookid
and custid=(select custid from customer where name='박지성')
;
--(6) 박지성이구매한도서의이름, 가격, 정가와판매가격의차이
select bookname, price -saleprice "pric... |
SELECT X.District
FROM (SELECT *
FROM world.city Z
WHERE Z.District IN (SELECT B.District FROM world.country V, world.city B WHERE V.Capital=B.ID)
GROUP BY Z.District
HAVING SUM(Z.Population) > (SELECT SUM((N.Percentage * M.Population)/100)FROM world.countrylanguage N, world.country M WHERE N.Co... |
drop table if exists dbo.br993Mango
;
with ClientsList1 as
(
select
fu.id as ClientId
,uc.Passport
from dbo.FrontendUsers fu
inner join dbo.UserCards uc on uc.UserId = fu.id
cross apply
(
select top 1 ush.Status
from dbo.UserStatusHistory ush
where ush.UserI... |
Select * from film_text;
Update film_text
set title = "AFRICAN EGG 2"
where film_id = 5 |
drop database if exists birthday;
create database birthday default character set=utf8;
use birthday;
create table person(
id int auto_increment,
name varchar(256) not null,
sex varchar(16) not null,
birthday varchar(32) not null,
calendar varchar(16) not null,
mail varchar(256) not null,
primary key(id)
);
|
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: May 14, 2021 at 11:21 AM
-- Server version: 10.3.29-MariaDB-0ubuntu0.20.04.1
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... |
CREATE TABLE "Minnesota_Hospitals" (
"OBJECTID" INT primary key,
"NAME" TEXT,
"ADDRESS" TEXT,
"CITY" TEXT,
"STATE" TEXT,
"HOSP_BEDS" INT
);
CREATE TABLE "indivs_Minnesota18" (
"Contribution_ID" TEXT primary key,
"Orgname" TEXT,
"Amount" INT,
"City" TEXT,
"State" TEXT,
"Zip" INT,
"Gender" TEXT
); |
ALTER TABLE GIFTS ADD COLUMN COLLECTED_TS DATETIME# |
-- phpMyAdmin SQL Dump
-- version 3.3.3
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2016 年 05 月 03 日 08:53
-- 服务器版本: 5.5.24
-- PHP 版本: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_R... |
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 mydb
-- ----------------------------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.