The keyword can also be used in normal insertion to explicitly fill a column using that column's default value: INSERT INTO phone_book VALUES ( DEFAULT, '555-1212' ) What happens when a column does not specify a default value is database dependent. For example, MySQL and SQLite will fill in with a blank value (except when in strict mode), while many other databases will reject the statement. Retrieving the key Database designers that use a surrogate key as the primary key for every table will run into the occasional scenario where they need to automatically retrieve the database-generated primary key from an SQL statement for use in other SQL statements. Most systems do not allow SQL statements to return row data. Therefore, it becomes necessary to implement a workaround in such scenarios. Common implementations include: Using a database-specific stored procedure that generates the surrogate key, performs the operation, and finally returns the generated key. For example, in Microsoft SQL Server, the key is retrieved via the special function, while in SQLite the function is named . Using a database-specific statement on a temporary table containing last inserted row(s). Db2 implements this feature in the following way: SELECT * FROM NEW TABLE ( INSERT INTO phone_book VALUES ( 'Peter Doe','555-2323' ) ) AS t Db2 for z/OS implements this feature in the following way. SELECT EMPNO, HIRETYPE, HIREDATE FROM FINAL TABLE ( INSERT INTO EMPSAMP (NAME, SALARY, DEPTNO, LEVEL) VALUES('Mary Smith', 35000.00, 11, 'Associate') ); Using a statement after the statement with a database-specific function that returns the generated primary key for the most recently inserted row. For example, for MySQL. Using a unique combination of elements from the original SQL in a subsequent statement. Using a GUID in the SQL statement and retrieving it in a statement. Using the clause in the SQL statement for MS-SQL Server 2005 and MS-SQL Server 2008. Using an statement with clause for Oracle. INSERT INTO phone_book VALUES ( 'Peter Doe','555-2323' ) RETURNING phone_book_id INTO v_pb_id Using an statement with clause for PostgreSQL (since 8.2). The returned list is identical to the result of a . Firebird has the same syntax in Data Modification Language statements (DSQL); the statement may add at most one row. In stored procedures, triggers and execution blocks (PSQL) the aforementioned Oracle syntax is used. INSERT INTO phone_book VALUES ( 'Peter Doe','555-2323' ) RETURNING phone_book_id Using the function in H2 returns the