现有两个表A.B.有相同列id.若要使新表A中id和表B中id相同的记录且修改A表中的列name为Gauss。以下语句可以实现的是?()
A: update A join B where A.id=B.id set A. name =’Gauss’
B: update A join B on A.id=B.id set A.name =’Gauss’
C: update A join B set A. name =’Gauss’
D: update A join B set A. name =’Gauss’
A: update A join B where A.id=B.id set A. name =’Gauss’
B: update A join B on A.id=B.id set A.name =’Gauss’
C: update A join B set A. name =’Gauss’
D: update A join B set A. name =’Gauss’
举一反三
- 如果将表A的id列和表B的id列进行连接查询,下列语句正确的是 A: from A,B on A.id=B.id B: from A join B on A.id=B.id C: from A join B where A.id=B.id D: from A.id join on B.id
- 假设表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;
- 下面选项中,能够更新user表中数据的SQL语句是() A: update into user set id = 'u001'; B: update user set id = 'u001' and username='jack'; C: update user set username='jack' where id = 1; D: update into user set id = 'u001', username='jack';
- 要修改book(id,name,price)表中所有书名中以“计算机”开头的书籍的价格上幅5元,可用( )语句。 A: UPDATE book SET price =price+5 WHERE name = ‘计算机*’ B: UPDATE book SET price =price+5 WHERE name LIKE ‘计算机*’ C: UPDATE book SET price =price+5 WHERE name LIKE = ‘计算机%’ D: UPDATE book SET price =price+5 WHERE name LIKE ‘计算机%’