1、查询出所有的表
SELECT name, id From sysobjects WHERE xtype = 'u' ORDER BY name ASC
2、根据表名查询出表结构
select syscolumns.name as "列名", systypes.name as "数据类型", syscolumns.length as "数据长度", sys.extended_properties.[value] AS "标识",case syscolumns.isnullable when 1 then '允许' when 0 then '不允许' end as "是否为空"
from syscolumns join systypes on syscolumns.xtype=systypes.xtype
and systypes.name <> 'sysname' LEFT OUTER JOIN sys.extended_properties ON
( sys.extended_properties.minor_id = syscolumns.colid AND sys.extended_properties.major_id = syscolumns.id) where syscolumns.id in (select id from sysobjects where name= 'Asx_4DU_3654')
SQL Server生成关系模型
PowerDesigner安装详细教程-CSDN博客
PowerDesigner中如何导入SQL Server数据库_mssql2005_脚本之家