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
alexa is scanning a photograph whitch mode should she use A green tone B blue tone C greyscale D sepia ​
shepuryov [24]

Answer:

grey scale......................

6 0
2 years ago
Read 2 more answers
What type of software can Agile and DevOps be applied
AnnyKZ [126]

Answer:

STATA AND SPSS

Explanation:

these are mostly widely used statistical package in modern statistical calculations. it is minimizes times and as well as resources.

4 0
1 year ago
Which of the following is a definition of a conventions
laiz [17]
Need more information
6 0
3 years ago
Read 2 more answers
Ideas on what will happen in season 6 of fortnite?
My name is Ann [436]

Answer:

I think It will be the same as season 5.

Explanation:

6 0
2 years ago
Read 2 more answers
Principles of Responsible Artificial Intelligence (AI)?
melamori03 [73]

Answer:

Their principles underscore fairness, transparency and explainability, human-centeredness, and privacy and security.

Explanation:

3 0
2 years ago
Other questions:
  • About ___% of children score within one standard deviation above or below the national average in intelligence.
    5·1 answer
  • When it comes to social media technologies and formal learning in the corporate environment, the only social media platform that
    9·1 answer
  • In mathematics, the factorial of a positive integer n, denoted as n! , is the product of all positive integers less than or equa
    10·2 answers
  • You're browsing the Internet and realize your browser is not responding. Which of the following will allow you to immediately ex
    5·2 answers
  • When working in Excel Online, you decide that the data in column C is not needed at the current time but might be useful later.
    6·2 answers
  • Andy, a developer, is designing a new program. Which tool should Andy use to help him complete his task?
    13·1 answer
  • 19. Fair use applies to which of the following situations?
    14·1 answer
  • Trish bought a new computer that she has been using for a few weeks. She is starting to experience pain in her wrists, back and
    9·2 answers
  • A(n) ___ is an action that causes something to happen.
    12·1 answer
  • Programs that do the same thing every time they run are called...
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!