Dan,
SELECT @@IDENTITY
right after the insert does it for MS and Sybase SQL Server. But watch out
for threading problems: @@IDENTITY is a system variable that always holds the
value of the last auto-increment regardless of the table.
Klaus
On Wednesday 01 May 2002 03:21, Dan wrote:
> Hi,
>
> I've recently moved from FileMaker Mac to MSSQL PC.
> I have an "Identify" field in my tables (the database automatically
> generates the value for the keys). In Tango for FileMaker I used to receive
> the record nr after the insert in the resultset so I could use it when
> needed to insert it into a related table. How do I do the equivalent in
> SQL? Thanks,
> Dan.
>
> ________________________________________________________________________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
> with unsubscribe witango-talk in the message body
________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
with unsubscribe witango-talk in the message body