开发者

Rename a NOT NULL column with no default in a SQL Server 2000 table in Merge Replication

开发者 https://www.devze.com 2022-12-12 16:16 出处:网络
Using sp_repladdcolumn I can either: 1) add a column that allows nulls; or 2) add a column with a default value that does not allow nulls.

Using sp_repladdcolumn I can either:

1) add a column that allows nulls; or

2) add a column with a default value that does not allow nulls.

Without dropping and recreating the whole subscription I would like to:

3) add a column with no default value that does not allow nulls.

Is this possible?

I realize I would need to populate the column with data before I could set it to NOT NULL. As the title indicates, what I really want to do is rename an e开发者_StackOverflow社区xisting column that: a) has data in it, b) is set to NOT NULL, and c) has no default value.


To just rename a column, why not just use sp_rename?

0

精彩评论

暂无评论...
验证码 换一张
取 消