IDENTITY_INSERT option

Function

Enables users to insert values into or to update an IDENTITY or AUTOINCREMENT column.

Allowed values

= 'tablename'

Scope

Can only be set temporary (for a connection), for a user, or for the PUBLIC group. Takes effect immediately.

Default

Option not set.

Description

When option is set, insert/update is enabled. A table name must be specified to identify the column to insert or update. If you are not the table owner, qualify the table name with the owner name.

Example

For example, if you use the table employees to run explicit inserts:

SET TEMPORARY OPTION IDENTITY_INSERT = 'employees'

To turn the option off, specify the equals sign and a set of single quotation marks that enclose a blank space:

SET TEMPORARY OPTION IDENTITY_INSERT = ' '

See also

“QUERY_PLAN option”