get the column list

,

This script will get the columnlist for a table parameter

Declare @OID int,@Name varchar(130), @SQL char(8000)    
Select @OID = object_id('TABLE_NAME')    
Select (Name + ',' ) as name from syscolumns where Id=@OID order by colid

Rate

Share

Share

Rate