sql_auto_is_null is used by some special drivers, such as ODBC, to specify whether to obtain the auto-increment column value of the last inserted row.
| Attribute | Description |
|---|---|
| Type | Boolean |
| Default value | OFF |
| Value range | |
| Effective scope | |
| Involved in serialization | Yes |
| Plan generation affected | Yes |
If sql_auto_is_null is set to ON, it is equivalent to the following two statements:
// CREATE TABLE t1 (auto_inc_column auto_increment, j int);
obclient> SELECT * FROM t1 WHERE auto_inc_column is null;
obclient> SELECT * FROM t1 WHERE auto_inc_column = last_insert_id();