(add comment to table or column,and add comment to ddl script) erwin为ddl script 脚本添加表或字段的注释(导出注释)(comment)

1.在physical的状态下

2.鼠标右键点在左边的tables上new一个表,取表明为table1(comment设为“表格1”),添加一个字段为ID(comment设为“字段1”)

3.鼠标右键点在new的表上,选择table properties,comment

4.在弹出的sql server tables的对话框中,的Owner中填上“dbo”

5.选择菜单tools--》firword engineer--》schema genaration

6.默认是Option选中,点击Option中的最后一个other Option,

7.在右边的对话框中选中comments,这是他会自动勾选Owner

8。点击按钮Preview得到如下代码


CREATE TABLE dbo.table1
(
    ID                    char(18)  NULL
)
go



exec sp_addextendedproperty 'MS_Description' , '表格1' , 'user' , 'dbo' , 'table' , 'table1'
go



exec sp_addextendedproperty 'MS_Description' , '字段1' , 'user' , 'dbo' , 'table' , 'table1', 'column' , 'ID'
go

 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值