Explicit value inserted into the SQL Server

xiaoxiao2021-03-05  21

grammar

Set Identity_Insert [Database]] {TABLE} {on | OFF}

parameter

Database

It is the database name that the specified table resides.

Owner

It is the name of the table owner.

TABLE

It is a table name containing the identity column.

Comment

At any time, only one Identity_Isert property of only one table in the session is set to ON. If a table has set this property to ON, and the SETITENTITY_INSERT ON statement is sent to another table, Microsoft® SQL ServerTM returns an error message, indicating that set Identity_Insert is set to ON and report this property is set to ON. Table.

If the insert value is greater than the current identification value of the table, the SQL Server automatically uses the new insert value as the current identifier value.

Set Identity_INSERT settings are set when executed or runtime, not when analyzing.

Authority

Permissions The default grants sysadmin fixed server roles and DB_WNER and DB_DDLADMIN fixed database roles and object owners.

转载请注明原文地址:https://www.9cbs.com/read-34779.html

New Post(0)