In the INSERT statement that follows, assume that all of the table and column names are spelled correctly, that none of the columns are identity columns, and that none of them have default values or accept null values. What’s wrong with the statement?

Respuesta :

Answer:

The number of items in the column list doesn't match the number in the VALUES list.

Explanation:

The statement is:

INSERT INTO InvoiceCopy

(VendorID, InvoiceNumber, InvoiceTotal, PaymentTotal, CreditTotal,

TermsID, InvoiceDate, InvoiceDueDate)

VALUES

(97, '456789', 8344.50, 0, 0, 1, '2016-08-01');

As clearly seen, there are 8 number of items (VendorID, InvoiceNumber, InvoiceTotal, PaymentTotal, CreditTotal,  TermsID, InvoiceDate, InvoiceDueDate) but there are only 7 items in the values list.

Assuming the conditions given are true, it is seen the number of items in the column list does not match that of the values list, which identifies as a fault.

ACCESS MORE
EDU ACCESS