Collections:
Deleting an Existing Row from a Table in MySQL
How To Delete an Existing Row from a Table in MySQL?
✍: FYIcenter.com
If you want to delete an existing row from a table, you can use the DELETE statement with a WHERE clause to identify that row. Here is good sample of DELETE statements:
mysql> INSERT INTO fyi_links (url, id)
VALUES ('www.myspace.com', 301);
Query OK, 1 row affected (0.00 sec)
mysql> SELECT id, url, notes, counts FROM fyi_links
WHERE id = 301;
+-----+-----------------+-------+--------+
| id | url | notes | counts |
+-----+-----------------+-------+--------+
| 301 | www.myspace.com | NULL | NULL |
+-----+-----------------+-------+--------+
1 row in set (0.00 sec)
mysql> DELETE FROM fyi_links WHERE id = 301;
Query OK, 1 row affected (0.00 sec)
mysql> SELECT id, url, notes, counts FROM fyi_links
WHERE id = 301;
Empty set (0.00 sec)
⇒ Deleting Multiple Rows from a Table in MySQL
⇐ Error: Subquery Returns More than 1 Row in MySQL
2018-01-08, 2984🔥, 0💬
Popular Posts:
How To Fix the INSERT Command Denied Error in MySQL? The reason for getting the "1142: INSERT comman...
How To Concatenate Two Character Strings Together in SQL Server Transact-SQL? Concatenating two char...
How To Convert Binary Strings into Integers in SQL Server Transact-SQL? Binary strings and integers ...
How to detect the collation coercibility associated to a given character string using the COERCIBILI...
How To Drop an Index in Oracle? If you don't need an existing index any more, you should delete it w...