Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Use of N in commands
Message
 
À
09/03/2011 15:33:04
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01503083
Message ID:
01503084
Vues:
59
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform