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)
2018-01-08, 692👍, 0💬
Popular Posts:
Where to find answers to frequently asked questions on Oracle basic concepts? I am new to Oracle dat...
What Is Oracle in Oracle? Oracle is a company. Oracle is also a database server, which manages data ...
Where to find answers to frequently asked questions on Storage Engines: MyISAM, InnoDB and BDB in My...
How To Install PHP on Windows in MySQL? The best way to download and install PHP on Windows systems ...
What are single-byte character string data types supported in SQL Server Transact-SQL? Single-byte c...