This is a follow up to my previous question, in t-sql
SELECT SCOPE_IDENTITY()
returns a BIGINT, I did the following to get it to return an INT:
DECLARE @X INT
INSERT ...
SELECT @X = SCOPE_IDENTITY()
-- if i don't include the line below, it will return a BIGINT
SELECT @X
Why does it return a BIGINT unless I do SELECT @X at the end?
p.s. turns out
SELECT @X = SCOPE_IDENTITY()
doesn't return anything, it just sets @x