Search code examples
sql-servercollationmultilingual

What SQL collation should I use to store multi-language character?


I have a Database and my users are from all around the world because of this I should store the inputs in any language type.

By default my SQL collation is SQL_Latin1_General_CP1_CA_AS but this collation can not store Russian language.

What SQL collation I should use to store any language type like Japanese, Persian, English,Russian and ....?


Solution

  • The problem isn't the collation you are using, but the data type you are using to store text.

    Your table is using VARCHAR type when you should be using NVARCHAR. For example:

    CREATE TABLE MyTable
    (
        SomeColumn VARCHAR(50)
    )
    

    Should be:

    CREATE TABLE MyTable
    (
        SomeColumn NVARCHAR(50)
    )
    

    For more info on the difference, see here.