tailieunhanh - Instructor Inputs - Session 12

Tham khảo sách 'instructor inputs - session 12', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Instructor Inputs Session 12 Solutions to Exercises This session includes exercises of Chapter 6 Chapter 7 and additional exercises. Chapter 6 Exercise 4 A view has been defined as follows CREATE VIEW vwSalesOrderDetail AS SELECT TerritorylD TotalDue OrderQty ProductID FROM oh JOIN od ON The following update command gives an error when you update the OrderQty and TerritoryID attributes UPDATE vwSalesOrderDetail SET OrderQty 2 TerritoryID 4 FROM vwSalesOrderDetail WHERE SalesOrderID 43659 Identify the problem and provide the solution. Solution Since view contains the data from two tables it is not possible to modify the data of two tables through a view in a single Update statement. To solve the problem you need to execute two Update statements as follows UPDATE vwSalesOrderDetail SET OrderQty 2 FROM vwSalesOrderDetail WHERE SalesOrderID 43659 UPDATE vwSalesOrderDetail SET TerritoryID 4 FROM vwSalesOrderDetail WHERE SalesOrderID 43659 NIIT Instructor Inputs .

TÀI LIỆU LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.