I have a table with identity column (Id). I.e. MyTable(Id int, MyNum int, MyText varchar(50), CreatedBy int)
I insert into it like this MyTable(MyNum, MyText)values(3,'Mm')
Then I want to get the identity of the newest column. I do it like this:
The newest number in the identity column is 20993, but I get returned 1005.
I do not understand why this is. Can somebody please help.