Code selectobject_name(id) as 表名 ,c.name as 字段名 ,t.name 数据类型 ,c.prec as 长度 from syscolumns c innerjoin systypes t on c.xusertype=t.xusertype whereobjectproperty(id,'IsUserTable')=1and id=object_id('student')
--查找视图studentView中的字段信息
Code selectobject_name(id) as 表名 ,c.name as 字段名 ,t.name 数据类型 ,c.prec as 长度 from syscolumns c innerjoin systypes t on c.xusertype=t.xusertype whereobjectproperty(id,'IsView')=1and id=object_id('studentView')