修改表Student中姓名Name为“张三”的学生的专业Major改为“计算机”
A: ALTER TABLE Student SET Name='张三' WHERE Major='计算机'
B: UPDATE Student SET Name='张三' WHERE Major='计算机'
C: UPDATE Student SET Major='计算机' WHERE Name='张三'
D: ALTER TABLE Student SET Major='计算机' WHERE Name='张三'
A: ALTER TABLE Student SET Name='张三' WHERE Major='计算机'
B: UPDATE Student SET Name='张三' WHERE Major='计算机'
C: UPDATE Student SET Major='计算机' WHERE Name='张三'
D: ALTER TABLE Student SET Major='计算机' WHERE Name='张三'
举一反三
- 已知学生基本信息student包括(xuehao学号,姓名name,性别sex,…),将学号为'201011001'学生的姓名改为'张三',同时性别改为'女',正确的SQL语句为:( )。 A: update student set name='张三',sex='女' where xuehao='201011001' B: update student set name='张三'or sex='女' where xuehao='201011001' C: update student set name='张三' sex='女' where xuehao='201011001' D: update student set name='张三' and sex='女' where xuehao='201011001'
- 修改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表中学号为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中,有一条id=1的记录,现要求将其name修改为“huahua",grade修改为98.5.下列选项中,正确的SQL语句是( )。 A: UPDATE `student` SET `name`='huahua' `grade`=98.5 WHERE `id`=1 B: UPDATE `student` SET `name`='huahua', `grade`=98.5 WHERE `id`=1 C: UPDATE FOR `student` SET `name`='huahua', `grade`=98.5 WHERE `id`=1 D: UPDATE `student` `name`='huahua' `grade`=98.5 WHERE `id`=1
- 更新student表id=1的记录,name值更新为”youjun”,grade值更新为98.5,下列选项中,能够完成上述功能的SQL语句是 A: UPDATE student set name=’youjun’ grade=98.5 where id=1; B: UPDATE student set name=’youjun’, grade=98.5 where id=1; C: UPDATE FROM student set name=’youjun’ ,grade=98.5 where id=1; D: UPDATE student Values name=’youjun’ grade=98.5 where id=1;