Powerdesigner设计表生成SQL脚本(带有注释)
网上搜索查阅地址: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脚本(带有注释)的更多相关文章
- PD生成SQL脚本附带注释命令
'------------------------------------------------------------''脚本功能:' PowerDesigner中批量根据对象的name生成com ...
- PowerDesigner PDM生成sql脚本时:表的名称和表里面的字段名称都有引号解决。。。
PowerDesigner PDM生成sql脚本时:表的名称和表里面的字段名称都有引号解决... 1.当你的PowerDesigner 是新安装时,你得设置可能就会出现一些问题,在这里比如:PDM生成 ...
- (转)powerdesigner 生成sql脚本使用的设置
本文转载自:http://blog.163.com/lizhihaoo@126/blog/static/103121661201036171115/ 1. 生成sql脚本的时候,提示"con ...
- PowerDesigner生成sql脚本
1.打开PowerDesigner->New Project; 2.填写项目名称,选择文件的存放路径: 3.新建一个模型,New Model: 4.选择概念模型,填写模型名称: 5.选择enti ...
- MySQL必知必会-官方数据库表及SQL脚本导入生成
最近在复习SQL语句,看的是MySQL必知必会这本书,但是发现附录中只有表设计,没有表的具体数据.所以在学习相应的语句中体验不是很好,去网上查了数据库的内容,自己慢慢导入到了数据库中.把表放出来作为参 ...
- PD 15.1 安装 破解 , 简单使用 (一对多,多对多关系生成sql脚本) , CDM 和 PDM 的区别;PD15.1 生成sql2008 无FK外键约束的解决方法
CDM是概念模型,在概念模型上没有具体数据库产品的概念,反映的是实体和联系.PDM是物理模型,是依赖具体数据库产品的模型,比如可以指定具体的数据类型和约束等等.在PowerDesigner中两个模型之 ...
- powerdesigner中物理模型与sql脚本的以及与数据库的连接设置
使用JDBC连接失败的解决方案: http://blog.csdn.net/t37240/article/details/51595097 使用powerdesigner工具我们可以方便的根据需求分析 ...
- PowerDesigner数据模型(CDM—PDM—SQL脚本的转换流程)
原文地址:PowerDesigner数据模型(CDM-PDM-SQL脚本的转换流程)作者:zzenglish 有图片的参考http://blog.sina.com.cn/s/blog_64742675 ...
- access生成sql脚本,通过VBA调用ADOX
access生成sql脚本,通过VBA调用ADOX. 使用 MS Access 2016 的VBA,读取mdb文件中的所有表结构(数据类型/长度/精度等),生成对应的SQL create table语 ...
随机推荐
- Qt QSpinBox 和 QDoubleSpinBox
展示一个效果: QDoubleSpinBox跟QSpinBox类似,只是多了一个decimal.
- hibernate框架的简单入门
1.什么是框架 框架是一个半成品,框架帮我们实现了一部分的功能. 2.使用框架的最大好处 使用框架的最大好处就是,少写一部分代码但仍能实现我们所需要实现的功能. 3.什么是hiberbnate框架 ( ...
- java:tomcat(负载均衡)nginx的应用配置
http://mini.eastday.com/mobile/180627012211514.html 1.什么是负载均衡 由于系统各个核心部分随着业务量的提高,访问量和数据流量的快速增长,单一的服务 ...
- Halcon 和 C# 联合编程 - 图像变量的相互转换(HObject、HImage、Bitmap)
/// <summary> /// 灰度图像 HObject -> Bitmap /// </summary> public static Bitmap HObject2 ...
- MyBatis探究-----动态SQL详解
1.if标签 接口中方法:public List<Employee> getEmpsByEmpProperties(Employee employee); XML中:where 1=1必不 ...
- final关键字的几种用法
在java的关键字中,static和final是两个我们必须掌握的关键字.不同于其他关键字,他们都有多种用法,而且在一定环境下使用,可以提高程序的运行性能,优化程序的结构.下面我们来了解一下final ...
- dbf,Idx 文件格式
NDbfReaderEx about_indexes ntx file format
- qt手写输入法资料
论文: https://max.book118.com/html/2015/1229/32204490.shtm 开源库: zinna Linux下使用的Tegaki就是使用的这个库 csdn博客资料 ...
- sql 与 mysql 链接数据库
- Is ICARSCAN same or old version of LAUNCH X431 Easydiag ?
LAUNCH X431 Easydiag 2.0 is basically the same OBD-II Bluetooth device – but the software supplied w ...