Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-es-ayuda by date

Next:From: Juan MartínezDate: 2007-10-25 15:48:00
Subject: Re: Serial / Secuencia
Previous:From: MIGUEL CANCHASDate: 2007-10-25 15:41:37
Subject: RE: Serial / Secuencia

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group