Than you Knut, It worked charming. Thanks.
Knut Anders Hatlen wrote: > > "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 > > -- View this message in context: http://www.nabble.com/how-I-can-swap-content-of-two-fields-in-one-table--tp24875562p24927220.html Sent from the Apache Derby Users mailing list archive at Nabble.com.
