How to change column datatype in SQL database without losing data

前端 未结 11 2599
迷失自我
迷失自我 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:14

    ALTER TABLE tablename
    ALTER COLUMN columnname columndatatype(size)
    

    Note: if there is a size of columns, just write the size also.

提交回复
热议问题