am  Wed, dem 23.07.2008, um 19:18:15 +0930 mailte admin folgendes:
> 1. Is a SEQUENCE what I use instead of auto_increment?

Yes.


> 
> 2. Does this work in PostgreSQL:
> 
> INSERT INTO table VALUES ('x','y','z')
> 
> or do I need to do this
> 
> INSERT INTO table (fld_x,fld_y,fld_z) VALUES ('x','y','z')

Both worked, but it is better to list the columns. If you change later
the table-design, the first (without column-list) insert fails.


> 
> ?
> 
> 3. Does this work in PostgreSQL:
> 
> INSERT INTO table VALUES ('','y','z')
> 
> where the empty first item is intended for an auto_increment/SEQUENCE id 
> field?
> If not, what is an alternative?

Use 'default' instead (without the ') or omit this column in the
column-list.


HTH, Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to