Have a need to compare an nvarchar variable to an int value in a table.
I thought I would have to cast nvarchar to int, but the direct compare seems to work. Is this some sort of default conversion going on under the covers?
For example
DECLARE @itest AS INT
SET @itest = 4
DECLARE @vtest AS NVARCHAR(30)
SET @vtest = '4'
IF(@itest = @vtest)
BEGIN
PRINT 'it works'
END