Learn How to Delete or Remove Database Table using SQL

preview_player
Показать описание
Learn how to Remove or delete the existing table using SQL statement. Using standard SQL we can create as as well as remove the database table from our existing database. The DROP TABLE SQL statement is used to remove or delete the database table including all data rows in it. Be careful before deleting the database table completely from your database because the system does not ask for confirmation. As soon as you run the DROP TABLE statement, the system will delete the database table and the data rows instantly, and there is no easy method to recover the lost database table.

Here is the SQL statement to delete the database table, "DROP TABLE tablename;"
Select 'school' database, "USE school;"
And display all the tables in 'school' database by using SQL statement, "SHOW TABLES;"
The system returns all the table names stored in the selected database.
In previous lecture we created a table named 'students4'. Lets delete the table.
The SQL statement will be, "DROP TABLE students4;"
Press enter to execute the SQL statement, and we get 'Query OK, 0 rows affected' message.
If we now display all the tables, "SHOW TABLES;"
We can see the 'students4' is deleted successfully.

Check out the whole playlist of SQL Tutorials or Individual video from the following links,

SQL Tutorial for Beginners. Introduction to SQL Basics

1.Learn What is SQL? Introduction to SQL

2.Learn How to Install MySQL Database Server on Windows Operating System

3.Learn What is Database? How to Create and Show Databases using SQL

4.Learn How to Select and Use Existing Database using SQL

5.Learn How to Delete or Remove Database using SQL

6.Learn What is Database Table? How to Create a Database Table using SQL?

7.Learn How to Modify or Update Database Table using SQL

8.Learn How to Delete or Remove Database Table using SQL

9.Learn How to Add Data Rows in a Table using SQL

10.Learn How to Use INSERT INTO SELECT Statement in SQL

11.Learn How to Update Data Rows using Update Statement in SQL

12.Learn How to Delete Data Rows using Delete Statement in SQL

Рекомендации по теме
Комментарии
Автор

It's not working for Oracle database

sujeetkakade