For some short and simple queries I’ve been using the query designer in SSMS and it has the following funny behavior: When I add a filter such as LIKE '%text here%', SSMS adds the letter N before the start of the string.
It doesn’t seem to affect the query at all and it will run fine without it in there. Anyone know why SSMS generates queries this way?
The
N'<your text here>'means that the string should be treated as unicode text. It does this to be safe, in case unicode characters are needed.It’s a short way of telling T-SQL to treat the value as
nvarcharinstead ofvarchardata.