TSQL is expecting the identity column to be inserted when using an instead of insert trigger
- 阅读更多 关于 TSQL is expecting the identity column to be inserted when using an instead of insert trigger
问题 I'm setting up a view (foo), in place of a table with the same name. The new view will use 3 sub-tables (A, B, C) instead of the original table. I'm using instead-of triggers to accomplish this. CREATE VIEW [dbo].[foo] AS select b2 as oldkey, b3 as boat, c2 as state, a2 as name from A join B on a1 = b1 join C on a1 = c1 foo columns : oldkey (identity) | boat | state | name My issue is that I have a large code base that is written to insert into foo as follows: insert into foo values ('fishing