How do you change the datatype of a column in SQL Server?

后端 未结 8 771
日久生厌
日久生厌 2020-11-29 16:19

I am trying to change a column from a varchar(50) to a nvarchar(200). What is the SQL command to alter this table?

8条回答
  •  佛祖请我去吃肉
    2020-11-29 17:09

    As long as you're increasing the size of your varchar you're OK. As per the Alter Table reference:

    Reducing the precision or scale of a column may cause data truncation.

提交回复
热议问题