What does N’ stands for in a SQL script ? (the one used before characters in insert script)

N is used to specify a unicode string.

Here’s a good discussion: Why do some SQL strings have an ‘N’ prefix?

In your example N prefix is not required because ASCII characters (with value less than 128) map directly to unicode. However, if you wanted to insert a name that was not ASCII then the N prefix would be required.

INSERT [dbo].[TableName] ([Sno], [Name], [EmployeeId], [ProjectId], [Experience]) 
VALUES (1, N'Wāhi', 'ESD157', 'FD080', 7)

Leave a Comment