• PowerDesigner16 生成的备注脚本,在sql server 2008 中报“对象名 'sysproperties' 无效”的错误的解决办法


    主要是在建模时我们对表、列增加了些说明注释,而Sql2005之后系统表sysproperties已废弃删除而改用sys.extended_properties所致。

    1、修改Table TableComment 部分

         菜单Database -> Edit Current DBMS 窗体 General 选项卡 下 Script -> Objects -> Table –> TableComment

     在开头部分替换如下:

    [if exists (select 1
                from  sys.extended_properties
                where  major_id = object_id('[%QUALIFIER%]%TABLE%')
                and   minor_id = 0 )

    2、修改Column ColumnComment部分

       菜单Database -> Edit Current DBMS 窗体 General 选项卡 下 Script -> Objects -> Column –> ColumnComment

     在开头部分替换如下:

    [if exists (select 1
                from  sys.extended_properties
                where  major_id = object_id('[%QUALIFIER%]%TABLE%')
                and   minor_id <> 0 and name = 'MS_Description')

  • 相关阅读:
    [IOI2013]Dreaming
    Lost Cows
    Mobile Service
    [POI2005]Bank notes
    [CTSC2007]动物园zoo
    [CF1093F]Vasya and Array
    [雅礼集训 2017 Day1]市场
    [APIO2014]序列分割
    [CEOI2004]锯木厂选址
    [APIO2010]特别行动队
  • 原文地址:https://www.cnblogs.com/yunfeng83/p/3897375.html
Copyright © 2020-2023  润新知