Using Sequences
时间:2010-01-23 来源:admin126com
Using Sequences
* Sequences are a PostgreSQL extension to SQL that allows to generate unique number IDs in one atomic operation.
* Example:
test=> CREATE SEQUENCE my_seq \g CREATE test=> SELECT NEXTVAL('my_seq') \g nextval ------- 1 (1 row) test=> SELECT NEXTVAL('my_seq') \g nextval ------- 2 (1 row)
相关阅读 更多 +