Here's the question:/* 6Write an UPDATE statement that modifies the InvoiceCopy table. Change TermsID to 2 for each invoice that's from a vendor with a DeaultTermsID of 2. Use a subquery.*/This is a similar example from the book:UPDATE InvoiceCopySET TermsID = 1WHERE VendorID = (SELECT VendorID FROM VendorCopy WHERE VendorName = 'Pacific Bell')
And, this is my answer: UPDATE InvoiceCopySET TermsID = 2WHERE VendorID = (SELECT VendorID FROM VendorCopy WHERE DefaultTermsID = 2)
But, I get the following error:Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
I understand that the subquery returns more than 1 value. But I don't see why this is a problem. The example from the book is nearly identical but the subquery does return one value. I guess I don't understand how to update multiple rows