题目
在数据库中含有雇员信息表 employee 包含字段 salary ( 薪水 ) , sexx ( 性别 ) 等则选项中能够正确查询出薪水低于 5000 元 性别为男 的雇员信息的是 _ A SELECT * FROM employee where not ( salary > = 5000 ) or sex = '男' B SELECT * FROM employee where salary < 5000 and sex = '男'C SELECT * FROM employee where not ( salary > = 5000 ) & & sex = '男' D SELECT * FROM employee where not ( salary > = 5000 ) and sex = '男'
在数据库中含有雇员信息表 employee 包含字段 salary ( 薪水 ) , sexx ( 性别 ) 等则选项中能够正确查询出薪水低于 5000 元 性别为男 的雇员信息的是 _
A SELECT * FROM employee where not ( salary > = 5000 ) or sex = '男'
B SELECT * FROM employee where salary < 5000 and sex = '男'
C SELECT * FROM employee where not ( salary > = 5000 ) & & sex = '男'
D SELECT * FROM employee where not ( salary > = 5000 ) and sex = '男'
题目解答
答案
这个查询语句查询出薪水低于 5000 元并且性别为男的雇员信息。为了满足这个条件,需要使用 and 运算符来结合两个条件。所以该题答案选B SELECT * FROM employee where salary < 5000 and sex = '男'。