postgresql update returning

Perform the same operation and return the updated entries:

UPDATE weather SET temp_lo = temp_lo+1, temp_hi = temp_lo+15, prcp = DEFAULT
  WHERE city = 'San Francisco' AND date = '2003-07-03'
  RETURNING temp_lo, temp_hi, prcp;

update returning的是更新后的内容
posted @ 2017-09-07 15:40  cdongyang  阅读(1217)  评论(0编辑  收藏  举报