- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
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)
- Related Articles
- 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 FLUSH PRIVILEGES statement in MySQL?
- What is the use of MySQL IGNORE INSERT statement?
- 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
- How to use ALTER TABLE statement for changing the size of a column in MySQL?
- What is the use of the WITH statement in Python?
- What is the use of import statement in Python?
- What is the use of "assert" statement in Python?
- What is the use of ‘Using’ statement in C#?
- What is the query to check Character set of the columns of MySQL table?
- What is the use of "from...import" Statement in Python?
- What is the use of "from...import *" Statement in Python?
- What is the default sort order in MySQL tables?