【多选题】在MySQL中,学生表Students中包含学号sid(主键)、姓名sname。现在查询所有有重名的学生姓名,以下语句正确的是()。 A. select sname from students group by sid having count(sid)>1; B. select sname from students group by sname having count(sid)>1; C. select distinct a.sname from students A, students B where A.sname=B.sname; D. select distinct a.sname from students A, students B where A.sname=B.sname and A.sid !=B.sid;
【多选题】在MySQL中,学生表Students中包含学号sid(主键)、姓名sname。现在查询所有有重名的学生姓名,以下语句正确的是()。 A. select sname from students group by sid having count(sid)>1; B. select sname from students group by sname having count(sid)>1; C. select distinct a.sname from students A, students B where A.sname=B.sname; D. select distinct a.sname from students A, students B where A.sname=B.sname and A.sid !=B.sid;
查询姓"张"的学生姓名,下列()语句不能实现。 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='张%'
查询姓"张"的学生姓名,下列()语句不能实现。 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='张%'
SQL中,下列涉及空值的操作,不正确的是( )。 A: Sname IS NULL B: Sname IS NOT NULL C: Sname = NULL D: NOT (Sname IS NULL)
SQL中,下列涉及空值的操作,不正确的是( )。 A: Sname IS NULL B: Sname IS NOT NULL C: Sname = NULL D: NOT (Sname IS NULL)
【单选题】若要“检索名字为张某某的所有同学姓名”,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 ‘张_ _’
【单选题】若要“检索名字为张某某的所有同学姓名”,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 ‘张_ _’
若要求查找‘李’姓学生的学生号和姓名,正确的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 ’%李%’
若要求查找‘李’姓学生的学生号和姓名,正确的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 ’%李%’
查找学生表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_';
查找学生表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: SELECTsno,sname FROM studentInfo WHERE sname LIKE "李%"; B: SELECTsno,sname FROM studentInfo WHERE sname = "李"; C: SELECTsno,sname FROM studentInfoWHERE left(sname,1) = "李";
不能查询到所有姓“李"的学生信息的SQL命令是( ) A: SELECTsno,sname FROM studentInfo WHERE sname LIKE "李%"; B: SELECTsno,sname FROM studentInfo WHERE sname = "李"; C: SELECTsno,sname FROM studentInfoWHERE left(sname,1) = "李";
若要求查找姓名中第一个字为‘刘’的学生号和姓名。下面列出的SQL语句中,( )是正确的。 A: SELECT S#,SNAME,FROM S WHERE SNAME=‘刘%’ B: SELECT S#,SNAME,FROM S WHERE SNAME=‘刘-’ C: SELECT S#,SNAME,FROM S WHERE SNAME LIKE‘刘%’ D: SELECT S#,SNAME,FROM S WHERE SNAME LIKE ‘刘-’
若要求查找姓名中第一个字为‘刘’的学生号和姓名。下面列出的SQL语句中,( )是正确的。 A: SELECT S#,SNAME,FROM S WHERE SNAME=‘刘%’ B: SELECT S#,SNAME,FROM S WHERE SNAME=‘刘-’ C: SELECT S#,SNAME,FROM S WHERE SNAME LIKE‘刘%’ D: SELECT S#,SNAME,FROM S WHERE SNAME LIKE ‘刘-’
在student表中显示所有姓马的学生的姓名、生日和Email。下列语句可以实现的( ) A: select sname,birthdate,email from student where sname like ‘马%’ B: select sname,birthdate,email from student where sname rike ‘马.*’; C: select sname,birthdate,email from student where sname like ‘%马‘ D: select sname,birthdate,email from student where sname =’*马*’
在student表中显示所有姓马的学生的姓名、生日和Email。下列语句可以实现的( ) A: select sname,birthdate,email from student where sname like ‘马%’ B: select sname,birthdate,email from student where sname rike ‘马.*’; C: select sname,birthdate,email from student where sname like ‘%马‘ D: select sname,birthdate,email from student where sname =’*马*’
从学生表(student)中的姓名(sname)字段查找姓“刘”的学生。可以使用如下代码:select * from student where()。 A: sname=‘刘*’ B: sname=‘%刘%’ C: sname like‘刘%’ D: sname like‘刘*’
从学生表(student)中的姓名(sname)字段查找姓“刘”的学生。可以使用如下代码:select * from student where()。 A: sname=‘刘*’ B: sname=‘%刘%’ C: sname like‘刘%’ D: sname like‘刘*’