Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Significance in "N" for String Parameters

Author  Topic 

jone0497
Starting Member

8 Posts

Posted - 2007-02-16 : 09:23:22
Hello,
I have noticed in many examples of TSQL code, that the developer is putting a "N" in before the single quotes to assign a string value to parameter. Could someone tell me what the significance of "N" is?

Example:
@step_name = N'Step 1 Email Report'

instead of
@step_name = 'Step 1 Email Report'

Does it do some kind of formatting / error checking? I haven't noticed any differences, but would like to write the best code that I can.

Thanks,
JJ

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-02-16 : 09:41:49
N is to signify the string is a unicode string.


KH

Go to Top of Page

jone0497
Starting Member

8 Posts

Posted - 2007-02-16 : 10:20:51
Cool

Thanks,
JJ
Go to Top of Page
   

- Advertisement -