Friday, August 28, 2009

This method is to get scope identity from a table where both columns are auto increment

Create Table Testing (  
id
int identity,
somedate datetime
default getdate()
)
insert
into Testing
output inserted
.*
default values

or

INSERT INTO Testing SELECT NULL
select max(id) from Testing



No comments: