Employee的表结构为:职工号、单位号、工资,Department的表结构为:单位号、单位名称、人数,与下列语句等价的SQL命令是( )。 SELECT职工号,单位名称FROM Employee,Department; WHERE工资>12

admin2015-08-12  38

问题 Employee的表结构为:职工号、单位号、工资,Department的表结构为:单位号、单位名称、人数,与下列语句等价的SQL命令是(     )。
SELECT职工号,单位名称FROM Employee,Department;
WHERE工资>12000 AND Employee.单位号=Department.单位号

选项 A、SELECT职工号,单位名称FROM Department JOIN INNER employee ON Department.单位号=Em_ployee.单位号WHERE Employee.工资>12000
B、SELECT职工号,单位名称FROM Department INNER JOIN employee ON Department.单位号=Em_ployee.单位号WHERE Employee.工资>12000
C、SELECT职工号,单位名称FROM Department JOIN INNER employee Department.单位号=Employee.单位号WHERE Employee.工资>12000
D、SELECT职工号,单位名称FROM Department INNER JOIN employee ON Department.单位号=Em_ployee.单位号Employee.工资>12000

答案B

解析 本题考查超链接查询,超链接有四种连接方式,其基本格式如下:SELECT……FROM左表INNER |LEFT | RIGHT| FULL JOIN右表ON连接条件WHERE其它条件,根据超链接基本格式可以排除A、C、D选项,即B选项为正确答案。
转载请注明原文地址:https://jikaoti.com/ti/fgv0FFFM
0

最新回复(0)