Bonsoir,
J'aimerai juste savoir quelle est l'utilité du N après le signe =
BACKUP DATABASE MaBase TO DISK=N'D:\BACKUP\MaBase.bak'
Merci !
Bonsoir,
J'aimerai juste savoir quelle est l'utilité du N après le signe =
BACKUP DATABASE MaBase TO DISK=N'D:\BACKUP\MaBase.bak'
Merci !
https://learn.microsoft.com/en-us/sq...l-server-ver16Prefix a Unicode character string constants with the letter N to signal UCS-2 or UTF-16 input, depending on whether an SC collation is used or not. Without the N prefix, the string is converted to the default code page of the database that may not recognize certain characters. Starting with SQL Server 2019 (15.x), when a UTF-8 enabled collation is used, the default code page is capable of storing the Unicode UTF-8 character set.
When prefixing a string constant with the letter N, the implicit conversion will result in a UCS-2 or UTF-16 string if the constant to convert doesn't exceed the max length for the nvarchar string data type (4,000). Otherwise, the implicit conversion will result in a large-value nvarchar(max).
Lancez la requête suivante et regardez ce qui se passe....
A +
Code : Sélectionner tout - Visualiser dans une fenêtre à part SELECT 'الوطن العربي', N'الوطن العربي'
Frédéric Brouard - SQLpro - ARCHITECTE DE DONNÉES - expert SGBDR et langage SQL
Le site sur les SGBD relationnels et le langage SQL: http://sqlpro.developpez.com/
Blog SQL, SQL Server, SGBDR : http://blog.developpez.com/sqlpro
Expert Microsoft SQL Server - M.V.P. (Most valuable Professional) MS Corp.
Entreprise SQL SPOT : modélisation, conseils, audit, optimisation, formation...
* * * * * Expertise SQL Server : http://mssqlserver.fr/ * * * * *
Ok c'est donc pour la prise en charge d'Unicode. Merci !
Partager