returning inserted id

From: "Matt A(dot)" <survivedsushi(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: returning inserted id
Date: 2005-08-21 19:56:27
Message-ID: 20050821195627.8524.qmail@web35209.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

this may have been asked a thousand times but i
haven't found a standard answer...

MSSQL
set nocount on
insert into (column) values (value)
select identityid = @@identity
set nocount off

POSTGRESQL
*cricket cricket* :)

How is this done? By a trigger function? Or is it
natively supported? Could I get an example on how to
do it too?

Thanks,
Matt


____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Schmidt 2005-08-22 00:43:33 Numerical variables in pqsql statements
Previous Message Matt L. 2005-08-21 02:25:57 booleans and nulls