Table Statements

Learn about table-related SQL statements in MariaDB Server. This section covers commands for creating, altering, dropping, and manipulating tables, essential for managing your database schema.

Access the reference for ALTER statements. This section lists commands to modify existing database objects, including tables, databases, users, and servers.

Complete ALTER TABLE guide for MariaDB. Complete syntax for modifying columns, indexes, constraints, and table properties with comprehensive examples.

Analyze and store key distribution. This statement updates index statistics used by the optimizer to choose the best execution plan.

Check tables or views for errors. This statement verifies the integrity of table structure and data for supported storage engines.

Verify the validity of a view's algorithm. This statement checks if the view definition is correct and references existing tables.

Report a checksum for table contents. This statement calculates a value to compare tables, useful for verifying replication consistency.

Complete guide to creating tables in MariaDB. Complete CREATE TABLE syntax for data types, constraints, indexes, and storage engines for production use.

Complete guide to deleting data in MariaDB. Complete DELETE syntax with WHERE filtering, JOIN operations, and safety considerations for production use.

Complete DROP TABLE syntax: TEMPORARY, IF EXISTS, WAIT/NOWAIT, RESTRICT/CASCADE options, metadata locks, atomic DROP, and replication behavior.

Complete guide to inserting data in MariaDB. Complete INSERT syntax for single rows, bulk operations, and ON DUPLICATE KEY handling for production use.

Complete MariaDB performance optimization guide. Complete reference for query tuning, indexing strategies, and configuration improvements for production use.

Change the name of one or more tables atomically. This command moves tables within or between databases while preserving their data and structure.

Repair corrupted tables. This statement fixes errors in tables for supported storage engines like MyISAM, Aria, and Archive.

Check and correct a view's algorithm. This statement is primarily used by upgrade scripts to ensure view definitions are compatible.

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.

Complete guide to displaying table columns in MariaDB. Complete SHOW COLUMNS syntax with field types, keys, and filtering options for production use.

Get the SQL statement to recreate a table. This statement shows the complete CREATE TABLE syntax, including column definitions and indexes.

Complete SHOW INDEX reference: SHOW INDEX FROM tbl_name syntax, output fields, and WHERE/LIKE filters.

Complete TRUNCATE TABLE reference with [WAIT n|NOWAIT] syntax, InnoDB FOREIGN KEY constraints, implicit commit, and AUTO_INCREMENT reset.

Complete UPDATE statement guide for MariaDB. Complete syntax reference with WHERE conditions, JOIN operations, and multi-table updates for production use.

Last updated

Was this helpful?