|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
auto_increment
I'm looking for the query for auto_increment in postgreSQL. Please help me if you know.
Thanks a lot! |
|
#2
|
|||
|
|||
|
keyword -> 'sequences'
|
|
#3
|
|||
|
|||
|
In other words, zalew means go to this page and enter 'sequences' in the search bar at the top. The first two entries should be about sequence-manipulation and the CREATE SEQUENCE command.
Also, though, when creating a table, if you use the datatype SERIAL for a column, that is a shortcut which creates a named sequence for that column of that table, and creates a default value of "nextval('sequence_name'" for that column. If you want your auto_incremented column to be a long integer (if you need more than 2 billion rows), use SERIAL8.
__________________
The real n-tier system: FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL Amazon wishlist -- rycamor (at) gmail.com |
![]() |
| Viewing: Dev Shed Forums > Databases > PostgreSQL Help > auto_increment |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|