tabbing

How do I get a column with consecutive, increasing numbers, without having any numbers missing?

自作多情 提交于 2019-11-26 17:54:57
Possible Duplicates: How to show row numbers in PostgreSQL query? Resequencing a column with identifier in Postgresql PostgreSQL Record Reordering using Update with a Sub-Select I am just asking if in PostgreSQL exist such possibility that if I have 5 rows and in one column there are numbers 1, 2, 3, 4, 5 and in those column is not primary key if I delete say tird row that postgreSQL re enumerate this column so I can have 1, 2, 3, 4 instead of 1, 2, 4, 5 ? Adapted this from a previous answer. This kind of stuff happens often when applications want a tabbing-order for variables (read: records

How do I get a column with consecutive, increasing numbers, without having any numbers missing?

泪湿孤枕 提交于 2019-11-26 06:07:49
问题 Possible Duplicates: How to show row numbers in PostgreSQL query? Resequencing a column with identifier in Postgresql PostgreSQL Record Reordering using Update with a Sub-Select I am just asking if in PostgreSQL exist such possibility that if I have 5 rows and in one column there are numbers 1, 2, 3, 4, 5 and in those column is not primary key if I delete say tird row that postgreSQL re enumerate this column so I can have 1, 2, 3, 4 instead of 1, 2, 4, 5 ? 回答1: Adapted this from a previous