DEFAULT
DEFAULT is a SQL statement in the Constraints category. Sets a default value for a column when no value is provided in INSERT. The syntax is column type DEFAULT default_value. It returns default value. A typical example: CREATE TABLE users ( created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, is_active BOOLEAN DEFAULT TRUE, role VARCHAR(20) DEFAULT 'user' ); A close relative is PRIMARY KEY, which a column or set of columns that uniquely identifies each row. Only one PK per table. Automatically creates a unique index. A close relative is FOREIGN KEY, which ensures referential integrity: values in this column must exist in the referenced parent table. A close relative is UNIQUE, which ensures all values in a column (or combination) are unique across the table. Allows NULLs (multiple NULLs allowed). More about this category: Table constraints — PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, CHECK, DEFAULT. Related Constraints entries: PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, CHECK, EXCLUDE CONSTRAINT, PRIMARY KEY (Composite), FOREIGN KEY ON DELETE SET NULL.