代码改变世界

更新一个表的两个以上字段的方法

2009-12-16 14:37  追忆似水流年  阅读(267)  评论(0编辑  收藏  举报

1。update tablename set column1='value',column2='value' where condition

2。update tablename set(column1,column2)=(select column1,column2 from tablename where condition) where condition

另外一个参考为:http://www.javaeye.com/topic/192926