select 与 update 如何连用
我想更新表中某行中的某几列,更新完后,要得到这行的所有列,如何用一个sql 语句实现。谢谢
create table role
(
id int not null auto_increment,
roleid int,
silver int,
gold int,
primary key (id)
)
update role set gold=gold+100 where roleid=1;
select * from role where roleid=1;
以上2个语句合并