May 19, 2010 at 6:56 am
Hello everyone
I have seen this many times, in many lines of code, but have always been uncertain what it actually means. I cannot find this in the SQL BOL, other than in the sample code. I have yet to find a true definition.
I am referring to the - N' - before an object name
SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[ElapseTime]'
Thanks
Andrew SQLDBA
May 19, 2010 at 7:06 am
http://databases.aspfaq.com/general/why-do-some-sql-strings-have-an-n-prefix.html
this says that it denotes the following string is Unicode
May 19, 2010 at 7:12 am
It means Unicode. All Unicode strings should be prefixed with N.
http://support.microsoft.com/kb/239530
-Vikas Bindra
May 19, 2010 at 7:30 am
Thanks Everyone
Good explanation on this
Andrew SQLDBA
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply