We can delete tables from database one
by one by using Query as well as using GUI. Some time we need to delete all
tables in one go. We can delete all tables using Query:
drop table table_name;
Delete all table using query:
declare @sql nvarchar(max)=''
select @sql += ' drop table
' + quotename(table_schema) + '.'+
quotename(table_name) + '; '
from
information_schema.tables
where table_type = 'base table'
exec sp_executesql @sql