declare @ID int
if(select last_value from sys.identity_columns where [object_id]=object_id('YourTableName')) is null
begin
set @ID=0;
select @ID;
end
else
begin
select last_value from sys.identity_columns where [object_id]=object_id('YourTableName')
en
No comments:
Post a Comment