I am used to using mysql and in mysql I can use:
mysql_insert_id()
to get the id of the last inserted row. I am now working with mssql (don't ask me why - not my decision) and need to be able to do this same thing.
I know I could query the table sorting desc on the id and the top one would be the right one - but that's not quite feasible because this table could have ten's of thousands of entries and that operation would really slow it down.
Has anyone done this before????
Thanks for your help.
Derek