对于学生信息表:student(sno,shame,sex,age,dept),如果把学生“张明”的姓名改为“张岩”,则正确的语句是
A: UPDATE SET sname=’张明’WHERE sname=’张岩’
B: UPDATE student SET sname=’张明’WHERE sname=’张岩’
C: UPDATE student SET sname=’张岩’
D: UPDATE student SET sname=’张岩’WHERE sname=’张明’
A: UPDATE SET sname=’张明’WHERE sname=’张岩’
B: UPDATE student SET sname=’张明’WHERE sname=’张岩’
C: UPDATE student SET sname=’张岩’
D: UPDATE student SET sname=’张岩’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. 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 ‘张_ _’
- 修改student表中学号为2015001的学生的姓名为“张三”,语句是()。 A: update student set sname=’ 张三’ where sid=’2015001’ B: update student set sname=张三 where sid=’2015001’ C: update student set sname=”张三” where sid=’2015001’ D: alter table student alter sname=’ 张三’ where sid=’2015001’
- 修改student表中学号为2015001的学生的姓名为“张三” A: update student set sname=’ 张三’ where sid=’2015001’ B: alter table student alter sname=’ 张三’ where sid=’2015001 C: update student set sname=”张三” where sid=’2015001’ D: update student set sname=张三 where sid=’2015001’
- 如果有学生表student,ssex代表学生性别,sname代表姓名,则想要得到所有姓张和姓王的女学生信息的SQL语句是() A: SELECT *<br/>FROM student<br/>WHERE ssex='女' OR sname ='张%' AND sname ='王%' B: SELECT *<br/>FROM student<br/>WHERE ssex='女' OR sname like '张%' AND sname like '王%' C: SELECT *<br/>FROM student<br/>WHERE ssex='女' AND (sname like '张%' OR sname like '王%') D: SELECT *<br/>FROM student<br/>WHERE (ssex='女' AND sname like '张%') OR sname like '王%'