If you don't mind supplying the DB with a key, that would work. This convo has prompetd me to realise that I'm still using a transaction with select max() in Oracle via the default transaction behaviour (i.e not serializable) and there is a small chance, as Jochem said, that this could give an erroneous result.
It seems that in Oracle the best thing to do, when getting a value from a trigger that selects from a sequence, would be to use something like this: declare i number; begin insert into sometable (something) values (9) returning someid into i; Any other ideas for Oracle? -----Original Message----- From: Calvin Ward [mailto:[EMAIL PROTECTED] Sent: Monday, 6 June 2005 5:03 To: CF-Talk Subject: RE: Get New Record ID in mySQL How about using a UUID for the primary key and then you wouldn't have to do the select? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208651 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54