Introduction
In this article I describe how to drop all the tables in a particular database. Several times in our project we needed to drop all tables. If there is a large number of tables then it is very tedious to drop all of them. Here I explain how to drop all the tables.
Creation of database
In this article I describe how to drop all the tables in a particular database. Several times in our project we needed to drop all tables. If there is a large number of tables then it is very tedious to drop all of them. Here I explain how to drop all the tables.
Creation of database
- create database Daljeet
- go
- use Daljeet
Creation of the first table
- create table emp(empId int, empName varchar(15))
- go
- insert into emp
- select 1,'Deepak'union all
- select 2,'Arora'
- go
- select * from emp

Creation of the second table
- create table stu(stuId int, stuName varchar(15))
- go
- insert into stu
- select 11,'Daljeet'union all
- select 22,'Singh'
- go
- select * from stu




Join the conversation! Your thoughts help the community grow.