在默认的情况下,powerdesigner生成的表的sql语句是不带注释的。如果我们不懂表中的字段,那么我们可以在powerdesigner中查找。但是,这样是很麻烦的。你不想多次打开一个早就不需要使用的软件了吧。如果你电脑配置低,好呀,更麻烦了。怎么解决这一个问题?那就是给生成的sql加上注解。这样在查看数据库的时候,就可以查找字段的意思了。这样岂不是方便了很多。怎么操作?
tools->Excecute 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