"sarah.kho" <[email protected]> writes: > Hi > Is there an easy way to swap content of two fields (sn and ssn) in a table > with hundreds of rows?
An update statement with "SET SN=SSN, SNN=SN" should do the trick. See the example below. ij> select * from t; X |Y --------- x1 |y1 x2 |y2 x3 |y3 3 rows selected ij> update t set x=y, y=x; 3 rows inserted/updated/deleted ij> select * from t; X |Y --------- y1 |x1 y2 |x2 y3 |x3 3 rows selected Hope this helps, -- Knut Anders
