Click here to Skip to main content
15,895,370 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I have a table inwhich column have some drop statement.

Can any one tell me how to execute these commands

for example

Column 1
drop table table1
drop table table2
drop table table3
drop table table4
drop table table5
Posted

1 solution

the sp_executesql stored procedure will soon be your friend... check that[^]

Basically you have to iterate over your rows and call sp_executesql for each record
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900