Create Procedure DBO.TRANS_GETTABECOLUMNSINFO
@TableName Varchar (50)
/ *
According to the incoming table name, obtain the information, column name, column data type, and data type length of the column of the corresponding table.
* /
AS
Select syscolumns.name, systypes.name, syscolumns.length
From syscolumns join sysobjects on syscolumns.id = sysobjects.id join systempes on systems.xtype = syscolumns.XTYPE
WHERE
sysobjects.name=@tablename
Go