INSERT with DEFAULT VALUES (SQL Standard)
INSERT with DEFAULT VALUES (SQL Standard) is a SQL statement in the DML Statements category. Inserts a single row with all default values. Useful for tables where all columns have defaults, like auto-ID and timestamp. The syntax is INSERT INTO table DEFAULT VALUES;. It returns default row inserted. A typical example: CREATE TABLE audit_log ( id INT AUTO_INCREMENT PRIMARY KEY, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, server_name VARCHAR(100) DEFAULT @@hostname ); INSERT INTO audit_log DEFAULT VALUES; -- Creates a row with: -- id = (auto), created_at = NOW(), server_name = 'SERVER1' -- PostgreSQL/MariaDB/Oracle all support DEFAULT VALUES -- SQL Server: use DEFAULT VALUES or omit columns A close relative is INSERT INTO, which inserts new rows into a table. A close relative is UPDATE, which modifies existing rows in a table. Always use WHERE to avoid updating all rows. A close relative is DELETE, which removes rows from a table. Always use WHERE to avoid deleting all rows.