php-db | 2001041
Date: 04/14/01
- Next message: Ramiro Radjiman: "[PHP-DB] user info???"
- Previous message: Graeme Merrall: "RE: [PHP-DB] Postgres auto increment."
- In reply to: John Starkey: "[PHP-DB] Postgres auto increment."
- Next in thread: Yasuo Ohgaki: "Re: [PHP-DB] Postgres auto increment."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Just off the top of my head...so please forgive any typos or blatant
mistakes...
CREATE SEQUENCE sequencename;
CREATE TABLE mytable (
id int DEFAULT NEXTVAL('sequencename'),
whatever varchar(32),
PRIMARY KEY(id)
);
Doug
At 11:28 PM 4/13/01 -0600, John Starkey wrote:
>I've been using mysql too much lately.
>
>Can anyone tell me how to set up an auto increment in postgres? I need
>to select a row based on a user's menu selection. Requiring them to type
>in a text entry and get it right would obviously be pretty inefficient.
>
>Thanks,
>
>John
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Ramiro Radjiman: "[PHP-DB] user info???"
- Previous message: Graeme Merrall: "RE: [PHP-DB] Postgres auto increment."
- In reply to: John Starkey: "[PHP-DB] Postgres auto increment."
- Next in thread: Yasuo Ohgaki: "Re: [PHP-DB] Postgres auto increment."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

