# Data Definition (DDL)

- [Atomic DDL](/docs/server/reference/sql-statements/data-definition/atomic-ddl.md): Learn about crash-safe DDL operations in MariaDB. This feature ensures data definition statements are either fully committed or completely rolled back, preventing metadata inconsistency.
- [CONSTRAINT](/docs/server/reference/sql-statements/data-definition/constraint.md): Complete constraints reference: PRIMARY KEY, FOREIGN KEY, UNIQUE, and CHECK syntax in CREATE/ALTER TABLE, ON DELETE/UPDATE actions, TABLE\_CONSTRAINTS table.
- [RENAME TABLE](/docs/server/reference/sql-statements/data-definition/rename-table.md): Change the name of one or more tables atomically. This command moves tables within or between databases while preserving their data and structure.
- [Renaming Databases](/docs/server/reference/sql-statements/data-definition/renaming-databases.md): Learn the supported methods for renaming a database. Since RENAME DATABASE is not available, this guide outlines safe workarounds like dumping and reloading or moving tables.
- [ALTER](/docs/server/reference/sql-statements/data-definition/alter.md): Access the reference for ALTER statements. This section lists commands to modify existing database objects, including tables, databases, users, and servers.
- [ALTER DATABASE](/docs/server/reference/sql-statements/data-definition/alter/alter-database.md): Modify database characteristics. Learn how to change global properties like the default character set and collation for a specific database.
- [ALTER FUNCTION](/docs/server/reference/sql-statements/data-definition/alter/alter-function.md): Change stored function characteristics. This statement allows modifying the security context or comments of a stored function without dropping it.
- [ALTER LOGFILE GROUP](/docs/server/reference/sql-statements/data-definition/alter/alter-logfile-group.md): Understand the support status of this statement. Originally designed for NDB Cluster, it is not currently supported in MariaDB Server.
- [ALTER SERVER](/docs/server/reference/sql-statements/data-definition/alter/alter-server.md): Modify server definitions. Update connection information for external servers defined with CREATE SERVER, primarily used by the Federated engine.
- [ALTER TABLE](/docs/server/reference/sql-statements/data-definition/alter/alter-table.md): Complete ALTER TABLE guide for MariaDB. Complete syntax for modifying columns, indexes, constraints, and table properties with comprehensive examples and.
- [Online Schema Change](/docs/server/reference/sql-statements/data-definition/alter/alter-table/online-schema-change.md): Modify table structures. This guide covers adding columns, changing data types, managing indexes, and other schema changes for existing tables.
- [ALTER TABLESPACE](/docs/server/reference/sql-statements/data-definition/alter/alter-tablespace.md): Understand the status of tablespace management. This statement, originally for NDB, is not supported in MariaDB for InnoDB tablespaces.
- [CREATE](/docs/server/reference/sql-statements/data-definition/create.md): Explore the CREATE statements used to define new database objects. This guide covers syntax for creating databases, tables, indexes, views, and stored routines.
- [CREATE DATABASE](/docs/server/reference/sql-statements/data-definition/create/create-database.md): Complete reference for CREATE DATABASE in MariaDB. Complete syntax guide with all options, clauses, and practical examples with comprehensive examples and.
- [CREATE EVENT](/docs/server/reference/sql-statements/data-definition/create/create-event.md): Schedule a new event for automatic execution. This statement defines a scheduled task that runs SQL commands at specific times or intervals.
- [CREATE FUNCTION](/docs/server/reference/sql-statements/data-definition/create/create-function.md): Complete CREATE FUNCTION reference: OR REPLACE/IF NOT EXISTS, DEFINER/SQL SECURITY clauses, RETURNS type, DETERMINISTIC/NO SQL characteristics.
- [CREATE INDEX](/docs/server/reference/sql-statements/data-definition/create/create-index.md): Complete reference for CREATE INDEX in MariaDB. Complete syntax guide with all options, clauses, and practical examples with comprehensive examples and best.
- [CREATE LOGFILE GROUP](/docs/server/reference/sql-statements/data-definition/create/create-logfile-group.md): Create a log file group for NDB Cluster. This command allocates undo log space on disk for NDB Disk Data tables.
- [CREATE PACKAGE](/docs/server/reference/sql-statements/data-definition/create/create-package.md): Define the interface for a stored package. This Oracle-compatible statement declares the public variables and subroutines of a package.
- [CREATE PACKAGE BODY](/docs/server/reference/sql-statements/data-definition/create/create-package-body.md): Implement the logic for a stored package. This statement defines the private variables and code for the subroutines declared in the package specification.
- [CREATE SERVER](/docs/server/reference/sql-statements/data-definition/create/create-server.md): Define a connection to a remote server. This command registers server details for use with the FEDERATED or SPIDER storage engines.
- [CREATE TABLESPACE](/docs/server/reference/sql-statements/data-definition/create/create-tablespace.md): Create a tablespace for data storage. This command defines a physical file container for storing table data, primarily for InnoDB or NDB engines.
- [Generated Columns](/docs/server/reference/sql-statements/data-definition/create/generated-columns.md): Complete generated columns reference: VIRTUAL vs PERSISTENT/STORED syntax, CREATE/ALTER TABLE, index/foreign key constraints, sql\_mode consistency.
- [Invisible Columns](/docs/server/reference/sql-statements/data-definition/create/invisible-columns.md): Explains how to define columns that are hidden from wildcard SELECT queries but remain accessible when explicitly referenced, facilitating schema changes without breaking existing applications.
- [Silent Column Changes](/docs/server/reference/sql-statements/data-definition/create/silent-column-changes.md): Explore Silent Column Changes in MariaDB. Learn when the server automatically modifies column definitions or data types during table creation to ensure engine compatibility.
- [DROP](/docs/server/reference/sql-statements/data-definition/drop.md): Find statements to remove database objects. This section details the syntax for deleting databases, tables, users, and other entities when they are no longer needed.
- [DROP DATABASE](/docs/server/reference/sql-statements/data-definition/drop/drop-database.md): Complete guide to removing databases in MariaDB. Complete DROP DATABASE syntax with IF EXISTS, permissions, and recovery options for production use.
- [DROP EVENT](/docs/server/reference/sql-statements/data-definition/drop/drop-event.md): Remove a scheduled event from the server. This command stops the event from executing and deletes its definition from the system tables.
- [DROP INDEX](/docs/server/reference/sql-statements/data-definition/drop/drop-index.md): Remove an existing index from a table. This command deletes the index structure, potentially impacting query performance but freeing storage.
- [DROP LOGFILE GROUP](/docs/server/reference/sql-statements/data-definition/drop/drop-logfile-group.md): Remove a log file group. This statement, primarily for NDB Cluster, deletes the undo log files associated with the specified log file group.
- [DROP PACKAGE BODY](/docs/server/reference/sql-statements/data-definition/drop/drop-package-body.md): Delete the body of a stored package. This command removes the implementation logic while preserving the package specification and interface.
- [DROP PACKAGE](/docs/server/reference/sql-statements/data-definition/drop/drop-package.md): Remove a stored package completely. This command deletes both the package specification (interface) and its body (implementation) from the database.
- [DROP SERVER](/docs/server/reference/sql-statements/data-definition/drop/drop-server.md): Remove a server definition. This command deletes the connection details for a remote server used by the FEDERATED or SPIDER storage engines.
- [DROP TABLESPACE](/docs/server/reference/sql-statements/data-definition/drop/drop-tablespace.md): Delete a tablespace. This command removes the physical file container used for storing table data, applicable to engines like InnoDB or NDB.
- [DROP TRIGGER](/docs/server/reference/sql-statements/data-definition/drop/drop-trigger.md): Remove a trigger from a table. This command deletes the trigger definition, preventing it from firing on future INSERT, UPDATE, or DELETE events.
