Re: Serial / Secuencia

From: Miguel Rodríguez Penabad <penabad(at)gmail(dot)com>
To: Guillermo Muñoz <guillermo(dot)munoz(at)grupotekne(dot)com(dot)ar>
Cc: Juan Martínez <jeugenio(at)umcervantes(dot)cl>, "MIGUEL CANCHAS" <mcanchas(at)tsr(dot)com(dot)pe>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Serial / Secuencia
Date: 2007-10-25 15:44:08
Message-ID: 95335e4e0710250844k5140e11ndaccc1190f908f2e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

¿Has considerado usar insert...returning..?

create table t(a serial, b int);

=>insert into t(b) values(1) returning a;
a
---
1
(1 row)

INSERT 0 1
=>insert into t(b) values(1) returning a;
a
---
2
(1 row)

INSERT 0 1

Saludos
--
Miguel Rodríguez Penabad

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Juan Martínez 2007-10-25 15:48:00 Re: Serial / Secuencia
Previous Message MIGUEL CANCHAS 2007-10-25 15:41:37 RE: Serial / Secuencia