So I have a table with an identity column as the primary key, so it is an integer. So, why does SCOPE_IDENTITY() always return a decimal value instead of an int
SCOPE_IDENTITY()
Scope identity return value is decimal(38,0)
CAST it, use the OUTPUT clause, or assign to an output parameter rather than SELECT SCOPE_IDENTITY() to the client
SELECT SCOPE_IDENTITY()