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
is this statement true or false ? satelite and remote sensing devices have helped cartographers make more accurate maps with spe
Genrish500 [490]

Answer:

Yes this statement is true

Explanation:

Satelites help show a visual to cartographers to make more accurate maps easier.

3 0
3 years ago
When listing columns in the select list, what should you use to separate the columns?
Gala2k [10]
The answer is commas.  <span>When listing columns in the select list, commas should be used to separate the columns.</span>
6 0
3 years ago
Which type of computer are todays most widely used personal computers?
iris [78.8K]

Answer:

Windows 10. :)

Explanation:

8 0
3 years ago
Read 2 more answers
A camera on a tripod shows the ground floor of a skyscraper and then moves upward to show its entire length. what camera movemen
scZoUnD [109]

Answer:

A pedestal. It involves moving the camera upwards or downwards in relation to a subject.

8 0
2 years ago
What are the consequences of having unprotected Linux operating systems installed on embedded systems?
Gennadij [26K]

Answer:

highly venerable to external attacks

Explanation:

Embedded systems are the type of computer systems that are specially designed having hardware and software components plus programmable  capabilities embedded into the hardware itself.

These computer systems are motorized by dedicated computer hardware chips made by companies such as Broadcom, Qualcomm, and Marvell. These chips are cheap which also means that they’re highly vulnerable, and the profit margins slim. They normally put a version of the Linux operating system onto the chips, lumping it up with some other bunch of open-source and proprietary components and drivers. With little or no technical engineering work before shipping, and there's little enticement to update their "board support package" until there’s probably a very good reason for it.

6 0
3 years ago
Other questions:
  • Below is a chart representing portions of resumes from 3 applicants. Which best explains the applicants careers?
    11·1 answer
  • Universal containers wants to rollout new product bundles with several pricing options. Pricing options include product-price bu
    5·1 answer
  • Draw the cache tables and the state of all bits within them. Suppose you have a 16 byte cache with 2 byte long cachelines that i
    6·1 answer
  • A(n) __________ employs a method called "tunneling" in which each packet from the sending computer is encapsulated within anothe
    8·1 answer
  • When was unicode invented?
    13·1 answer
  • In which of the following situations should you expect to provide your Social Security number?
    13·1 answer
  • D State Six Impact of ICT the society​
    7·1 answer
  • What is meant by byte in computer terminology​
    6·2 answers
  • Write a function sumOfMultiples, that inputs two integers - seed and cap. The function should return the sum of all the multiple
    6·1 answer
  • 8. What is the order of growth execution time of the push operation when using the LinkedStack class, assuming a stack size of N
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!