Questions tagged «default-constraint»

1
用于添加默认约束的命令
似乎至少有两种方法可以使用直接T-SQL添加默认约束。我是否正确,以下两者之间的唯一区别是第二种方法专门为约束创建了一个名称,而第一种方法有一个由SQL Server生成的名称? ALTER TABLE [Common].[PropertySetting] ADD DEFAULT ((1)) FOR [Active]; ALTER TABLE [Common].[PropertySetting] ADD CONSTRAINT [DF_PropertySetting_Active) DEFAULT ((1)) FOR [Active];
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.