数据库中有一张表名称为Student,有列Name,Age,IDCard,Sex。要求查询所有男同学信息,下列哪个SQL语句是正确的?()
A: Select*FromStudentWhereSex=’男’
B: Select*FromStudentWhereSex<>’女’
C: Select*FromStudentWhereSexLike’男’
D: Select*FromStudentWhereSexIn’男’
A: Select*FromStudentWhereSex=’男’
B: Select*FromStudentWhereSex<>’女’
C: Select*FromStudentWhereSexLike’男’
D: Select*FromStudentWhereSexIn’男’
举一反三
- 数据库中有一张表名称为Student,有列Name,Age,IDCard,Sex。要求查询所有男同学信息,下列哪个SQL语句是正确的?() A: Select*FromStudentWhereSex=’男’ B: Select*FromStudentWhereSex<>’女’ C: Select*FromStudentWhereSexLike’男’ D: Select*FromStudentWhereSexIn’男&rsquo
- 数据库中有一张表名称为Student,有列Number,Name,Age,IDCard,Sex。主键为Number。要求查询所有男同学信息,下列哪个SQL语句是正确的?() A: Select*FromStudentWhereSex=’男’ B: Select*FromStudentWhereNumberNotIn(SelectNumberFromStudentWhereSex<>=’男’) C: Select*FromStudentWhereNumberIn(SelectNumberFromStudentWhereSex=’男’) D: Select*FromStudentWhereSex<>’男’
- 数据库中有一张表名称为Student,有列Name,Age,IDCard,Sex。要求查询所有男同学信息,下列哪个SQL语句是正确的 A: Select * From Student Where Sex '男' B: Select * From Student Where Sex ='女' C: Select * From Student Where Sex In '男' D: Select * From Student Where Sex ='男'
- 数据库中有一张表名称为Student,有列Number,Name,Age,IDCard,Sex。主键为Number。要求查询所有男同学信息,下列哪个SQL语句是正确的?() A: Select* From Student Where Sex=’男’ B: Select* From Student Where Number NotIn(Select Number From Student Where Sex<>=’男’) C: Select* From Student Where NumberIn(Select Numbe rFrom Student Where Sex=’男’) D: Select* From Student Where Sex<>’男&rsquo
- 数据库中有一张表名称为Student,有列Number,Name,Age,IDCard,Sex。主键为Number。要求查询所有男同学信息,下列哪个SQL语句是正确的?() A: ASelect* From Student Where Sex=’男’ B: BSelect* From Student Where Number NotIn(Select Number From Student Where Sex<>=’男’) C: CSelect* From Student Where NumberIn(Select Numbe rFrom Student Where Sex=’男’) D: DSelect* From Student Where Sex<>’男’