"drop all tables in azure sql database" Code Answer's
You're definitely familiar with the best coding language SQL that developers use to develop their projects and they get all their queries like "drop all tables in azure sql database" answered properly. Developers are finding an appropriate answer about drop all tables in azure sql database related to the SQL coding language. By visiting this online portal developers get answers concerning SQL codes question like drop all tables in azure sql database. Enter your desired code related query in the search bar and get every piece of information about SQL code related question on drop all tables in azure sql database.
drop all tables in azure sql database
while(exists(select 1 from INFORMATION_SCHEMA.TABLE_CONSTRAINTS where CONSTRAINT_TYPE='FOREIGN KEY'))
begin
declare @sql nvarchar(2000)
SELECT TOP 1 @sql=('ALTER TABLE ' + TABLE_SCHEMA + '.[' + TABLE_NAME
+ '] DROP CONSTRAINT [' + CONSTRAINT_NAME + ']')
FROM information_schema.table_constraints
WHERE CONSTRAINT_TYPE = 'FOREIGN KEY'
exec (@sql)
PRINT @sql
end
while(exists(select 1 from INFORMATION_SCHEMA.TABLES
where TABLE_NAME != 'database_firewall_rules'
AND TABLE_TYPE = 'BASE TABLE'
AND TABLE_NAME NOT IN (select name from sys.external_tables)))
begin
declare @sql1 nvarchar(2000)
SELECT TOP 1 @sql1=('DROP TABLE ' + TABLE_SCHEMA + '.[' + TABLE_NAME + ']')
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME != 'database_firewall_rules'
AND TABLE_TYPE = 'BASE TABLE'
AND TABLE_NAME NOT IN (select name from sys.external_tables)
exec (@sql1)
PRINT @sql1
end
Source: stackoverflow.com
All those coders who are working on the SQL based application and are stuck on drop all tables in azure sql database can get a collection of related answers to their query. Programmers need to enter their query on drop all tables in azure sql database related to SQL code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about drop all tables in azure sql database for the programmers working on SQL code while coding their module. Coders are also allowed to rectify already present answers of drop all tables in azure sql database while working on the SQL language code. Developers can add up suggestions if they deem fit any other answer relating to "drop all tables in azure sql database". Visit this developer's friendly online web community, CodeProZone, and get your queries like drop all tables in azure sql database resolved professionally and stay updated to the latest SQL updates.