Rik,
Clearly, if you do
SELECT colA, colB FROM MyTable
vs
SELECT colB, colA FROM MyTable
you'll get the results in a different sequence. Obviously, using this approach has not manipulated the underlying table (your interpretation of what the OP is asking for), but perhaps the OP's question is that they're wondering if the *reporting* tool (i.e., pgAdmin) could hopefully allow you to rearrange the sequence in which a table's columns are displayed so that when you do a
SELECT * FROM MyTable
pgAdmin will take care of manipulating the results of the query to *display* the columns in a specified sequence.
Yes, the OP currently has the ability to craft a custom query, e.g.,
SELECT colA, colB, colZ, colT, colC, colQ, colD, colE...
to get the exact order they want, but it would actually be nice if the reporting tool took care of this for you so you could just specify "SELECT *" and get the columns in the way you want to see them, or, should they be using "View/Edit Rows" pgAdmin would again show the rows in the prefered order.
Sachin,
Umm, I hate to be the one to break it to you, but postgreSQL doesn't support rearranging columns in a table, short of dropping them and re-adding them in the desired order. Since postgreSQL itself doesn't support that, I would be truly amazed to learn that pgAdmin4 managed to accomplish that trick.
If I'm wrong, someone *please* let me know.
rik.
Hi Team,
How can we rearrange the column of PostgreSQL using PGADMIN?
--
Best Regards,
Sachin Kumar