I am using SQL Server 2016 and came across an issue with the isnull function. The value in that field is a space but keeps getting selected, below is my code:
SELECT * FROM table
WHERE isnull (field1,'')<>''
AND field1<>' '
If I copy and paste from field1, it is one space ' '.
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…