I generated an sql script like this,
INSERT [dbo].[TableName] ([Sno], [Name], [EmployeeId], [ProjectId], [Experience])
VALUES (1, N'Dave', N'ESD157', N'FD080', 7)
I wonder whats that N’ exactly mean and whats its purpose here.
NOTE: By searching for the answer all i can get is that N’ is a prefix for National language standard and its for using unicode data. But honestly i am not able to get a clear idea about the exact operation of N’ here. I’d appreciate your help and please make it in more of an understandable way. Thanks in advance.
Nis used to specify a unicode string.Here’s a good discussion: Why do some SQL strings have an ‘N’ prefix?
In your example
Nprefix 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 theNprefix would be required.