Parallelism

statements
#tsql#statements

The whole operation is atomic. Either both the

statement and the nested DML

statement that contains the

clause execute, or the whole statement fails.

The following restrictions apply to the target of the outer

statement:

The target can’t be a remote table, view, or common table expression.

The target can’t have a

constraint, or be referenced by a

constraint.

Triggers can’t be defined on the target.

The target can’t participate in merge replication or updatable subscriptions for

transactional replication.

The following restrictions apply to the nested DML statement:

The target can’t be a remote table or partitioned view.

The source itself can’t contain a

clause.

The

clause isn’t supported in

statements that contain a

clause.

returns the rows inserted only by the outer

statement.

,

, and

return identity values generated only by

the nested DML statement, and not values generated by the outer

statement.

Query notifications treat the statement as a single entity, and the type of any message

that is created is the type of the nested DML, even if the significant change is from the

outer

statement itself.

In the

clause, the

and

clauses can’t include subqueries,

aggregate functions, ranking functions, full-text predicates, user-defined functions that

perform data access, or the

function.

An

clause that returns results to the client, or table variable, always uses a serial plan.

In the context of a database set to compatibility level 130 or higher, if an

operation uses a

hint for the

statement and also uses

to

insert into a temporary or user table, then the target table for the

is eligible

nvarchar(max)

varchar(max)

varbinary(max)

nvarchar(max)

varchar(max)

varbinary(max)

INSERT

OUTPUT

INSERT

FOREIGN KEY
FOREIGN KEY
<dml_table_source>
OUTPUT INTO

INSERT

<dml_table_source>
@@ROWCOUNT

INSERT

@@IDENTITY

SCOPE_IDENTITY

IDENT_CURRENT

INSERT

INSERT

<dml_table_source>

SELECT

WHERE

TEXTPTR()

OUTPUT

INSERT.SELECT

WITH (TABLOCK)

SELECT

OUTPUT.INTO

INSERT.SELECT