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.reorder
i mean to change the table itself. I just want to execute for exampleSELECT * FROM table
and don't append anORDER BY
^^;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...