问题:
I need to ALTER
the data types of several columns in a table.我需要ALTER
表中几列的数据类型。
For a single column, the following works fine:对於单列,以下工作正常:
ALTER TABLE tblcommodityOHLC
ALTER COLUMN
CC_CommodityContractID NUMERIC(18,0)
But how do I alter multiple columns in one statement?但是,如何在一条语句中更改多列? The following does not work:以下内容不起作用:
ALTER TABLE tblcommodityOHLC
ALTER COLUMN
CC_CommodityContractID NUMERIC(18,0),
CM_CommodityID NUMERIC(18,0)
解决方案:
参考一: https://en.stackoom.com/question/EXY8参考二: https://stackoom.com/question/EXY8