MySQL DELETE Query | Coding Tag

MySQL Delete Query


MySQL Delete Data: 'DELETE' statement is used to delete the data from the database.

$sql="DELETE FROM table_name WHERE id=1";
$result= mysql_query($sql);
echo "Data Deleted Successfully";

Here "WHERE" clause is used to define the particular data which you want to delete ('id' is the column name in the table which is unique).

If you do not use the 'Where' clause, then all the data from the table will be deleted. You can also use any column like 'name, email-id etc.' to signify the WHERE clause

Best WordPress Hosting


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price

Leave a Reply

    Waiting for your comments