Collections:
Deleting Existing Rows in MySQL
How To Delete Existing Rows in a Table in MySQL?
✍: FYIcenter.com
If you want to remove a row from a table, you can use the DELETE statement with a WHERE clause to identify the row. The following sample script deletes one row:
<?php include "mysql_connection.php"; $sql = "DELETE FROM fyi_links WHERE id = 1102"; if (mysql_query($sql, $con)) { print(mysql_affected_rows() . " rows deleted.\n"); } else { print("SQL statement failed.\n"); } mysql_close($con); ?>
If you run this script, you will get something like this:
1 rows deleted.
⇒ Quoting Text Values in MySQL
⇐ Updating Existing Rows in MySQL
2017-06-28, 1280👍, 0💬
Popular Posts:
How AdventureWorksLT tables are related in SQL Server? There are 12 user tables defined in Adventure...
Where to find tutorials to answer some frequently asked questions on Microsoft SQL Server Transact-S...
What Is a Dynamic Performance View in Oracle? Oracle contains a set of underlying views that are mai...
How To Convert a Unicode Strings to Non-Unicode Strings in SQL Server Transact-SQL? Since Unicode ch...
How To Convert Numeric Values to Integers in SQL Server Transact-SQL? Sometimes you need to round a ...