text
stringlengths
6
9.38M
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: sql301.epizy.com -- Generation Time: Nov 09, 2020 at 01:06 AM -- Server version: 5.6.48-88.0 -- PHP Version: 7.2.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
delete from ordinar where (or_matric= '' OR or_zona= '0' OR or_plant= '0' OR or_asigna= '0' OR or_semest='0' OR or_grupo= '0' OR or_turno= '0' OR or_ciclo= '') AND or_calord=''
SELECT street.id as id, street.name as name, city.id as city_id, city.name as city_name, street.caption as type_enum, coalesce(street.caption, '') as caption FROM atu_street as street LEFT JOIN atu_city as city on street.city_id = city.id WHERE street.record_state <> 4
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 02, 2020 at 01:23 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
CREATE SEQUENCE user_id_seq; CREATE TABLE users ( id BIGSERIAL PRIMARY KEY, username TEXT NOT NULL UNIQUE ); CREATE SEQUENCE card_id_seq; CREATE TABLE payments ( id BIGSERIAL PRIMARY KEY, sender_id BIGINT NOT NULL REFERENCES users, amount BIGINT NOT NULL, comment TEXT NOT NULL...
DROP TABLE IF EXISTS student CASCADE; DROP TABLE IF EXISTS dorm_room CASCADE; DROP TABLE IF EXISTS developer CASCADE; DROP TABLE IF EXISTS workstation CASCADE; DROP TABLE IF EXISTS pupil CASCADE; DROP TABLE IF EXISTS assigned_seat CASCADE; DROP TABLE IF EXISTS artist CASCADE; DROP TABLE IF EXISTS painting CASCAD...
select id,nombre from usuario
select * from ( (select e.*,rownum rn from (select * from employees order by employee_id) e where rownum <= 50 ) ) where rn >= 6;
alter table devcode_transactions add modified_date timestamp null;
create database BookManagement select * into BookManagement.dbo.BOOKSTOCK_HanoiNoMoreThan60000 from [MAIN].BookManagement.dbo.BOOKSTOCK where BranchID = 'B0' and UnitPrice <= 60000 select * into BookManagement.dbo.ORDERS_HCMLater2021 from [MAIN].BookManagement.dbo.ORDERS where BranchID = 'B1' and OrderDate >= '1-1-202...
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 23, 2020 at 04:36 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.2.34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 5.5.24-log - MySQL Community Server (GPL) -- Server OS: Win64 -- HeidiSQL version: 7.0.0.4165 -- Date/time: 2012-09-19 08:22:05 -- ---...
/* ################################################################################ Migration script to create ASSOCIATION_EXTENSION table author: Jon Stewart date: 12 Dec 2019 version: 2.3.0.008 ################################################################################ */ ----------------------------------...
select COUNT(*) as messages_number FROM message WHERE ID_EMPLOYE = :ID_EMPLOYE
DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `uspFacultyDelete`( i_FacultyCode varchar(45), i_FacultyFirstName varchar(1000), i_FacultyLastName varchar(1000), i_Qualification varchar(45), i_Designation varchar(45) ) BEGIN Declare i_FacultyID int; Set i_FacultyID=(select FacultyNumber from tblFacultyDetails ...
;WITH cte AS ( SELECT ProductID, ListPrice , (SELECT MIN(ListPrice) FROM Production.Product WHERE ListPrice != 0) AS MinListPrice , (SELECT MAX(ListPrice) FROM Production.Product WHERE ListPrice != 0) AS MaxListPrice FROM Production.Product WHERE ListPrice != 0 ) SELECT ProductID, ListPrice , (ListPrice - MinLis...
-- 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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
CREATE DATABASE notifyagent CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE `Notify` ( `id` bigint(10) unsigned NOT NULL AUTO_INCREMENT, `fKey` varchar(150) DEFAULT NULL COMMENT '外键', `queueName` varchar(100) NOT NULL DEFAULT '' COMMENT '队列名称', `caller` varchar(100) NOT NULL DEFAULT '' COMMENT '...
-- Adminer 4.2.5 MySQL dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; INSERT INTO `article` (`article_id`, `title`, `content`, `url`, `description`, `requestable`, `author`) VALUES (1, 'Úvod', '<p>V&iacute;tejte na na&scaron;em webu!</p>\n\n<p>T...
CREATE TABLE CATEGORIA( CAT_ID BIGINT(20) PRIMARY KEY AUTO_INCREMENT, CAT_NOME VARCHAR(50) NOT NULL )Engine=InnoDB DEFAULT CHARSET=utf8; INSERT INTO CATEGORIA (CAT_NOME) VALUES ('Lazer'); INSERT INTO CATEGORIA (CAT_NOME) VALUES ('Alimentação'); INSERT INTO CATEGORIA (CAT_NOME) VALUES ('Supermercado'); INSERT INTO CA...
alter table "user" add column stripe_account_id text;
-- Initialize the database if uninitialized CREATE DATABASE IF NOT EXISTS bravo_supermarket; USE bravo_supermarket;
drop database if exists BdGerenciadorDeProcessos; create database if not exists BdGerenciadorDeProcessos default character set utf8 default collate utf8_general_ci; use BdGerenciadorDeProcessos; drop table if exists processo; create table if not exists processo ( id bigint not null auto_increment primary key, nu...
DELIMITER $$ USE `pubs10`$$ DROP PROCEDURE IF EXISTS `pp4`$$ CREATE DEFINER=`root`@`localhost` PROCEDURE `pp4`() BEGIN -- 定义变量 DECLARE cnt INT DEFAULT 0; DECLARE i INT DEFAULT 1; DECLARE aid VARCHAR(20); -- 删除linshi_1表,清空cntauthors表 DROP TABLE IF EXISTS linshi_1; DELETE FROM cntauthors; -- 查询作者总...
CREATE TABLE EMP ( empno INT, ename VARCHAR(25), job VARCHAR(12), salary INT, commission INT, deptno int ); DESCRIBE EMP; INSERT INTO EMP (empno,ename,job,salary,deptno)VALUES(7369,'smith','clerk',800,20); SELECT * FROM EMP; DROP TABLE EMP; INSERT INTO EMP (empno,ename,job,salary,commission,deptno)VALUES(7499,'ALLEN','...
-- -- Copyright 2009-2011, Trustees of Indiana University -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- Redistributions of source code must retain the above copyright notice, -- th...
create database Hillary_Emails; use Hillary_Emails; create table aliases (Id varchar primary key, Aliase varchar(200), PersonId varchar(10) ) bulk insert aliases from 'E:\SelfLearn\HillaryClinton_Kaggle\Aliases.csv' with ( firstrow = 2, rowterminator = '\n', fieldterminator = ',' ); select * from aliases; create tab...
use real_estate; CREATE TRIGGER user_password BEFORE INSERT ON real_estate.user FOR EACH ROW SET NEW.password = real_estate_encode(NEW.password); INSERT INTO real_estate.user (login, password, created, email, firstName, lastName, deleted_at) VALUES ( 'olek', '12345', '2019-05-25', 'olek@gmail.com', 'Olek...
CREATE DATABASE IF NOT EXISTS `exafarm` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_spanish_ci */; USE `exafarm`; -- MySQL dump 10.13 Distrib 5.6.19, for osx10.7 (i386) -- -- Host: 127.0.0.1 Database: exafarm -- ------------------------------------------------------ -- Server version 5.5.28 /*!40101 SET @OLD...
SET SQL_SAFE_UPDATES = 0; USE sakila; SELECT first_name, last_name FROM actor; UPDATE actor SET actor_name = CONCAT(first_name, ' ', last_name); SELECT actor_name FROM actor; SELECT actor_id, first_name, last_name FROM actor WHERE first_name = 'Joe'; SELECT actor_id, first_name, last_name FROM actor WHER...
-------------------------------------------------------- -- DDL for Table R_FLEX_ATTRIBUTE_MGMT -------------------------------------------------------- CREATE TABLE "VF_SPMC_REF"."R_FLEX_ATTRIBUTE_MGMT" ( "FLEX_ATTR_ID" NUMBER, "FLEX_ATTR_TYPE" VARCHAR2(20), "FLEX_ATTR_NAME" VARCHAR2(100), "FLEX_ATTR_...
update public.product set pr_jsonb = $1 where pr_id = $2;
ALTER TABLE produto ADD COLUMN quantidade_estoque BIGINT;
CREATE USER 'sadmin'@'%' IDENTIFIED BY '12345'; GRANT ALL PRIVILEGES ON * . * TO 'sadmin'@'%';
-- 评价表增加 发布状态字段 ALTER TABLE beiker_order_evaluation ADD COLUMN publishstatus INT(10) NOT NULL DEFAULT '0' COMMENT '发布状态:0未发布;1已发布';
CREATE TABLE IF NOT EXISTS review ( review_no BIGINT NOT NULL AUTO_INCREMENT, text VARCHAR(1000), PRIMARY KEY (review_no) ); CREATE TABLE IF NOT EXISTS srp_review ( keyword varchar(100) NOT NULL, image VARCHAR(1000), text VARCHAR(1000), PRIMARY KEY (keyword) );
alter table profesor add column color varchar(10); alter table estudiante add column color varchar(10); alter table profesor add column imagen longblob; alter table estudiante add column imagen longblob;
insert into teacher (first_name, last_name, email) values ('yanda', 'ndla', 'yanda@email.com'); insert into teacher (first_name, last_name, email) values ('Siba', 'Khumalo', 'siba@khumalo.com'); insert into teacher (first_name, last_name, email) values ('Lindani', 'Pani', 'lindani@email.com'); insert into teacher (firs...
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 07, 2017 at 05:06 AM -- Server version: 10.1.21-MariaDB -- PHP Version: 7.0.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
-- 1. Selezionare tutti gli studenti nati nel 1990 SELECT `name`, `surname`, `date_of_birth` FROM `students` WHERE YEAR (`date_of_birth`) = 1990; -- 2. Selezionare tutti i corsi che valgono più di 10 crediti SELECT `name`, `cfu` FROM `courses` WHERE `cfu` > 10; -- 3. Selezionare tutti gli studenti che hanno più di...
-- Term Spec is needed select * from KRMS_TERM_SPEC_T where DESC_TXT in ('Sponsor Rule','Has Prime Sponsor'); select * from KRMS_TERM_SPEC_T where term_spec_id = 'KC2002'; select * from KRMS_TERM_T where term_spec_id in (select term_spec_id from KRMS_TERM_SPEC_T where DESC_TXT in ('Sponsor Rule','Has Prime Sponsor...
ALTER TABLE event ADD COLUMN creator_id INTEGER NOT NULL; ALTER TABLE event ADD CONSTRAINT fk_creator_id FOREIGN KEY (creator_id) REFERENCES account (id);
SELECT dm.*, d.* FROM dept_manager dm CROSS JOIN departments d ORDER BY dm.emp_no, d.dept_no;
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 25 Jun 2020 pada 12.22 -- Versi server: 10.1.36-MariaDB -- Versi PHP: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
------------------------------------------------------------------------------------- -- Instruções SQL DML --------------------------------------------------------------- -- POPULA A TABELA ESTADO INSERT INTO Estado VALUES ('AC', 'Acre'), ('AL', 'Alagoas'), ('BA', 'Bahia'), ('CE', 'Ceará'), ('ES', 'Espírito S...
DROP TRIGGER after_delete_fmm_flight ON fmm_flight; CREATE TRIGGER after_delete_fmm_flight AFTER DELETE ON fmm_flight FOR EACH ROW EXECUTE PROCEDURE notify_after_delete();
DROP FUNCTION fn_nba_get_home_away_flag; DELIMITER // CREATE FUNCTION fn_nba_get_home_away_flag ( game_id INT(20), play_id INT(11), year_id INT(4)) RETURNS TEXT BEGIN DECLARE vt_player CHAR(1); IF (year_id = 2016) THEN SELECT CASE WHEN ( nba.h1 = nba.player OR nba.h2 = nba.player OR nba....
create view vwExpense as select e.ExpenseId, e.ExpenseType, e.Value, e.ExpenseDate, e.ExpenseRecipientId, e.ExpenseCategoryId, e.ExpenseMonth, r.Name as ExpenseRecipientName, c.Name as ExpenseCategoryName, e.ExpenseSourceId as ExpenseSourceId, e.ExpenseRecipientDetailCode, e.Details1, e.Details2 from Exp...
set serveroutput on; set verify off; declare givenDate DONATION_DETAILS.givenat%TYPE; id DONOR.DID%TYPE; begin id:=&id; givenDate := SYSDATE; isEligible(id,givenDate); end; /
--1. How many pizzas were ordered?-- SELECT COUNT (order_id) as total_pizzas FROM pizza_runner.customer_orders --2.How many unique customer orders were made?-- SELECT COUNT (DISTINCT customer_id) FROM pizza_runner.customer_orders --3.How many successful orders were delivered by each runner?-- DROP TABLE IF EXISTS cus...
-- Date and String Functions -- 01 - # of orders per day SELECT DAY(OrderDate) AS order_day, COUNT(*) AS count_order FROM Orders GROUP BY DAY(OrderDate); -- 02 - # of orders per month SELECT MONTH(OrderDate) AS order_month, COUNT(*) AS count_order FROM Orders GROUP BY MONTH(OrderDate); -- 03 - # of orders per ...
-- SQL statements which are executed at application startup if hibernate.hbm2ddl.auto is 'create' or 'create-drop' INSERT INTO TB_USER(LOGIN, NAME, PASSWORD) VALUES('rbonifacio@cic.unb.br', 'Rodrigo Bonifacio', 'rodrigo'); INSERT INTO TB_USER(LOGIN, NAME, PASSWORD) VALUES('murlsousa@gmail.com>', 'Murilo Sousa', 'muril...
INSERT INTO `type_sujet` (`Id`, `libelle`, `ref_langage`) VALUES (1, 'hibernate', 1), (2, 'Java/J2EE', 1), (3, 'C natif', 3);
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `puzzle` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `puzzle`; -- -- Table structure for table `highscores` -- DROP TABLE IF EXISTS `highscores`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `highsc...
DROP TABLE songs_and_playlists_relationships; DROP TABLE playlists; DROP TABLE customers; DROP TABLE songs; DROP TABLE rooms; CREATE TABLE rooms ( id SERIAL8 PRIMARY KEY, size INT, entry_fee INT ); CREATE TABLE playlists ( id SERIAL8 PRIMARY KEY, genre VARCHAR(255), room_id INT8 REFERENCES rooms(id) ); C...
-- import_stats.sql -- import stats for dictioary, fixed_objects and system -- if an argument has a value of 'NULL', then convert it to null -- comment this line to see variable subtitution set verify off col stattab new_value stattab noprint col stattab_owner new_value stattab_owner noprint col stats_type new_valu...
/* Extracts pressure reduction device chartevent data, removing unnecessary columns to make the data file smaller */ select datetimeevents.subject_id, datetimeevents.hadm_id, datetimeevents.icustay_id, datetimeevents.itemid, datetimeevents.charttime, datetimeevents.cgid from datetimeevents where datetimeevents.it...
ALTER TABLE posts ADD varcharColumn VARCHAR ALTER TABLE posts DROP varcharColumn
/* Chapter 3: The FROM Clause */ /* Create and populate a pair of test tables to illustrate the various types of join */ CREATE TABLE A ( a SMALLINT NOT NULL PRIMARY KEY ) ; INSERT INTO A VALUES (102),(104),(106),(107) ; CREATE TABLE B ( b SMALLINT NOT NULL PRIMARY KEY ) ; INSERT INTO B VALUE...
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Client : localhost:8889 -- Généré le : Jeu 10 Août 2017 à 16:18 -- Version du serveur : 5.6.35 -- Version de PHP : 7.1.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Base de données : `TimeMachi...
DROP TABLE IF EXISTS `XXX_mehrstufige_freigabe`; ##b_dump## DROP TABLE IF EXISTS `XXX_mehrstufige_freigabe_einstellungen`; ##b_dump##
use PHARMACY create view table3 as select id_worker, last_name from worker; select * from worker where birth>'1970-01-01' and birth<'1977-12-31'; select [check].id_check, [check].[date], worker.first_name, worker.last_name from [check], worker where [check].id_worker= worker.id_worker; select [check].id_check, [...
alter table hr.employees add constraint emp_fk foreign key (department_id) references hr.departments (department_id) on delete cascade; alter table hr.employees add foreign key (department_id) references hr.departments (department_id) on delete set null; alter table hr.employees add constraint emp_f...
INSERT INTO `cities` VALUES ('20001', 'Baissey', '52250', '6', '52035'); INSERT INTO `cities` VALUES ('20002', 'Balesmes-sur-Marne', '52200', '6', '52036'); INSERT INTO `cities` VALUES ('20003', 'Bannes', '52360', '6', '52037'); INSERT INTO `cities` VALUES ('20004', 'Bassoncourt', '52240', '6', '52038'); INSERT INTO...
-- Table: players -- DROP TABLE players; create table players ( id bigint not null auto_increment, first_name character varying(30) not null, last_name character varying(30) not null, email_address character varying(50) not null, password charac...
CREATE TABLE `auftrag` ( `orderID` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `firstname` varchar(50) NOT NULL, `lastname` varchar(50) NOT NULL, `email` varchar(100) NOT NULL, `phone` varchar(20) NOT NULL, `service` varchar(40) NOT NULL, `priority` varchar(16) NOT NULL, `date` varchar(40) NOT NULL ) C...
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 15, 2014 at 10:15 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 ...
select * from user_tab_columns
ALTER TABLE SONGS DROP CONSTRAINT IF EXISTS allowed_status_types; ALTER TABLE SONGS ADD CONSTRAINT allowed_status_types CHECK (STATUS = ANY ('{SHOW, IN_PROGRESS, INCOMPLETE, TO_BE_DELETED}'::text[])); ALTER TABLE SONGS ADD COLUMN REMARKS text;
--2 use SoftUni select * from Departments --3 select Name from Departments --4 select FirstName, LastName, Salary from Employees --5 select FirstName, MiddleName, LastName from Employees --6 select FirstName +'.' + LastName + '@softuni.bg' as 'Full Email Address' from Employees --7 select disti...
-- change transaction type from 16 to 9 update award_amount_transaction set transaction_type_code = 9 where transaction_id = 60075 ; select transaction_type_code from award_amount_transaction where transaction_id = 60075 ;
create table merchants ( `id` int(10) unsigned not null auto_increment, `name` varchar(64) collate utf8_bin not null comment '商户名称', `logo_url` varchar(256) collate utf8_bin not null comment '商户Logo', `business_url` varchar(256) collate utf8_bin not null comment '商户营业执照', `...
drop table if exists results; create table results ( submitter_id integer not null, subject_id integer not null, adjective text not null ); -- this index is used for fetch queries drop index if exists results_ids_idx; create index results_ids_idx on results ( subject_id, submitter_id ); -- thi...
/* ---------------------------- -- Tienda de Indumentaria--- ---------------------------- ========= TRIGGERS INSERTS ============= */ use db_indumentaria; drop trigger if exists SP_TRIGGER_after_insert_articulos; drop trigger if exists SP_TRIGGER_after_insert_articulos_accesorios_detalles; drop trigger if...
CREATE OR REPLACE VIEW oralpresentationgroup AS SELECT ag."researchEntity", ag.document FROM authorshipgroup ag JOIN document d ON ag.document = d.id JOIN source s ON d.source = s.id JOIN sourcetype st ON s.sourcetype = st.id WHERE exists( SELECT * FROM authorship a WHERE a.documen...
/* Archivo para exportar de PROSCAI a SHOPIFY Esta versión del 08/05/20 ya incluye el campo ICOMPOS el cual hace referencia a la sección de composición de otros dentro de proscai Los modelos se ordenan de mayo a menor El query da un handle por default, si es para actualizar campos es necesario copiar el de shopify y r...
CREATE TABLE advertisement ( id serial not null unique, date date not null, name varchar(200), description varchar(1000), cost float not null, img_url varchar(200)[] );
--// Add filtered to EchoClick -- Migration SQL that makes the change goes here. alter table EchoClick add column filtered int not null default 0, add index filtered(filtered); --//@UNDO -- SQL to undo the change goes here. alter table EchoClick drop filtered, drop index filtered;
/* Navicat MySQL Data Transfer Source Server : study_personal Source Server Version : 80013 Source Host : localhost:3306 Source Database : study2 Target Server Type : MYSQL Target Server Version : 80013 File Encoding : 65001 Date: 2020-11-07 16:21:46 */ SET FOREIGN_KEY_CHECKS=0; ...
# create-db.sql # Create database and table structure CREATE DATABASE IF NOT EXISTS GetLawyer; USE GetLawyer; CREATE TABLE IF NOT EXISTS `clients` ( `id` int(1) NOT NULL auto_increment, `name` varchar(80) NOT NULL, `email` varchar(80) NOT NULL, `password` varchar(80) NOT NUL...
ALTER TABLE COI_DISCL_PROJECTS ADD CONSTRAINT UQ_COI_DISCL_PROJECTS UNIQUE (COI_DISCLOSURE_NUMBER, SEQUENCE_NUMBER, COI_PROJECT_ID) /
CREATE TABLE user ( id INT AUTO_INCREMENT PRIMARY KEY, email VARCHAR(250) NOT NULL ); CREATE TABLE feature ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(250) NOT NULL ); CREATE TABLE user_access ( id INT AUTO_INCREMENT PRIMARY KEY, user_id INT NOT NULL, feature_id INT NOT ...
SELECT TOP(CONVERT(INT, /*topRow*/)) RTRIM(A.APPLY_NO) + ',' + CONVERT(VARCHAR(25),A.MODIFY_DATE ,121) + ',' + RTRIM(ISNULL(S.SUPPLIES_NO,'')) + ',' + CONVERT(VARCHAR(25),ISNULL(S.MODIFY_DATE,/*sysDate*/'') ,121) + ',' + A.APPLY_ATTRIBUTE + ',' + RTRIM(ISNULL(B.APPLY_NO,'000000')) + ',' + CONVERT(VARCHAR(25...
/* Navicat MySQL Data Transfer Source Server : MySQL Source Server Version : 50067 Source Host : localhost:3306 Source Database : hdu_sce Target Server Type : MYSQL Target Server Version : 50067 File Encoding : 65001 Date: 2013-10-18 11:42:48 */ SET FOREIGN_KEY_CHECKS=0; -- -----...
drop table student; drop table Course; drop table SC; --2.1 CREATE TABLE student (SNO CHAR(5) NOT NULL PRIMARY KEY, SNAME VARCHAR2(10) UNIQUE, SSEX CHAR(2) NOT NULL, SAGE NUMBER(3) DEFAULT 0, SDEPT VARCHAR2(10)); --student --(SNO,SNAME,SSEX,SAGE,SDEPT); --2.2 CREATE TABLE Course (CNO CHAR(10) NOT ...
select t.department_name as 当前部门, count(distinct t.student_intention_id) as 新粒子数, count(distinct case when t.adjust_start_time is not null then t.student_intention_id else null end) as 排课学生数, count(distinct case when t.is_trial=1 then t.student_intention_id else null end) as 出席学生数 from( select s.st...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 28 Apr 2021 pada 00.12 -- Versi server: 10.4.17-MariaDB -- Versi PHP: 7.4.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
DROP DATABASE IF EXISTS garage; CREATE DATABASE garage; USE garage; CREATE USER 'garage'@'%' IDENTIFIED BY 'garage'; GRANT ALL PRIVILEGES ON garage.* TO 'garage'@'%'; CREATE TABLE Category ( value VARCHAR(20) UNIQUE NOT NULL, CONSTRAINT category_id PRIMARY KEY (value) ); CREATE TABLE Gender ( value VARCHAR(5) UNIQUE...
DROP DATABASE IF EXISTS bamazon_DB; CREATE DATABASE bamazon_DB; USE bamazon_DB; CREATE TABLE products( item_id INTEGER(10) NOT NULL AUTO_INCREMENT, product_name VARCHAR(50) NOT NULL, department_name VARCHAR(50) NOT NULL, price DECIMAL(10,2) NOT NULL, stock_quantity INTEGER(10) NOT NULL, product_sales DECIMAL(10,2) ...
CREATE COLUMNFAMILY cim.user ( apikey VARCHAR PRIMARY KEY, secret VARCHAR, email VARCHAR, data VARCHAR, data_schema_version VARCHAR ); CREATE INDEX ON cim.user (email);
DROP TABLE IF EXISTS saes_testimonies; DROP TABLE IF EXISTS saes_articles; DROP TABLE IF EXISTS saes_promos; DROP TABLE IF EXISTS user_reviews; DROP TABLE IF EXISTS user_purchases; DROP TABLE IF EXISTS saes_programs; DROP TABLE IF EXISTS saes_items; DROP TABLE IF EXISTS saes_users; DROP TYPE IF EXISTS item_type; CREA...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Dec 10, 2018 at 08:42 PM -- Server version: 5.7.23 -- 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 @OLD_CH...
-- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64) -- -- Host: localhost Database: mydb -- ------------------------------------------------------ -- Server version 8.0.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
SELECT heroes.name, SUM(powers.points) FROM powers JOIN heroes ON(heroes.id = powers.hero_id) GROUP BY heroes.id ORDER BY SUM(powers.points) DESC, heroes.id LIMIT 1; SELECT heroes.name, SUM(powers.points) from heroes JOIN powers ON (heroes.id = powers.hero_id) WHERE powers.type = 'defense' GROUP BY heroes.id ORDER BY ...
drop sequence BURI_STATE_USER_SEQ;
--author:jianghuan --type: order test data --date:2017/9/15 --@Name: --@Description: --@Target: --@Source: set hive.auto.convert.join = false; use default; set hive.auto.convert.join = false; use default; create table order_tmp as select a.order_item_id ,a.order_item_order_id ,a.order_item_product_...
INSERT INTO `FueRealizadoPor` (`Funcionario_idFuncionario`,`informe_idInforme`) VALUES (10357936,1); INSERT INTO `FueRealizadoPor` (`Funcionario_idFuncionario`,`informe_idInforme`) VALUES (22571722,2);
WITH sub_info AS ( SELECT m.*, COUNT(1) OVER (PARTITION BY REPORT_KIND,REPORT_KIND_SMALL) AS SN , ROW_NUMBER() OVER (PARTITION BY REPORT_KIND,REPORT_KIND_SMALL ORDER BY BRANCH_ID DESC) AS SR --契約書類情報 FROM CON...
drop database location; create database location; use location; # ----------------------------------------------------------------------------- # TABLE : TYPE TECHNICIEN # ----------------------------------------------------------------------------- create table type_technicien ( codeT_T int(5) not null au...
use shop2; SELECT * FROM product; SELECT * FROM product INNER JOIN category ON product.category_id = category.id; SELECT product.id, price, name FROM product INNER JOIN category ON product.category_id = category.id; SELECT * FROM product INNER JOIN category ON product.category_id = category.id INNER JOIN brand ON br...