【TSQL】空格的比较

空格比较时 空字符串跟任意长度的半角空格字符串比较,结果都为TRUE

DECLARE @TRUSTOR VARCHAR(5)
SET @TRUSTOR = ‘‘

IF @TRUSTOR IS NULL
  BEGIN
    SELECT IS NULL
  END
IF @TRUSTOR = SPACE(5)
  BEGIN
    SELECT ‘‘‘‘‘ = SPACE5
  END

-- 执行结果:‘‘ = SPA

 

【TSQL】空格的比较

上一篇:mysql安装


下一篇:django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3问题解决