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 !
Version imprimable
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-ver16Citation:
Prefix 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:SELECT 'الوطن العربي', N'الوطن العربي'
Ok c'est donc pour la prise en charge d'Unicode. Merci !