how to re-arrange the column names in PostgreSQL table with records
entityid formattedfilename
-------- -----------------
1 file1
2 file2
Re-arrange below format with record
formattedfilename entityid
----------------- --------
file1 1
file2 2