Examples of DROP TABLE
For good understanding of the DROP TABLE Command, Let’s create an table through which we will understand the DROP TABLE Command better and get the deep understanding of DROP TABLE Command.
Employees Table
CREATE TABLE Employees
(
emp_id int,
emp_name varchar(255) not null
);
Products Table
CREATE TABLE Products
(
pro_name varchar(255),
price decimal(10,2)
);
States Table
CREATE TABLE States
(
id int,
state_name varchar(255),
area decimal (15,2)
);
Verify whether the table is created successfully or not executing the below command.
Query:
SHOW TABLES;
You can see below our tables got created successfully.
Output:
Explanation: As we can see in the output that we have all tables which we ill created above.
Drop Table in MariaDB
MariaDB is one of the most widely used open-source relational database management systems, it offers many useful commands for manipulating database structures. It supports the same features that MySQL does but with additional features. Some of the most significant features are new storage engines, JSON API support, and parallel data replication.
One such command that performs an important role in database administration is the DROP TABLE command. In this article, We will discuss the DROP TABLE command in MariaDB along with syntax, table creation, and examples of dropping the table using multiple methods.
Contact Us