#The database server may have some problems, such as unexpected server shutdown, errors when writing data to the hard disk, etc. These conditions can cause the database to operate incorrectly, and in the worst case scenario, it can crash.
With the CHECK TABLE statement MySQL allows us to check the integrity of the database table. Its syntax is as follows -
CHECK TABLE table_name
Here, table_name is the name of the table.
We run this statement for the table Student_info as follows -
mysql> CHECK table student_info\G *************************** 1. row *************************** Table: query.student_info Op: check Msg_type: status Msg_text: OK 1 row in set (0.00 sec)
The above is the detailed content of What is the use of the CHECK TABLE statement when maintaining MySQL tables?. For more information, please follow other related articles on the PHP Chinese website!