I have this table in Postgres:
id | name | city
----+-------+-----------
2 | Anna | Paris
3 | James |
1 | Bob | Berlin
And I want to reorder the table itself, not the output of an SELECT statement, to this:
id | name | city
----+-------+-----------
1 | Bob | Berlin
2 | Anna | Paris
3 | James |
It is difficult to google this, because I only get shown the order by command for the select statement^^
reorder? By the way , the data stored in the tables aren't sorted. – Ergest Basha Mar 12 '24 at 10:52reorderi mean to change the table itself. I just want to execute for exampleSELECT * FROM tableand don't append anORDER BY^^ – Bog Mar 12 '24 at 11:04;SELECT * FROM students;100 times and I always get the same order. Looks like the default order is the last modified date. I don't know, maybe I am just confused... – Bog Mar 12 '24 at 12:33