在学生关系student(sid,sname……)中,student的属性分别表示学号和姓名,若要查询学号为19170201的学生姓名,下列SQL语句正确的是( )。Ⅰ.SELECT sname FROM student WHERE sid LIKE '19170201'Ⅱ.SELECT sname FROM student WHERE sid LIKE= '19170201'Ⅲ.SELECT sname FROM student WHERE sid='19170201'
A: Ⅰ、Ⅱ
B: Ⅰ、Ⅲ
C: Ⅱ、Ⅲ
D: Ⅰ、Ⅱ、Ⅲ
A: Ⅰ、Ⅱ
B: Ⅰ、Ⅲ
C: Ⅱ、Ⅲ
D: Ⅰ、Ⅱ、Ⅲ
举一反三
- 查询学生的学号,姓名,选修课程号和课程成绩 A: select sid,sname,cid,grade from student,sc where student.sid=sc.sid B: select * from student,sc where student.sid=sc.sid C: select sid,sname,cid,cname from student,course D: select sid,sname,cid,cname from student,sc
- 查找学生表student中姓名的第二个字为“t”的学生学号sno和姓名sname,下面SQL语句正确的是()。 A: SELECT sno, sname FROM student WHERE sname='_t%'; B: SELECT sno, sname FROM student WHERE sname LIKE '_t%'; C: SELECT sno, sname FROM student WHERE sname='%t_'; D: SELECT sno, sname FROM student WHERE sname LIKE '%t_';
- 【单选题】若要“检索名字为张某某的所有同学姓名”,SQL语句正确的是()。 A. SELECT Sname FROM Student WHERE Sname Like ‘张____’ B. SELECT Sname FROM Student WHERE Sname Like ‘张%’ C. SELECT Sname FROM Student WHERE Sname Like ‘张_’ D. SELECT Sname FROM Student WHERE Sname Not Like ‘张_ _’
- 查询姓"张"的学生姓名,下列()语句不能实现。 A: SELECT sname FROM student WHERE left(sname,1)= '张' B: SELECT snameFROM student WHERE sname LIKE '张%' C: SELECT sname FROM student WHERE substring(sname,1,1)= '张' D: SELECT sname FROM student WHERE sname='张%'
- 在student(sno,sname,ssex,sage,sdept)表中,查询学生姓名中包含“大”或“小”的学生信息。以下查询语句正确的是( )。 A: select * from student where sname in( '_[大小]%') B: select * from student where sname ='%大%' or sname='%小%' C: select * from student where sname like'%大%' or sname like'%小%' D: select * from student where sname like '%[大小]%'