Collections:
Deleting All Rows in a Table in MySQL
How To Delete All Rows in a Table in MySQL?
✍: FYIcenter.com
If you want to delete all rows from a table, you have two options:
The TRUNCATE statement is more efficient the DELETE statement. The tutorial exercise shows you a good example of TRUNCATE statement:
mysql> SELECT COUNT(*) FROM fyi_links; +----------+ | COUNT(*) | +----------+ | 5 | +----------+ 1 row in set (0.08 sec) mysql> TRUNCATE TABLE fyi_links; Query OK, 0 rows affected (0.02 sec) mysql> SELECT COUNT(*) FROM fyi_links; +----------+ | COUNT(*) | +----------+ | 0 | +----------+ 1 row in set (0.00 sec)
⇒ SELECT Query Statements with GROUP BY in MySQL
⇐ Deleting Multiple Rows from a Table in MySQL
2018-01-08, 2456🔥, 0💬
Popular Posts:
What Happens If the UPDATE Subquery Returns Multiple Rows in SQL Server? If a subquery is used in a ...
How To Change the Password for Your Own User Account in MySQL? If you want to change the password of...
What Happens to Your Transactions When ERROR 1213 Occurred in MySQL? If your transaction receives th...
How to download and install Microsoft SQL Server Management Studio Express in SQL Server? Microsoft ...
How To Revise and Re-Run the Last SQL Command in Oracle? If executed a long SQL statement, found a m...