What is the difference between varchar and nvarchar?

后端 未结 19 2464
野的像风
野的像风 2020-11-22 04:05

Is it just that nvarchar supports multibyte characters? If that is the case, is there really any point, other than storage concerns, to using varchars

19条回答
  •  春和景丽
    2020-11-22 04:12

    varchar: Variable-length, non-Unicode character data. The database collation determines which code page the data is stored using.

    nvarchar: Variable-length Unicode character data. Dependent on the database collation for comparisons.

    Armed with this knowledge, use whichever one matches your input data (ASCII v. Unicode).

提交回复
热议问题