网上搜索查阅地址:https://www.2cto.com/database/201704/628659.html

步骤: Powerdesigner中选择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

Powerdesigner设计表生成SQL脚本(带有注释)的更多相关文章

  1. PD生成SQL脚本附带注释命令

    '------------------------------------------------------------''脚本功能:' PowerDesigner中批量根据对象的name生成com ...

  2. PowerDesigner PDM生成sql脚本时:表的名称和表里面的字段名称都有引号解决。。。

    PowerDesigner PDM生成sql脚本时:表的名称和表里面的字段名称都有引号解决... 1.当你的PowerDesigner 是新安装时,你得设置可能就会出现一些问题,在这里比如:PDM生成 ...

  3. (转)powerdesigner 生成sql脚本使用的设置

    本文转载自:http://blog.163.com/lizhihaoo@126/blog/static/103121661201036171115/ 1. 生成sql脚本的时候,提示"con ...

  4. PowerDesigner生成sql脚本

    1.打开PowerDesigner->New Project; 2.填写项目名称,选择文件的存放路径: 3.新建一个模型,New Model: 4.选择概念模型,填写模型名称: 5.选择enti ...

  5. MySQL必知必会-官方数据库表及SQL脚本导入生成

    最近在复习SQL语句,看的是MySQL必知必会这本书,但是发现附录中只有表设计,没有表的具体数据.所以在学习相应的语句中体验不是很好,去网上查了数据库的内容,自己慢慢导入到了数据库中.把表放出来作为参 ...

  6. PD 15.1 安装 破解 , 简单使用 (一对多,多对多关系生成sql脚本) , CDM 和 PDM 的区别;PD15.1 生成sql2008 无FK外键约束的解决方法

    CDM是概念模型,在概念模型上没有具体数据库产品的概念,反映的是实体和联系.PDM是物理模型,是依赖具体数据库产品的模型,比如可以指定具体的数据类型和约束等等.在PowerDesigner中两个模型之 ...

  7. powerdesigner中物理模型与sql脚本的以及与数据库的连接设置

    使用JDBC连接失败的解决方案: http://blog.csdn.net/t37240/article/details/51595097 使用powerdesigner工具我们可以方便的根据需求分析 ...

  8. PowerDesigner数据模型(CDM—PDM—SQL脚本的转换流程)

    原文地址:PowerDesigner数据模型(CDM-PDM-SQL脚本的转换流程)作者:zzenglish 有图片的参考http://blog.sina.com.cn/s/blog_64742675 ...

  9. access生成sql脚本,通过VBA调用ADOX

    access生成sql脚本,通过VBA调用ADOX. 使用 MS Access 2016 的VBA,读取mdb文件中的所有表结构(数据类型/长度/精度等),生成对应的SQL create table语 ...

随机推荐

  1. Python基础之数组和向量化计算总结

    一.多维数组 1.生成ndarray     (array函数) .np.array()生成多维数组 例如:import numpy as npdata1=[6,7.5,8,0,1]     #创建简 ...

  2. Vue2leaflet 替换国内地图api,带{z}/{x}/{y}形式的

    参考:https://www.cnblogs.com/gispathfinder/p/9535685.html Vue2leaflet安装后,默认自带的地图URL如下 url:'http://{s}. ...

  3. kafka笔记9(监控)

    Kafka提供的所有度量指标都是通过JMX(Java Management Extensions)接口访问 JMX端口查询:  zookeeper上获取端口信息  /brokers/ids/<I ...

  4. 查找字符在字符串中第N次出现的位置

      1.查找字符串 @find 在字符串 @str 中第 (@n) 次出现的位置.没有第 (@n) 次返回 0. 返回@find在@str中第(@n)次出现的位置.没有第(@n)次返回0. ), ), ...

  5. IOT

    文档地址:http://www.owasp.org.cn/owasp-project/owasp-things?searchterm=iot 今天面试,面试官问到iot

  6. 删除打开方式里的wine

    title: "删除打开方式里的wine" date: 2018-05-27T13:54:28+08:00 tags: ["wine"] categories: ...

  7. Roomblock: a Platform for Learning ROS Navigation With Roomba, Raspberry Pi and RPLIDAR(转)

      What is this? "Roomblock" is a robot platform consists of a Roomba, a Raspberry Pi 2, a ...

  8. Hashtable几种常用的遍历方法

    Hashtable 在System.Collection是命名空间李Hashtable是程序员经常用到的类,它以快速检索著称,是研发人员开发当中不可缺少的利器. Hashtable表示键/值对的集合, ...

  9. python '%r'或者'{!r}'的意思

    转载:https://blog.csdn.net/a19990412/article/details/80149112 这两个都是python的转译字符, 类似于%r, %d,%f >>& ...

  10. Appium(二)---启动App+模拟滑动

    环境搭建好了,就可以实现基本的操作,比如启动App和模拟滑动.这里我实现的是在真机(乐视1s)上启动抖音App,并滑动抖音的视频列表,代码如下: from appium import webdrive ...