检索至少有一名职工信息的“仓库号”及仓库的“所在地”和“人数”,正确的SQL命令是( )。
A.SELECT 仓库号,所在地,人数 FROM 仓库 WHERE IN; (SELECT 仓库号 FROM 职工 WHERE 仓库号=职工.仓库号)
B.SELECT 仓库号,所在地,人数 FROM 仓库 WHERE 仓库号 IN; SELECT 仓库号 FROM 职工 WHERE 仓库号=仓库.仓库号)
C.SELECT 仓库号,所在地,人数 FROM 仓库 WHERE NOT EXISTS; (SELECT 仓库号 FROM 职工 WHERE 仓库号=仓库.仓库号)
D.SELECT 仓库号,所在地,人数 FROM 仓库 WHERE EXISTS; (SELECT 仓库号 FROM 职工 WHERE 仓库号=仓库.仓库号)
第1题:
利用SQL语句,检索仓库中至少有一名职工的仓库信息,正确的命令是
A.SELECT*FROM仓库表WHERE IN; (SELECT仓库号FROM职工表)
B.SELECT*FROM仓库表WHERE NOT IN; (SELECT仓库号FROM职工表)
C.SELECT*FROM仓库表WHERE仓库号EXISTS; (SELECT*FROM职工表WHERE仓库号=仓库表.仓库号)
D.SELECT*FROM仓库表WHERE EXISTS; (SELECT*FROM职工表WHERE仓库号=仓库表.仓库号)
第2题:
利用SQL语句,检索仓库中至少有一名职工的仓库信息,正确的命令是
A.SELECT * FROM 仓库表 WHERE IN; (SELECT 仓库号 FROM 职工表)
B.SELECT * FROM 仓库表 WHERE NOT IN; (SELECT 仓库号 FROM 职工表)
C.SELECT * FROM 仓库表 WHERE 仓库号 EXISTS; (SELECT * FROM 职工表 WHERE 仓库号=仓库表.仓库号)
D.SELECT * FROM 仓库表 WHERE EXISTS; (SELECT * FROM 职工表 WHERE 仓库号=仓库表.仓库号)
第3题:
第4题:
检索最少有4名职工仓库的职工平均工资( )。
A.SELECT 仓库号,COLINT(*) AS 人数,AVG(工资) AS 平均工资 FROM 职工; GROUP BY 仓库号 WHERE COUNT(*)>=4
B.SELECT 仓库号,COUNT(*) AS 人数,AVG(工资) AS 平均工资 FROM 职工; GROUP BY 仓库号 HAVING COUNT(*)>=4
C.SELECT 仓库号,COUNT(*) AS 人数,AVG (工资) AS 平均工资 FROM 职工; GROUP BY 职工号 WHERE COUNT(*)>=4
D.SEIECT 仓库号,COUNT(*) AS 人数,AVG(工资) AS 平均工资 FROM 职工; GROUP BY 职工号 HAVING COUNT(*)>=4
第5题:
检索至少有一名职工信息的“仓库号”及仓库的“所在地”和“人数”,正确的SQL命令是( )。
A)SELECT仓库号,所在地,人数FROM仓库WHERE IN;
(SELECT仓库号FROM职工WHERE仓库号=职工.仓库号)
B)SELECT仓库号,所在地,人数FROM仓库WHERE仓库号IN;
SELECT仓库号FROM职工WHERE仓库号=仓库.仓库号
C)SELECT仓库号,所在地,人数FROM仓库WHERE NOT EXISTS;
(SELECT仓库号FROM职工WHERE仓库号=仓库.仓库号)
D)SELECT仓库号,所在地,人数FROM仓库WHERE EXISTS;
(SELECT仓库号FROM职工WHERE仓库号=仓库.仓库号)