Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Use of N in commands
Message
 
To
09/03/2011 15:33:04
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01503083
Message ID:
01503084
Views:
60
This message has been marked as the solution to the initial question of the thread.
>I have always use the N character when defining a command. I probably got that one from an earlier example. But, using it or not seems to work:
>
>
>DECLARE @Command nvarchar(4000)
>
>SET @Command = 'ALTER TABLE [Server] ADD [MyField] numeric(15,0)'
>EXEC sp_executesql @Command
>
>
>
>DECLARE @Command nvarchar(4000)
>
>SET @Command = N'ALTER TABLE [Server] ADD [MyField] numeric(15,0)'
>EXEC sp_executesql @Command
>
>
>Is there any difference in using it or not? Or, basically, what is it used for?


Is for Unicode support, http://support.microsoft.com/kb/239530
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform