题目内容

设有关系M、S、F:M(编号,姓名,性别,单位号),S(单位号,单位名),F(编号,姓名,性别,单位号)。其中,M为男性员工的集合,F为女性员工的集合。题目1:查询所有员工基本信息(编号,姓名,性别,单位号)。能实现本查询的对应的SQL语句是()。

A. select * from munionselect * from f
B. select * from m union f
C. select * from mselect * from f
D. select 编号,姓名,性别,单位号 from funionselect 编号,姓名,性别,单位号 from m
E. select * from m,f

查看答案
更多问题

设有关系M、S、F:M(编号,姓名,性别,单位号),S(单位号,单位名),F(编号,姓名,性别,单位号)。其中,M为男性员工的集合,F为女性员工的集合。题目2:查询单位号为'100'的男员工基本信息。能实现本查询的对应的SQL语句是()。

A. select * from m
B. select * from m where 单位号='100'
C. select * from f where 单位号='100'
D. select 编号,姓名,性别,单位号 from m where 单位号=100

设有关系M、S、F:M(编号,姓名,性别,单位号),S(单位号,单位名),F(编号,姓名,性别,单位号)。其中,M为男性员工的集合,F为女性员工的集合。题目3:查询所有男员工的姓名、性别。能实现本查询的对应的SQL语句是()。

A. select 姓名,性别='男' from f
B. select 姓名,性别 from m
C. select 姓名,性别 from m where 性别='男'
D. select * from mwhere性别='男'

设有关系M、S、F:M(编号,姓名,性别,单位号),S(单位号,单位名),F(编号,姓名,性别,单位号)。其中,M为男性员工的集合,F为女性员工的集合。题目4:查询单位号为'100'的男员工的姓名、性别。能实现本查询的对应的SQL语句是()。

A. select 姓名,性别 from m,f where 单位号='100'
B. select 姓名,性别 from m where 单位号='100'
C. select 姓名,性别 from m where 单位号='100' and 性别='男'
D. select 姓名,性别 from m where 单位号='100'unionselect 姓名,性别 from f where 单位号='100'
E. select 姓名,性别 from m where 单位号='100'exceptselect 姓名,性别 from f where 单位号='100'

设有关系M、S、F:M(编号,姓名,性别,单位号),S(单位号,单位名),F(编号,姓名,性别,单位号)。其中,M为男性员工的集合,F为女性员工的集合。题目5:查询单位名为‘1号仓库’的所有员工的基本信息(编号,姓名,性别,单位号)。能实现本查询的对应的SQL语句是()。

A. select * from m join s on m.单位号=s.单位号where 单位名='1号仓库'unionselect * from f join s on f.单位号=s.单位号where 单位名='1号仓库'
B. select * from m ,s where m.单位号=s.单位号 and 单位名='1号仓库'unionselect * from f,s where f.单位号=s.单位号 and 单位名='1号仓库'
C. select * from m where 单位号= (select 单位号 from s where 单位名='1号仓库')unionselect * from f where 单位号= (select 单位号 from s where 单位名='1号仓库')
D. select 编号,姓名,性别,t.单位号 from(select * from M union select * from F) as t join S on t.单位号=s.单位号where 单位名='1号仓库'
E. select 编号,姓名,性别,m.单位号 from m join s on m.单位号=s.单位号where 单位名='1号仓库'unionselect 编号,姓名,性别,f.单位号 from f join s on f.单位号=s.单位号where 单位名='1号仓库'
F. select 编号,姓名,性别,m.单位号 from m ,s where m.单位号=s.单位号 and 单位名='1号仓库'unionselect 编号,姓名,性别,f.单位号 from f,s where f.单位号=s.单位号 and 单位名='1号仓库'
G. select * from m where 单位号 in (select 单位号 from s where 单位名='1号仓库')unionselect * from f where 单位号 in (select 单位号 from s where 单位名='1号仓库')

答案查题题库