David == "Which city is unhappy !!! I hate Wuhan asked this question, I simply wrote an example.
Declare @ Para IntSet @ Para = 1Declare @K varchar (20), @ SQL VARCHAR (50) while @para <9beginset @ k = 'p' convert (varchar, @ para) print @kset @ SQL = 'Alter Table Test2 Add ' @K ' int 'print @sqlexecute (@SQL) set @ para = @ Para 1END