CREATE
TABLE [tbl1](
[ID] [int] IDENTITY(1,1)
NOT NULL,
[F1] [int] NULL,
CONSTRAINT [PK_tbl1]
PRIMARY KEY
CLUSTERED
(
[ID] ASC
)
)
ON [PRIMARY]
GO
CREATE
TABLE [tbl2](
[ID] [int] NOT NULL,
[f2] [int] NULL,
CONSTRAINT [PK_tbl2]
PRIMARY KEY
CLUSTERED
(
[ID] ASC
)
)
ON [PRIMARY]
GO
CREATE
VIEW [View_1]
AS
SELECT
tbl1.ID, tbl1.F1, tbl2.f2
FROM
tbl1 LEFT OUTER
JOIN
tbl2 ON tbl1.ID
= tbl2.ID
GO
INSERT
INTO [BackUpsData].[dbo].[View_1]
([F1],[f2])
VALUES(1,1)
i get this message :
Msg 4405, Level 16, State 1, Line 1
View or function 'View_1' is not updatable because the modification affects multiple base tables.
how can i create a view that can insert new rows into ?
thanks.
View Complete Post