El Sáb 20 Sep 2003 03:23, Oliver Elphick escribió:
> On Sat, 2003-09-20 at 06:10, Muhyiddin A.M Hayat wrote:
> > How to Create auto_increment field in PostreSQL.
> > Can I create them using Trigger.
>
> Use the SERIAL datatype.  See also the functions nextval(), currval()
> and setval().

Also to add, the auto increment is done through sequences.

I would suggest seeing the docs on SEQUENCE, and SERIAL data type.

-- 
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-----------------------------------------------------------------
Martín Marqués                  |        [EMAIL PROTECTED]
Programador, Administrador, DBA |       Centro de Telematica
                       Universidad Nacional
                            del Litoral
-----------------------------------------------------------------


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to