Oops...I'm MySQL...you appear to be MSSQL. We might not connect...

Mike

-------- Original Message --------
Subject: Re: [NF] SQL Server 2008 question
From: Mike Copeland <[email protected]>
To: [email protected]
Date: 10/17/2012 2:55 PM
Might not be the best way, but here's how I do it...

        select LAST_INSERT_ID() as lastnumber

Mike

-------- Original Message --------
Subject: [NF] SQL Server 2008 question
From: MB Software Solutions, LLC <[email protected]>
To: [email protected]
Date: 10/17/2012 2:51 PM
I insert a row into a table whose PK is a GUID that's automatically generated. How do I get that GUID value afterwards? I thought it would be SELECT @@IDENTITY but that just returns NULL and I can see on a SELECT * FROM MyTABLE that it's not a null value.

tia,
--Mike




[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to