How to change column datatype in SQL database without losing data

前端 未结 11 2522
迷失自我
迷失自我 2020-12-02 06:55

I have SQL Server database and I just realized that I can change the type of one of the columns from int to bool.

How can I do that withou

11条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 07:12

    If it is a valid change.

    you can change the property.

    Tools --> Options --> Designers --> Table and Database designers --> Uncheck --> Prevent saving changes that required table re-creation.

    Now you can easily change the column name without recreating the table or losing u r records.

提交回复
热议问题