No way to use TSQL Output with normal foreign key constraints?

前端 未结 4 1948
野的像风
野的像风 2021-01-18 06:30

The following snippet fails with error:

The target table \'dbo.forn\' of the OUTPUT INTO clause cannot be on either side of a (primary key, foreign ke

4条回答
  •  梦谈多话
    2021-01-18 06:56

    Normally you output to a table variable or temp table, then use that to insert to the final table.

提交回复
热议问题