• 2022-06-07
    更新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;
  • B

    举一反三

    内容

    • 0

      下面选项中,用于将表student中字段grade值更新为80的SQL语句是( ) A: ALTER TABLE student set grade=80; B: UPDATE student set grade=80 where grade=80; C: UPDATE student set grade=80 where grade<=80; D: UPDATE student set grade=80;

    • 1

      下列选项中,用于将student 表中“grade " 字段的值修改为“80”的SQL 语句是( )。 A: ALTER TABLE student set grade=80; B: ALTER student set grade=80; C: UPDATE student set grade=80 where grade<;80; D: UPDATE student set grade=80;

    • 2

      修改表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='张三'

    • 3

      下列选项中,采用指定表的字段名的方式向表Student中添加id为1,name为”小王”的记录值的SQL语句是"( ) A: INSERT INTO Student(“id”,”name”) VALUES(1,”小王”); B: INSERT INTO Student(id,name) VALUES(1,’小王’); C: INSERT INTO Student VALUES(1,”小王”); D: INSERT INTO Student(id,”name”) VALUES(1,”小王”);

    • 4

      删除student表中id为1的记录() A: TRUNCATE FROM student where id=1; B: DELETE student where id=1; C: DELETE FROM student where id=1; D: DELETE INTO student where id=1;