下列用于更新的SQL语句中,正确的是()
A: update
user set id = u001 ;
B: update
user(id,username) values('u001','jack');
C: update
user set id='u001',username='jack';
D: update
into user set id = 'u001', username='jack';
A: update
user set id = u001 ;
B: update
user(id,username) values('u001','jack');
C: update
user set id='u001',username='jack';
D: update
into user set id = 'u001', username='jack';
举一反三
- 下面选项中,能够更新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';
- 【多选题】已知user表中存在一个字段id。 下面选项中,能够查询出id编号为u001和u002的用户的SQL语句是 A. select * from user where id = 'u001' and id = 'u002'; B. select * from user where id = 'u001' or id = 'u002'; C. select * from user where
- 下面选项中,用于将表user中字段age值更新为55的SQL语句是 A: ALTER TABLE user set age=55; B: UPDATE user set age=55 where age=55; C: UPDATE user set age=55; D: UPDATE user set age=55 where age<=55;
- 【多选题】下列SQL语句在实际运行时,可能转换的SQL语句为() update user <set> <if test="uname!=null">uname=#{uname}, </if> <if test="usex!=null">usex=#{usex}</if> </set> where uid=#{uid} A. update user set uname=#{uname} where uid=#{uid} B. update user set uname=#{uname}, usex=#{usex} where uid=#{uid} C. update user usex=#{usex} where uid=#{uid} D. update user set uname=#{uname}, usex=#{usex}
- 下面通过UPDATE语句将root用户的密码修改为mypwd2的语句中,正确的是 A: UPDATE mysql.user SET Password=PASSWORD('mypwd2') WHERE User='root' and Host='localhost'; B: UPDATE mysql.users SET Password=PASSWORD('mypwd2') WHERE User='root' and Host='localhost'; C: UPDATE mysql.users SET Password=PASSWORD('mypwd2') WHERE User='root' OR Host='localhost'; D: UPDATE mysql.user SET Password=PASSWORD('mypwd2') WHILE User='root' OR Host='localhost';