Well, there's always the good old:

SELECT MAX(ID) from MyTableName

right after your insert... though there maybe a more efficient way of doing
things, that I'm un-aware of... though, the above has worked for me on many
occasions...

Erik Yowell

-----Original Message-----
From: Matt Eschenbaum [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 7:36 PM
To: CF-Talk
Subject: SQL INSERTS - return ID


Anyone know a trick to return the ID of a record just Inserted into a table?

Sincerely,

Matthew M. Eschenbaum
Allaire Certified Professional
DevTech Inc.
[EMAIL PROTECTED]
206.956.0888
www.dev-tech.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to