- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the use of CHECK TABLE statement in maintaining the MySQL tables?
There may be something wrong which can happen to the database server e.g., the server was shutdown unexpectedly, error while writing data to the hard disk, etc. These situations could make the database operate incorrectly and in the worst case, it can be crashed.
With the help of CHECK TABLE statement MySQL allows us to check the integrity of database tables. Its syntax would be as follows −
CHECK TABLE table_name
Here, table_name is the name of the table.
We are running 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)
- What is the use of OPTIMIZE TABLE statement in maintaining the MySQL tables?
- How ANALYZE TABLE statement helps in maintaining the MySQL tables?
- What is the use of MySQL IGNORE INSERT statement?
- What is the use of FLUSH PRIVILEGES statement in MySQL?
- What is the use of import statement in Python?
- How to check table status of the tables in a particular MySQL database?
- Using CREATE TABLE AS statement with UNION of two tables in MySQL
- What is the query to check Character set of the columns of MySQL table?
- What is the use of "assert" statement in Python?
- What is the use of ‘Using’ statement in C#?
- What is the use of NCHAR in MySQL?
- What is the default sort order in MySQL tables?
- How to use ALTER TABLE statement for changing the size of a column in MySQL?
- What is the use of setFetchSize() and setMaxRows() methods of the JDBC Statement Interface?
- What is the use of "from...import" Statement in Python?