declare @a nvarchar(20) begin set @a='123' if @a is not null--if @a=ISNULL(@a,'') print 'Len(@a)' end