1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Paul [167]
3 years ago
9

In the INSERT statement that follows, assume that all of the table and column names are spelled correctly, that none of the colu

mns are identity columns, and that none of them have default values or accept null values. What’s wrong with the statement? INSERT INTO InvoiceCopy (VendorID, InvoiceNumber, InvoiceTotal, PaymentTotal, CreditTotal, TermsID, InvoiceDate, InvoiceDueDate) VALUES (97, '456789', 8344.50, 0, 0, 1, '2016-08-01');A) The column names in the column list are in the wrong sequence.B) The values are in the wrong sequence.C) There are zeroes in the VALUES list.D) The number of items in the column list doesn't match the number in the VALUES list.
Computers and Technology
1 answer:
nlexa [21]3 years ago
4 0

Answer:

The correct answer is

D. <em>The number of items in the column list doesn't match the number in the VALUES list.</em>

Explanation:

When performing an insert action, the number of values to be inserted into each columns Must match the number of the columns that have been mentioned.

Now let us look at the question as given:

<em>INSERT INTO InvoiceCopy (VendorID, InvoiceNumber, InvoiceTotal, PaymentTotal, CreditTotal, TermsID, InvoiceDate, InvoiceDueDate) VALUES (97, '456789', 8344.50, 0, 0, 1, '2016-08-01')</em>

From the insert statement above, we have declared the system to insert into 8 columns( <em>VendorID, InvoiceNumber, InvoiceTotal, PaymentTotal, CreditTotal, TermsID, InvoiceDate, InvoiceDueDate)</em> of the table <em>InvoiceCopy,</em> but the number of values to be inserted into each column respectiveley is 7.  So the statement will try to insert value 97 into column <em>VendorID, Value 456789 </em>into <em>column InvoiceNumber, Value 8344.50 into InvoiceTotal, Value 0 </em>into <em>column PaymentTotal, Value 0, </em>into <em>Column CreditTotal, Value 1, </em>into <em>Column  TermsID, Value '2016-08-01' </em>into <em>Column   InvoiceDate, But </em><em>null</em><em> will be inserted </em>into <em>Column InvoiceDueDate, However, the </em><em>Question states that None of these columns Accept Null Values. </em>This means that we have to specify values for EVERY column we want to insert into. Because of this number mismatch, the computer will throw an error. This is what is Wrong with the statement.

An insert statement is used to add new values to a database. When performing an insert statement, there are 3 main information that needs to be defined:

  1. The name of the table that the new data is being inserted into
  2. The name of the columns that you want to insert the values into
  3. The actual values that you want to add to the columns mentioned in (2) above.

The basic syntax of an insert statement is as follows:

INSERT INTO table_name (column1_name, column2_name, ...)

 VALUES (data_for_column1, data_for_column2, ...);

You might be interested in
In UML behavioral modeling, a message is _____. (Points : 6) a named location in memory where information is deposited and retri
rusak2 [61]

Answer: a function or procedure call from one object to another object

Explanation: UML(Unified Modeling language) behavioral modeling is the depiction of the relation of the elements in a dynamic manner and the dependency on time .Message in the UML behavioral modeling is a functional call taking place from one element to another.

The interaction is the model is seen through the flow of messages.Other options are incorrect because message is not information holding data structure, does not display the relation between object rather presents the flow and is not a memory location .

7 0
3 years ago
Why won't it let me submit my question
iVinArrow [24]

Answer:

what was the question?

Explanation:

8 0
3 years ago
Here is over 40pts as Promised? :)<br> Who invented the Lamborghini?
nordsb [41]

Ferruccio Lamborghini

He is the creator/inventor of the Lamborghini.

3 0
4 years ago
Read 2 more answers
What is the small window that pops up in a application that requieres a response for the user
Marina CMI [18]

Answer:

that is called a popup box. or a alert box

assuming you are talking about this

3 0
3 years ago
Read 2 more answers
Different ____________ are assigned to track multiple reviewers of a document.
Lemur [1.5K]
It could be c or d because when you are chatting to someone through say Skype you use fonts and colors to identify who you are talking to. But in most cases it would be d
3 0
3 years ago
Other questions:
  • The ____ problem-solving cycle involves inputting code to an assembler, translating it to machine language, loading it into a Vo
    10·1 answer
  • Sometimes we write similar letters to different people. For example, you might write to your parents to tell them about your cla
    9·1 answer
  • To move one screen to the left press ____.
    9·1 answer
  • What does this mean?
    11·2 answers
  • A user on a home network needs to boost the signal of the wireless router. What should the user purchase to accomplish this?
    14·1 answer
  • Which of the following can a cell contain?
    9·2 answers
  • What is one advantage of top-down programming design?
    8·1 answer
  • What is the best way of farming exotics in destiny?
    12·2 answers
  • Go to this link: https://platform.breakoutedu.com/game/play/going-buggy-78#
    8·1 answer
  • Which is an advantage of using a flat file instead of a relational database?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!