Reputation: 2761
Can let me know how to remove views/tables from Azure Synapse Inbuilt SQL Serverless Pool.
Its easy enough to remove individual tables/views using following:
use [DatabaseName]
GO
drop EXTERNAL table schemaname.tablename
But I would to remove all the views/tables shown here:
Upvotes: 0
Views: 711
Reputation: 11625
Run the following T-SQL query which builds a dynamic SQL statement to drop all views:
declare @sql nvarchar(max) = (
select STRING_AGG('drop view ['+s.name+'].['+v.name+']; ','
')
from sys.views v
join sys.schemas s on s.schema_id = v.schema_id
where v.is_ms_shipped = 0
)
exec(@sql)
Upvotes: 2