Thank you very much! Thanks to all who answered! An I will never again ask
silly questions here :-)
"Stefan Lindner" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
9qf06v$20bh$[EMAIL PROTECTED]">news:9qf06v$20bh$[EMAIL PROTECTED]...
> Is there any way to get system maintained keys from postgres? e.g.
Check out the SERIAL type. It does precisely what you
want. An idea as to how this is used would be like
this:
CREATE TABLE foo (
prim_key SERIAL PRIMARY KEY,
bar text
);
I tend to create sequences by hand like this:
CREATE SEQUENCE my_sequence_seq;
And then I create my tabl
On Mon, 15 Oct 2001, Stefan Lindner wrote:
> Is there any way to get system maintained keys from postgres? e.g. to
> have a table with a primary key column (varchar or int) and let postgres
> chose the next unique value for this column?
\h CREATE SEQUENCE will give syntax, or look up SEQUENCES
Stefan,
> Is there any way to get system maintained keys from postgres? e.g. to
> have a table with a primary key column (varchar or int) and let
> postgres
> chose the next unique value for this column?
Please address future questions of this type to the PGSQL-NOVICE list.
PGSQL-SQL is for more
Is there any way to get system maintained keys from postgres? e.g. to
have a table with a primary key column (varchar or int) and let postgres
chose the next unique value for this column?
---(end of broadcast)---
TIP 6: Have you searched our list