日期:2014-05-17  浏览次数:20474 次

sqlserver怎么得到表的定义
请教大家个问题,sqlserver怎么得到表的定义?
例如有一张表:test
怎么通过语句得到它的定义语句

就像利用 sp_hepttext可以得到存储过程的定义一样,有没有什么可以得到表的定义?
要得到的结果类似:
  Create table test ( 
 id int identity(1,1) primary key, 
 name nvarchar(20), 
 other int )

------解决方案--------------------
参考:
http://hi.baidu.com/myyear/item/4042201cbd2431f965eabf9d