if exists(SELECT  1
            FROM    sys.tables t
                    INNER JOIN sys.columns c ON t.object_id = c.object_id
                    INNER JOIN sys.default_constraints dc ON c.default_object_id = dc.object_id
            WHERE   t.name '你的表名称'
                    AND c.name '你的列名称')
    存在默认值约束的处理
else
    不存在默认值约束的处理

相关文章:

  • 2022-12-23
  • 2021-09-23
  • 2021-06-26
  • 2022-02-02
  • 2022-12-23
  • 2022-02-02
  • 2021-12-27
  • 2022-02-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2021-12-17
  • 2022-12-23
  • 2021-12-06
  • 2021-12-27
相关资源
相似解决方案