Vipin Samtani wrote:
>
> How can I auto-increment numeric primary keys? So on a table called
> "Test1" with fields "ID" and "Name" when I do an INSERT, I only type
>
> INSERT INTO Test1 values ('Bob');
>
> instead of
>
> INSERT INTO Test1 values (1, 'Bob');
>
> Is this implemented in PostgreSQL 7?
>
> -Vipin
CREATE TABLE Test1 (
id SERIAL,
name TEXT
);
INSERT INTO Test1(name) VALUES ('Bob');
SELECT * FROM Test1;
id|name
--+----
1|Bob
(1 row)
Hope that helps,
Mike Mascari