I have a table with a column city. The values are “delhi” and “hyderabad”. I need to update Hyderabad with delhi and delhi with Hyderabad. Define a query for that
RE: I have a table with a column city. The values are...
you need three update statements for acheiving this task1. update set 'delhi' where 'temp' ;commit;2. update set 'delhi' where 'hyderabad' ;commit;3. update set 'hyderabad' where 'temp' ;commit;Please note that the commit is only a precaution it can be used only once after all the three DML statements are run.Thank you Ajay NerumatiOracle DBA
RE: I have a table with a column city. The values are “delhi” and “hyderabad”. I need to update Hyderabad with delhi and delhi with Hyderabad. Define a query for that
Update States set city decode(city `Delhi` `Hyderabad` `Hyderabad` `Delhi` city);
By using this query we can inter change the citys.