sql server - Why does select SCOPE_IDENTITY() return a decimal instead of an integer? - Stack Overfl
Can't you just cast it before returning it from your query or stored proc (SPs alway return int anyway, but maybe you are using an output parameter)? Like SELECT CAST(SCOPE_IDENTITY() AS INT) AS LAST_IDENTITY And why it does this? Probably to be more ......