Sometimes, we can see statements similar to the following in SQL statements:
Select O. ID, U. name owner, O. name, O. type from XXX. DBO. sysobjects o left join XXX. DBO. sysusers U on O. uid = u. UID where (O. type = n 'U' or O. type = n's 'or O. type = n 'V') order by O. name
Select O. ID, U. name owner, O. name, O. type from XXX. DBO. sysobjects o left join XXX. DBO. sysusers U on O. uid = u. UID where (O. type = 'U' or O. type = 's' or O. type = 'V') order by O. name
The running results of the preceding two statements may be identical. Note that N is before the character in the first statement. What does n mean?
The role of N is to ensure that the subsequent characters are considered Unicode-encoded.
"The N stands for national-the N converts the varchar to a nvarchar, which is used to store Unicode data, which is used to store multilingual data in your database tables. even simple translation:
N represents the national character. It can convert a character of the varchar type to a character of the nvarchar type and is used to store Unicode data. It is used to store multilingual data in database tables.