在写sql语句的时候,注意些小细节,不小心就搞混了


  
  1. DECLARE @str VARCHAR(20)  
  2. SET @str=LEFT ('a',0)  
  3. PRINT @str  
  4. IF @str = '' PRINT '空' 
  5.  
  6. set @str = left(null,0)  
  7. if @str is null print 'null'