create proc [dbo].[getColumns] @table_name varchar(30) as begin select a.name 表名,b.name 字段名,c.name 字段类型,c.length 字段长度 from sysobjects a,syscolumns b,systypes c where a.id=b.id and a.name=@table_name and a.xtype='U' and b.xtype=c.xtype; end