azure - How to drop a schema forcefully? -
how drop schema forcefully of dependencies gone in sql datawarehouse? cascade function not available in datawarehouse, there anyway delete, schema , dependencies forcefully?
i figured out myself using below statement:-
while(exists(select 1 information_schema.tables table_name != '__migrationhistory' , table_type = 'base table')) begin declare @sql nvarchar(2000) select top 1 @sql=('drop table ' + table_schema + '.[' + table_name + ']') information_schema.tables table_name != '__migrationhistory' , table_type = 'base table' exec (@sql) print @sql end go
this drop schema , dependencies created. works azure datawarehouse.
Comments
Post a Comment