Explore information related to database tables

Delete Data in SQL using DELETE statement - How to use it

This article covers how to Delete Data in SQL using the DELETE statement. 

The SQL DELETE Query is used to delete the existing records from a table.

You can use the WHERE clause with a DELETE query to delete the selected rows, otherwise all the records would be deleted.


In Structured Query Language, more commonly known as SQL, the DELETE statement is one of the most powerful operations available to users. 

DELETE operations irreversibly delete one or more rows of data from a database table. 

Being such a fundamental aspect of data management, it's important for SQL users to understand how the DELETE statement works.


The basic syntax of the DELETE query with the WHERE clause is as follows:

DELETE FROM table_name
WHERE [condition];

You can combine N number of conditions using AND or OR operators.


Note: Be careful when deleting records in a table! Notice the WHERE clause in the DELETE statement. 

The WHERE clause specifies which record(s) should be deleted. If you omit the WHERE clause, all records in the table will be deleted!


To Delete All Records:

It is possible to delete all rows in a table without deleting the table. This means that the table structure, attributes, and indexes will be intact:

DELETE FROM table_name;


DROP is used to delete a whole database or just a table. The DROP statement destroys the objects like an existing database, table, index, or view. A DROP statement in SQL removes a component from a relational database management system (RDBMS).

Read More



Crashed Database Tables in Nagios XI

This article will guide you through the steps to fix Crashed #Database #Tables in #Nagios which occurs if the #MySQL process appears to be consuming large amounts of #CPU.

Read More