[SQL] returning inserted id

2005-08-26 Thread Matt A.
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? Coul

[SQL] question

2005-08-26 Thread Matt A.
I have a rating section on a website. It has radio buttons with values 1-5 according to the rating level. Lastly there is a null option for n/a. We use null for n/a so it's excluded from the AVG() calculations. We used nullif('$value','') on inserts in mssql. We moved to postgres and love it but