H I O X INDIA
MySQL Tutorial
Google
Web hscripts.com
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Directories 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)   Bookmarks :-)  
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

Mysql Tutorial
Introduction
How to Install
Database
Datatypes
Tables
INSERT
SELECT
UPDATE
DELETE
Operators
Functions
Ask Your Doubts
Feedback





DELETE/Deleting Statement


Topic

How to remove or delete a record from the table?
How to delete all the records in a table?
Delete Query in MySQL
How to delete rows and columns?



Explanation


DELETE Statement :

    The deleting query 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 statement contains without WHERE clause, all rows will be deleted.

    Now lets see an example for DELETE statement.

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

    We can also delete all the values in the table as the following query.

mysql> delete from student;
Query OK, 8 rows affected (0.00 sec)
    The above example will delete all the records from the student table.



others


        MySQL is the most popular open source database Management system. 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.


privacy policy     license     sitemap
© 2004-2005 HIOX INDIA - hioxindia.com

Other Links