A: SELECTsno,sname FROM studentInfo WHERE sname LIKE "李%";
B: SELECTsno,sname FROM studentInfo WHERE sname = "李";
C: SELECTsno,sname FROM studentInfoWHERE left(sname,1) = "李";
举一反三
- 查询姓“李”的学生的所有信息 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 ‘%李%
- 若要求查找‘李’姓学生的学生号和姓名,正确的SQL语句是( )。 A: SELECT S#,SNAME FROM S WHERE SNAME=’李%’ B: SELECT S#,SNAME FROM S WHERE SNAME LIKE ’李%’ C: SELECT S#,SNAME FROM S WHERE SNAME=’%李%’ D: SELECT S#,SNAME FROM S WHERE SNAME LIKE ’%李%’
- 查询学生表中,所有学生的学号(sno),姓名(sname),性别(sex),和生日(birthday),下列select语句正确的是 A: SELECTsno, sname, sex, birthday FROMstudent B: SELECT * FROM student C: SELECTsno, sname, birthday FROM student D: SELECTsno, sname, sex FROMstudent
- 假定有学生关系S,结构为S(SID, SNAME, AGE),其中SID为学号,SNAME为姓名,AGE为年龄。查询所有比“李军”年龄大的学生的姓名、年龄,正确的SQL语句是( )。 A: SELECT SNAME, AGE FROM S WHERE AGE > ( SELECT AGE FROM S WHERE SNAME = '李军' ) B: SELECT SNAME, AGE FROM S WHERE AGE >( SNAME= '李军' ) C: SELECT SNAME, AGE FROM S WHERE AGE > ( SELECT AGE WHERE SNAME='李军' ) D: SELECT SNAME, AGE FROM S WHERE AGE>李军.AGE
- 查询姓"张"的学生姓名,下列()语句不能实现。 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='张%'
内容
- 0
对于学生信息表: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'刘&'
- 1
基于“学生-选课-课程”数据库中如下三个关系: S(S#,SNAME,SEX,AGE),SC(S#,C#,GRADE),C(C#,CNAME,TEACHER) 若要求查找姓名中第一个字为“李”的学生号和姓名。下面列出的SQL语句中,哪个(些)是正确的 Ⅰ.SELECT S#,SNAME FROM S WHERE SNAME=’李%’ Ⅱ.SELECT S#,SNAME FROM S WHERE SNAME LIKE’李%’ Ⅲ.SELECT S#,SNAME FROM S WHERE SNAME LIKE’李_’ A: Ⅰ B: Ⅱ C: Ⅲ D: 全部
- 2
【单选题】若要“检索名字为张某某的所有同学姓名”,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 ‘张_ _’
- 3
从Student表检索姓周的学生,对应的SQL语句是( )。 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 '周_'
- 4
查找学生表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_';