![](https://static.wixstatic.com/media/11062b_fac51a38acf24ea2aa030216e01a0ea3f000.jpg/v1/fill/w_288,h_162,al_c,q_80,usm_0.66_1.00_0.01,blur_2,enc_auto/11062b_fac51a38acf24ea2aa030216e01a0ea3f000.jpg)
Syntax:
CHECK TABLE tbl_name [, tbl_name] ... [option] ...
option: {
FOR UPGRADE
| QUICK
| FAST
| MEDIUM
| EXTENDED
| CHANGED
}
CHECK TABLE checks a table or tables for errors. CHECK TABLE can also
check views for problems, such as tables that are referenced in the
view definition that no longer exist.
To check a table, you must have some privilege for it.
CHECK TABLE works for InnoDB, MyISAM, ARCHIVE, and CSV tables.
Before running CHECK TABLE on InnoDB tables, see
https://dev.mysql.com/doc/refman/8.0/en/check-table.html#check-table-in
nodb.
CHECK TABLE is supported for partitioned tables, and you can use ALTER
TABLE ... CHECK PARTITION to check one or more partitions; for more
information, see [HELP ALTER TABLE], and
https://dev.mysql.com/doc/refman/8.0/en/partitioning-maintenance.html.
CHECK TABLE ignores virtual generated columns that are not indexed.
URL: https://dev.mysql.com/doc/refman/8.0/en/check-table.html
Example