Quantcast
Channel: CodeSection,代码区,SQL Server(mssql)数据库 技术分享 - CodeSec
Viewing all articles
Browse latest Browse all 3160

生成sql包含comment列(powerDesigner16.5) sql SQLServer comment列

$
0
0

生成sql包含comment列(powerDesigner16.5)。

目的:生成的sql中包含comment。

意义:创建的表的sql中有说明文字,可以通过代码生成工具取到comment字段,自动中文注释及更有意义的事情。

操作:
1. 设置当未填写列备注时使用列名称作为备注
生成sql包含comment列(powerDesigner16.5) sql SQLServer comment列
生成sql包含comment列(powerDesigner16.5) sql SQLServer comment列
生成SQL增加comment
默认的pd没有生成注释,针对mysql5.0可以如下修改。
在Database–>edit Current DBMS…
设置dbms的属性,找到mysql5.0–>script–>objects–>column–>add
把原来的内容:
%20:COLUMN% [%National%?national ]%DATATYPE%[%Unsigned%? unsigned][%ZeroFill%? zerofill][ [.O:[character set][charset]] %CharSet%][.Z:[ %NOTNULL%][%IDENTITY%? auto_increment:[ default %DEFAULT%]][ comment %.q:@OBJTLABL%]]

改为:

%20:COLUMN% [%National%?national ]%DATATYPE%[%Unsigned%? unsigned][%ZeroFill%? zerofill][ [.O:[character set][charset]] %CharSet%][.Z:[ %NOTNULL%][%IDENTITY%? auto_increment:[ default %DEFAULT%]][ comment %.q:COMMENT%]]

Viewing all articles
Browse latest Browse all 3160

Trending Articles