Saturday, August 18, 2012

Swap YES,NO values in a table column with single update statement.....


update a set status=(case when status='YES' then 'NO'
  when status='NO' then 'YES'
end)

No comments:

Post a Comment