数据库中有一张表名称为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 ='男'
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<>’男’
- 下面 语句和”select * from student where sex=’男’ && age=20;”语句查询出的结果是一样的。( ) A: select * from student where sex=’男’ or age=20; B: select * from student where sex=’男’ || age=20; C: select * from student where sex=’男’ and age=20; D: select * from student where sex,age in(’男’,20);
- 数据库中有一张表名称为Student,有列Name,Age,IDCard,Sex。要求写SQL语句查询出表中年龄介于20和30岁之间的数据,下列哪个SQL语句是正确的?() A: Select* From Student Where Age>=20 ANDAge>=30 B: Select* From Student Where Age>=20 ANDAge<=30 C: Select* From Student Where Age BET WENN 20AND30 D: Select* From Student Where Age>=20&&Age>=30"
- 对于学生信息表:student(sno,sname,sex,age,dept),要查询所有刘姓学生的信息,正确的语句是 A: SELECT * FROM student WHERE sname LIKE'刘 * ' B: SELECT * FROM student WHERE sname LIKE'刘 $' C: SELECT * FROM student WHERE sname LIKE'刘%' D: SELECT * FROM student WHERE sname LIKE'刘&'