同意楼上的,没错,
SQL的alter语句在alter column时不支持default,而在add 时支持

解决方案 »

  1.   

    如果我要修改某已存在字段的缺省值该怎么做??用sql语句,不是用管理器。
      

  2.   

    感谢您使用微软产品。 修改DEFAULT值,您应该删除旧的DEFAULT definition并创建一新的DEFAULT definition。Note  To modify a DEFAULT definition using Transact-SQL or SQL-DMO, you must first delete the existing DEFAULT definition and then re-create it with the new definition.用下列TSQL语句完成:ALTER TABLE <table name>
     DROP CONSTRAINT <Default Object name>ALTER TABLE <table name> ADD CONSTRAINT
     <Default Object name> DEFAULT 15 FOR Age
    -         微软全球技术中心 DTA技术支持本贴子仅供CSDN的用户作为参考信息使用。其内容不具备任何法律保障。您需要考虑到并承担使用此信息可能带来的风险。具体事项可参见使用条款 (http://www.csdn.net/microsoft/terms.shtm)。