# Table Statements

{% columns %}
{% column %}
{% content-ref url="data-definition/alter" %}
[alter](https://mariadb.com/docs/server/reference/sql-statements/data-definition/alter)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Access the reference for `ALTER` statements. This section lists commands to modify existing database objects, including tables, databases, users, and servers.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="data-definition/alter/alter-table" %}
[alter-table](https://mariadb.com/docs/server/reference/sql-statements/data-definition/alter/alter-table)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Complete `ALTER TABLE` guide for MariaDB. Complete syntax for modifying columns, indexes, constraints, and table properties with comprehensive examples.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="table-statements/analyze-table" %}
[analyze-table](https://mariadb.com/docs/server/reference/sql-statements/table-statements/analyze-table)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Analyze and store key distribution. This statement updates index statistics used by the optimizer to choose the best execution plan.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="table-statements/check-table" %}
[check-table](https://mariadb.com/docs/server/reference/sql-statements/table-statements/check-table)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Check tables or views for errors. This statement verifies the integrity of table structure and data for supported storage engines.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="table-statements/check-view" %}
[check-view](https://mariadb.com/docs/server/reference/sql-statements/table-statements/check-view)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Verify the validity of a view's algorithm. This statement checks if the view definition is correct and references existing tables.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="table-statements/checksum-table" %}
[checksum-table](https://mariadb.com/docs/server/reference/sql-statements/table-statements/checksum-table)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Report a checksum for table contents. This statement calculates a value to compare tables, useful for verifying replication consistency.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="../../server-usage/tables/create-table" %}
[create-table](https://mariadb.com/docs/server/server-usage/tables/create-table)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Complete guide to creating tables in MariaDB. Complete `CREATE TABLE` syntax for data types, constraints, indexes, and storage engines for production use.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="data-manipulation/changing-deleting-data/delete" %}
[delete](https://mariadb.com/docs/server/reference/sql-statements/data-manipulation/changing-deleting-data/delete)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Complete guide to deleting data in MariaDB. Complete `DELETE` syntax with `WHERE` filtering, `JOIN` operations, and safety considerations for production use.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="../../server-usage/tables/drop-table" %}
[drop-table](https://mariadb.com/docs/server/server-usage/tables/drop-table)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Complete `DROP TABLE` syntax: `TEMPORARY`, `IF EXISTS`, `WAIT`/`NOWAIT`, `RESTRICT`/`CASCADE` options, metadata locks, atomic `DROP`, and replication behavior.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="data-manipulation/inserting-loading-data/insert" %}
[insert](https://mariadb.com/docs/server/reference/sql-statements/data-manipulation/inserting-loading-data/insert)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Complete guide to inserting data in MariaDB. Complete `INSERT` syntax for single rows, bulk operations, and `ON DUPLICATE KEY` handling for production use.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="../../ha-and-performance/optimization-and-tuning/optimizing-tables/optimize-table" %}
[optimize-table](https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/optimizing-tables/optimize-table)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Complete MariaDB performance optimization guide. Complete reference for query tuning, indexing strategies, and configuration improvements for production use.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="data-definition/rename-table" %}
[rename-table](https://mariadb.com/docs/server/reference/sql-statements/data-definition/rename-table)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Change the name of one or more tables atomically. This command moves tables within or between databases while preserving their data and structure.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="table-statements/repair-table" %}
[repair-table](https://mariadb.com/docs/server/reference/sql-statements/table-statements/repair-table)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Repair corrupted tables. This statement fixes errors in tables for supported storage engines like MyISAM, Aria, and Archive.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="table-statements/repair-view" %}
[repair-view](https://mariadb.com/docs/server/reference/sql-statements/table-statements/repair-view)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Check and correct a view's algorithm. This statement is primarily used by upgrade scripts to ensure view definitions are compatible.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="data-manipulation/changing-deleting-data/replace" %}
[replace](https://mariadb.com/docs/server/reference/sql-statements/data-manipulation/changing-deleting-data/replace)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Insert or replace rows based on unique keys. This statement acts like `INSERT`, but if a duplicate key exists, it deletes the old row and inserts the new one.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="administrative-sql-statements/show/show-columns" %}
[show-columns](https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-columns)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Complete guide to displaying table columns in MariaDB. Complete `SHOW COLUMNS` syntax with field types, keys, and filtering options for production use.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="administrative-sql-statements/show/show-create-table" %}
[show-create-table](https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-table)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Get the SQL statement to recreate a table. This statement shows the complete `CREATE TABLE` syntax, including column definitions and indexes.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="administrative-sql-statements/show/show-index" %}
[show-index](https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-index)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Complete `SHOW INDEX` reference: ` SHOW INDEX FROM`` `` `*`tbl_name`* syntax, output fields, and `WHERE`/`LIKE` filters.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="table-statements/truncate-table" %}
[truncate-table](https://mariadb.com/docs/server/reference/sql-statements/table-statements/truncate-table)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Complete `TRUNCATE TABLE` reference with `[WAIT n|NOWAIT]` syntax, InnoDB `FOREIGN KEY` constraints, implicit commit, and `AUTO_INCREMENT` reset.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="data-manipulation/changing-deleting-data/update" %}
[update](https://mariadb.com/docs/server/reference/sql-statements/data-manipulation/changing-deleting-data/update)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Complete `UPDATE` statement guide for MariaDB. Complete syntax reference with `WHERE` conditions, `JOIN` operations, and multi-table updates for production use.
{% endcolumn %}
{% endcolumns %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/reference/sql-statements/table-statements.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
