如果将表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
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
举一反三
- 现有两个表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’
- 下面用于查询student表中id值在1,2,3范围内的记录的SQL语句是( )。 A: SELECT * FROM student WHERE id=1,2,3; B: SELECT * FROM student WHERE (id=1,id=2,id=3); C: SELECT * FROM student WHERE id in (1,2,3); D: SELECT * FROM student WHERE id in 1,2,3;
- 删除student表中id为1的记录,下列语句正确的是 A: DELETE student WHERE id=1; B: DELETE FROM student WHERE id=1; C: DELETE FROM student WHERE id:=1; D: DELETE student WHERE id:=1;
- 下面选项中,查询student表中id值不在2和5之间的SQL语句是( )。 A: SELECT * FROM `student` WHERE `id`!=2,3,4,5 B: SELECT * FROM `student` WHERE `id` NOT BETWEEN 5 AND 2 C: SELECT * FROM `student` WHERE `id` NOT BETWEEN 2 AND 5 D: SELECT * FROM `student` WHERE `id` NOT IN 2,3,4,5
- 删除表teacher(id,name,gender,birthday,score)中id为4的老师( ) A: delete from teacher; B: delete from teacher where id = 4; C: delete teacher where id = 4; D: drop from teacher where id = 4;