T-SQL: COALESCE returns int for integer operations


DECLARE @can_import BIT

PRINT CAST (SQL_VARIANT_PROPERTY(COALESCE(@can_import, 0), 'BaseType') AS VARCHAR(20))

Result:
int

Comments

Popular posts from this blog

CREATE DATABASE (SMO)

Enable JSON serialization in your Visual Studio 2010 project

jQuery | remove inline style