How can I swap rows between two columns?
SELECT LISTAGG(last_name, ', ') WITHIN GROUP (ORDER BY hire_date) FROM employees -- It will display all the rows in a single column separated by 'Comma'
Update tablename set col1 = col2, col2 = col1 ; it will swap the data.
No Abhijeet my requirement is col1 is 2, col2 is 3 ..now i want o/p col1 is 3 & col2 is 2...this is my requirement
Sign up for STechies
All the site contents are Copyright © www.stechies.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies. The site www.stechies.com is in no way affiliated with SAP AG.
Every effort is made to ensure the content integrity. Information used on this site is at your own risk.
The content on this site may not be reproduced or redistributed without the express written permission of
www.stechies.com or the content authors.