Postgresql: Row Number Changes On Update
I am new to Postgresql and I am using version 9.3. I have a table in which i have a couple of rows. My question is, when I update a row, the row number is changed and it is moved t
Solution 1:
the row number is changed
There is no such thing as a "row number" in a relational table.
I think when a row is updated, it should not be moved from its place
As a row doesn't have a "place", there is no such thing as "moving" it out of that either.
Rows in a relational table are not sorted.
Think of them like balls in a basket.
Without an ORDER BY
the DBMS is free to return the rows in any order it thinks is OK.
If you need to have the rows ordered in a certain way the only (really: the only) way to get that is to use an ORDER BY
statement.
Post a Comment for "Postgresql: Row Number Changes On Update"