What command would I execute to safely change (i.e. from int to bigint) a replicated column's data type in SQL Server 2005?
我将执行什么命令来安全地更改(即从int到bigint)SQL Server 2005中复制列的数据类型?
The column is not a key. There is a non-clustered index on the column.
该列不是关键。列上有非聚集索引。
1 个解决方案
#1
ALTER TABLE MyTable
ALTER COLUMN myIntCol bigint
From BOL:
By default, the following schema changes made at a Publisher running SQL Server are replicated to all SQL Server Subscribers:
默认情况下,在运行SQL Server的发布服务器上进行的以下架构更改将复制到所有SQL Server订阅服务器:
- ALTER TABLE
- ALTER VIEW
- ALTER PROCEDURE
- ALTER FUNCTION
- ALTER TRIGGER
#1
ALTER TABLE MyTable
ALTER COLUMN myIntCol bigint
From BOL:
By default, the following schema changes made at a Publisher running SQL Server are replicated to all SQL Server Subscribers:
默认情况下,在运行SQL Server的发布服务器上进行的以下架构更改将复制到所有SQL Server订阅服务器:
- ALTER TABLE
- ALTER VIEW
- ALTER PROCEDURE
- ALTER FUNCTION
- ALTER TRIGGER