DECLARE @Y1002 varchar(200),@A0100 varchar(200),@C0103 datetime ----定义变量 DECLARE Police_Department CURSOR FOR --定义游标 SELECT Y1002,A0100,C0103... ...
分类:
数据库 时间:
2019-01-24 23:32:01
阅读次数:
331
E - K-th Number POJ - 2104 You are working for Macrohard company in data structures department. After failing your previous task about key insertion y ...
分类:
其他好文 时间:
2019-01-21 20:06:57
阅读次数:
134
本节主要介绍mysql的多表查询(多表连接查询、复合条件查询、子查询) 一、多表连接查询 #建表 #部门表 create table department( id int, name varchar(20) ); #员工表,之前我们学过foreign key,强行加上约束关联,但是我下面这个表并没有 ...
分类:
数据库 时间:
2019-01-18 19:59:46
阅读次数:
189
一、 多表连接查询 1 #建表 2 #部门表 3 create table department( 4 id int, 5 name varchar(20) 6 ); 7 8 create table employee( 9 id int primary key auto_increment, 10 ...
分类:
其他好文 时间:
2019-01-18 18:36:00
阅读次数:
179
本节主题 多表连接查询 复合条件连接查询 子查询 准备表 表department与表employee 二 多表连接查询 就是在笛卡尔积的基础上做了筛选 1 交叉连接:不适用任何匹配条件。生成笛卡尔积 2 内连接:只连接匹配的行(只取两张表的共同部分) 3 外链接之左连接:优先显示左表全部记录(在内连 ...
分类:
其他好文 时间:
2019-01-05 22:42:21
阅读次数:
209
committee 委员会 representative 代表 department secretary 系里的秘书 applicant 申请人 第 1 段 1.Listen to a conversation between a student and a Professor. 听一段学生和教授之 ...
分类:
其他好文 时间:
2018-12-30 17:35:21
阅读次数:
260
# Write your MySQL query statement belowSELECT d.pay_month,department_id,IF(department_avg=company_avg,'same',IF(department_avg>company_avg,'higher',' ...
分类:
其他好文 时间:
2018-12-22 11:52:44
阅读次数:
370
SELECT d.Name AS Department,e.Name AS Employee,e.Salary AS SalaryFROM Department d,Employee e, (SELECT MAX(Salary) AS Salary,DepartmentId FROM Employe ...
分类:
其他好文 时间:
2018-12-22 11:49:12
阅读次数:
657
SELECT d.Name AS Department,e.Name AS Employee,e.Salary AS SalaryFROM Employee e,Department dWHERE 3>(SELECT COUNT(DISTINCT e1.Salary) FROM Employee e ...
分类:
其他好文 时间:
2018-12-22 11:42:09
阅读次数:
156
多表查询 多表查询 多表查询 多表查询 一、介绍 首先先准备表 员工表和部门表 #建表 create table department( id int, name varchar(20) ); create table employee1( id int primary key auto_incre ...
分类:
数据库 时间:
2018-12-19 21:04:20
阅读次数:
159