I want to create a Stored Proc wherein I will first find a list of tables to be dropped as :
select tablename from dbc.tables where tablename like '%Test%' and Tablekind = 'T'
and then use a cursor to drop these tables. It will also be good to have a parameter in the Stored Proc that accepts the search pattern of the tables required to be dropped.
Can anyone please help ?