在SQL Server中,可以使用以下語(yǔ)法來(lái)為表結(jié)構(gòu)字段添加注釋?zhuān)?/p>
EXEC sys.sp_addextendedproperty
@name = N'MS_Description',
@value = N'Your comment here',
@level0type = N'Schema',
@level0name = 'dbo',
@level1type = N'Table',
@level1name = 'YourTableName',
@level2type = N'Column',
@level2name = 'YourColumnName';
請(qǐng)將上面的語(yǔ)法中的以下部分替換為實(shí)際的值:
Your comment here
:要添加的注釋內(nèi)容YourTableName
:表名YourColumnName
:字段名執(zhí)行上面的語(yǔ)法后,即可為指定的表結(jié)構(gòu)字段添加注釋。