1、为sql生成注释,操作如下,在其中选择Tools----》Excute commands-----》Edit/Run Script打开的窗口中添加以下信息

'****************************************************************************** 
'*   File:           name2comment.vbs 
'*   Purpose:     Database   generation   cannot   use   object   names   anymore   
'                         in   version   7   and   above. 
'                         It   always   uses   the   object   codes. 
'
'                         In   case   the   object   codes   are   not   aligned   with   your   
'                         object   names   in   your   model,   this   script   will   copy   
'                         the   object   Name   onto   the   object   Comment   for   
'                         the   Tables   and   Columns. 
'
'*   Title:         
'*   Version:     1.0 
'*   Company:     Sybase   Inc.   
'******************************************************************************

Option Explicit
ValidationMode   = True
InteractiveMode   =   im_Batch

Dim   mdl   '   the   current   model

'   get   the   current   active   model 
Set   mdl   =   ActiveModel 
If   (mdl   Is Nothing)   Then
MsgBox "There   is   no   current   Model "
ElseIf Not   mdl.IsKindOf(PdPDM.cls_Model)   Then
MsgBox "The   current   model   is   not   an   Physical   Data   model. "
Else
      ProcessFolder   mdl 
End If

'   This   routine   copy   name   into   comment   for   each   table,   each   column   and   each   view 
'   of   the   current   folder 
Private sub   ProcessFolder(folder) 
Dim   Tab   'running     table 
for each   Tab   in   folder.tables 
if not   tab.isShortcut   then
                  '把表名作为表注释,其实不用这么做
                  tab.comment   =   tab.name 
Dim   col   '   running   column 
for each   col   in   tab.columns 
                        '把列name和comment合并为comment
                        col.comment=   col.name 
next
end if
next

Dim   view   'running   view 
for each   view   in   folder.Views 
if not   view.isShortcut   then
                  view.comment   =   view.name 
end if
next

'   go   into   the   sub-packages 
Dim   f   '   running   folder 
For Each   f   In   folder.Packages 
if not   f.IsShortcut   then
                  ProcessFolder   f 
end if
Next
end sub

点击run后即可进行正常导出步骤

转自:辰辰呐的博客

转载于:https://www.cnblogs.com/libf/p/9122150.html

PowerDesigner生成sql语句时自动导出注释相关推荐

  1. 使用SQL生成SQL语句时单引号的转义处理之q'{}'方法

    2019独角兽企业重金招聘Python工程师标准>>> 在使用SQL生成SQL技术完成维护任务的过程中,会遇到类似单引号这样的字符需要转义,给脚本编写带来了些许的麻烦.   一般处理 ...

  2. PowerDesigner生成SQL脚本时表名、字段名带引号问题及解决方法

    使用PowerDesigner生成数据库脚本时,表名一般会带引号. 如下: 加引号是PL/SQL的规范,数据库会严格按照""中的名称建表,如果没有"",会按照O ...

  3. jpa 默认生成sql语句_springboot-jpa自动创建数据库表

    第一步创建springboot项目,jpa,mysql, 代码如下: application.yml spring: datasource: url: jdbc:mysql://127.0.0.1:3 ...

  4. Excel实现给加单引号,以及加逗号,批量生成sql语句时使用

    Excel实现给加单引号,以及加逗号 使用公式: 只单纯加单引号: ="'"&A1&"'" 加单引号和逗号: ="'"&am ...

  5. powerdesigner生成表sql语句时,统一添加默认字段(生成时间、生成人等)

    powerdesigner生成表sql语句时,统一添加默认字段 文章目录 powerdesigner生成表sql语句时,统一添加默认字段 方式一:配置创建表默认字段: 方法二:创建表模型后执行vb语句 ...

  6. PowerDesigner16.5导出SQL语句时如何将name列复制到comment注释里面

    很多人都会想在使用PowerDesigner设计完数据库时自动将name列值在输出时自动复制到comment列 运行脚本 Tools->Execute Commands->Edit/Run ...

  7. java自动生成sql语句

    java自动生成sql语句 艳学网强势来袭http://47.98.237.162/index,首次发布艳辉工具,第一个工具我们发布sql语句自动生成. 以前首次接触sql是在大学期间,刚开始是手写s ...

  8. 解放程序员双手!GPT-3自动生成SQL语句 | 代码开源

    金磊 发自 凹非寺 量子位 报道 | 公众号 QbitAI "无所不能"的GPT-3,现在又来解放程序员们的双手了. 像这样,只需用简单的英文问下GPT-3"上个月注册了 ...

  9. NO2:自动生成sql语句

    SQL语句自动生成工具 大哉乾元 2016/2/26   作者原创转载请注明出处 前言 这个程序是几年前做成的,现在整理成文档和大家分享,当时参与的项目中大量使用的sql语句,所以SqL语句的代码输入 ...

最新文章

  1. C# .NET访问Oracle的三种方法(转)
  2. Usage and Idioms——Categories
  3. Oauth2认证以及新浪微博开放平台应用
  4. python数字类型转换函数_python中的各种数据类型中的数据格式转换
  5. linux网络配置命令笔记,初学者学习linux笔记与练习-第二天。一些基本命令以及初级网络配置...
  6. 如何将多个Android Wear手表与单个手机配对
  7. ac算法 有什么用 Java_AC算法使用例子
  8. django web 自定义通用权限控制
  9. 网易面经(Java开发)
  10. POJ 1094 拓扑排序
  11. 计算机毕业设计中用python神经网络编程实现手写数字识别
  12. Thingsboard 3.1.0 - 数据订阅
  13. 计算机为什么逻辑判断准确,逻辑判断之评价型答题技巧
  14. Android仿微信朋友圈发动态功能(相册图片多选)
  15. vue问题解决 extract:echarts: sill extract echarts@^4.2.0-rc.2 extracted to
  16. 类和结构体的内存空间占有问题
  17. u盘内容无故消失了怎么恢复 u盘恢复数据怎么操作
  18. 微信小程序轮播图swiper详细代码介绍
  19. 存储性能指标--iops
  20. Vue3+TS 中使用Provide/Inject 的例子

热门文章

  1. pycharm 2020 版取消鼠标悬停显示说明文档的方法
  2. python公式计算器_Python-计算器
  3. LeetCode 2064. 分配给商店的最多商品的最小值(二分查找)
  4. LeetCode 294. 翻转游戏 II(记忆化递归)
  5. LeetCode 252. 会议室(排序)
  6. LeetCode 1487. 保证文件名唯一(哈希map)
  7. LeetCode 1295. 统计位数为偶数的数字
  8. LeetCode 1376. 通知所有员工所需的时间(DFS)
  9. python中的文件读取注意事项
  10. 全栈深度学习第1期:如何启动一个机器学习项目?