Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
kwikwisi
Constraint Violating Yak Guru
283 Posts |
Posted - 2008-05-29 : 11:33:33
|
How can i create column dynamically and access parameter for this col name?@col nvarchar(100)ASALTER TABLE SummaryADD @col nvarchar(100); |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-05-29 : 12:32:23
|
Use dynamic sqlDECLARE @Sql varchar(2000)SET @Sql='ALTER TABLE Summary ADD '+ @ColEXEC(@Sql)but question why you want to do this. |
 |
|
|
|
|