MySQL Tutorial





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
Mysql Tutorial
Introduction
How to Install
Database
Datatypes
Tables
INSERT
SELECT
UPDATE
DELETE
Operators
Functions
Ask Your Doubts
Feedback
 





Delete MySQL Tables


Tutorials Mysql

Topic
Delete MySQL tables data using Delete query.


Explanation


Delete Statement :

    The delete statement is used to delete the values from a table.

The syntax is


DELETE FROM tbl_name
[WHERE where_condition];
    The Delete statement deletes the rows from tbl_name and returns the number of rows deleted. The WHERE clause is used to specify the conditions that identify which rows to be deleted. If the DELETE query contains without WHERE clause, all rows will be deleted.

    

mysql> delete from student where name='michael';
Query OK, 1 row affected (0.00 sec)
    This is an example of delete statement     The above example will delete the record of the student Michael from the table.

    We can also delete mysql tables all values as the following query.

mysql> delete from student;
Query OK, 8 rows affected (0.00 sec)
    This simple delete query used to delete all data in a table.




A Note

MySQL is the most popular open source Relational database Management system (RDBMS). Being a open source anyone can use and change the software for their needs. Hope you enjoy this tutorial. We welcome your Valuable feedbacks or suggestions on this MySQL tutorial. This is a copyright content.


Other Links

web hosting