Icon REPAIR TABLE Statement

Introduction
The SQL REPAIR TABLE statement is used to repair a table that is corrupted or suspected of being corrupted.

Syntax
REPAIR TABLE [IF EXISTS] table_reference

FORCEINDEXREBUILD

Use the REPAIR TABLE statement to repair the physical structure of a table that is corrupted or suspected of being corrupted.

FORCEINDEXREBUILD Clause
Use the FORCEINDEXREBUILD clause to force the indexes in the table to be rebuilt regardless of whether they are determined to be corrupted or not. Sometimes there is corruption in indexes that DBISAM cannot detect in the table verification or repair process, and this clause will resolve such an issue.

The statement below repairs a table:

REPAIR TABLE Employee

You can use the VERIFY TABLE SQL statement to verify a table and determine if it is corrupted.

Please see the Verifying and Repairing Tables topic for more information on repairing tables.
Image