It is except if someone puts another row in the table at the time SQL gets the @@identity...
Try locking the query to stop this, or if you like you can use SQL to lock while retrieving this. -----Original Message----- From: Keen [mailto:[EMAIL PROTECTED]] Sent: Sunday, 17 February 2002 1:36 PM To: CF-Talk Subject: RE: How do you get the ID number of newest record added to a table? I saw a demonstration where the code below returned the wrong max(id). My understanding is that "SELECT @@IDENTITY AS NewID" is really the only way to insure you get the correct ID ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

