- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Environmental Science
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to delete a table in SQL ?
There are two ways to delete a table from sql: DROP and TRUNCATE. The DROP TABLE command is used to completely delete the table from the database. This is the command:
DROP TABLE table_name;
The above command will completely delete all the data present in the table along with the table itself.
But if we want to delete only the data present in the table but not the table itself, then we will use the truncate command:
DROP TABLE table_name ;
- Related Questions & Answers
- What is a schema in SQL ?
- How to create a table in SQL ?
- What is SQL ?
- How to change a table name in SQL ?
- How to insert date in SQL ?
- How to Create a Table in SQL – Postgres and MySQL Example Query
- What is PL/SQL ?
- What are the types of SQL Queries ?
- How to find the nth highest salary in SQL ?
- What are Nested Triggers ?
- How to insert multiple rows in SQL ?
- What is SQL injection ?
- What is Normalization in SQL ?
- How can I see all tables in SQL?
- What is a trigger in SQL ?
- How to delete a column in SQL ?
Advertisements
ads