Unable to perform delete on View SQL Server 2005

后端 未结 3 767
时光说笑
时光说笑 2021-01-29 05:01

I am unable to perform a delete on a View. Everything worked fine on the individual tables.

EDIT1: Added Trigger

CREATE TRIGGER myTrigger
ON [ViewName]
I         


        
3条回答
  •  一整个雨季
    2021-01-29 05:14

    DELETE command: http://msdn.microsoft.com/en-us/library/ms189835.aspx

    The view referenced by table_or_view_name must be updatable and reference exactly one base table in the FROM clause of the view. For more information about updatable views, see CREATE VIEW (Transact-SQL).

    CREATE VIEW command, Updatable Views: http://msdn.microsoft.com/en-us/library/ms187956.aspx

    Any modifications, including UPDATE, INSERT, and DELETE statements, must reference columns from only one base table.

提交回复
热议问题