Change datatype varchar to nvarchar in existing SQL Server 2005 database. Any issues?

前端 未结 5 717
梦如初夏
梦如初夏 2021-01-03 18:14

I need to change column datatypes in a database table from varchar to nvarchar in order to support Chinese characters (currently, the varchar

5条回答
  •  梦谈多话
    2021-01-03 18:59

    You can do on non primary key fields:

    ALTER TABLE [TableName]
    ALTER COLUMN [ColumnName] nvarchar(N) null
    

    On the primary key fields it will not work - you will have to recreate the table

提交回复
热议问题