将数据库表的信息归纳到已经制定好格式的word文档中。
举例:
-------------------------------------------------------------------------------
select dbo.sysobjects.name as Table_name,
dbo.syscolumns.name as Column_name,
dbo.systypes.name as Type_name,
dbo.systypes.length as Type_length,
columnproperty(dbo.syscolumns.id,dbo.syscolumns.name,'precision') as Column_lengh
from dbo.syscolumns inner join dbo.sysobjects
on dbo.syscolumns.id = dbo.sysobjects.id
left join dbo.systypes
on dbo.syscolumns.xtype = dbo.systypes.xusertype
where dbo.sysobjects.name = 'M_CODE(表名)'
and (dbo.sysobjects.xtype = 'u')
and (not (dbo.sysobjects.name like 'dtproperties'))
-------------------------------------------------------------------------------
接下来,我们只要根据word文档规定的表格形式对应查出,复制粘贴到对应位置就好了。