At 16:40 9/5/00 +0100, you wrote:
>Is there a way to get the last value of an autoincrementing field,
>immediately after an insert statement, without another select over the
>table? I know this is now possible in ADO, is there a way in Cold Fusion?

I think you could do it with a trigger, if your database supports it.
Something like this (syntax is not correct):

begin trigger on TABLE for INSERT:
  select ID_column from inserted as your_last_inserted_id;
end trigger

-Ryan

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to