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
What is bug in computer?​
Anton [14]

Answer:

<h2>A bug in a computer is refered to as a "computer virus" its where certain things on the computer or apps on it aren't working like they were designed to. </h2>

Explanation:

<h2>Hope this helps:)!</h2>
6 0
2 years ago
Which of the following are examples of the concept of layered access in physical security? Select one: a. Firewall, IDS, CCTV b.
Tpy6a [65]

Answer:

b. Fences, gates, monitored doors

Explanation:

The best defense is a good defense. A good security system is reliable and will provide you with a criminal-deterrent protection, detect intrusions, and trigger appropriate incident responses. It involves the use of multiple layers  of interdependent systems like protective guards, locks, protective barriers, fences, and many other techniques.

4 0
3 years ago
Read 2 more answers
(PYTHON) Write a program that uses this technique to read a CSV file such as the one given above. Display the IDs and names of t
Ludmilka [50]

Answer:

import csv

with open('employee_birthday.txt') as csv_file:

csv_reader = csv.reader(csv_file, delimiter=',')

line_count = 0

for row in csv_reader:

if line_count == 0:

print(f'Column names are {", ".join(row)}')

line_count += 1

else:

print(f'\t{row[0]} works in the {row[1]} department, and was born in {row[2]}.')

line_count += 1

print(f'Processed {line_count} lines.')

Explanation:

Heres an example of how to read csvs

7 0
3 years ago
In cell I8, enter a nested logical function to display Need to Remodel if the apartment is unoccupied (No) AND was last remodele
galina1969 [7]

Answer:

The Function is given as

=IF(AND(E8="No",G8>10),"Need to remodel","No Change")

Explanation:

The syntax of the IF condition in excel is given as

IF(Test,If true,If false)

So here the test is an and component such that the house has to be unoccupied which is indicated as E8 because the E column contain the occupancy of the apartments, and the G8 is the last remodeling time, so the test statement is the AND operation of the conditions as

E8="No" indicating that house is unoccupied

G8>10 indicating that the last remodelling was more that 10 years ago

So the test is given as

AND(E8="No",G8>10)

Now the statement if the test true is the recommendation for to remodel, so

"Need to remodel"

Now the statement if the test is false is given as

"No Change"

So the overall function becomes

=IF(AND(E8="No",G8>10),"Need to remodel","No Change")

3 0
2 years ago
Write a program that reads an integer, a list of words, and a character. The integer signifies how many words are in the list. T
hammer [34]

Answer:

In C++:

#include<iostream>

#include<vector>

using namespace std;

int main() {

int len;

cout<<"Length: ";  cin>>len;

string inpt;

vector<string> vect;

for(int i =0;i<len;i++){

   cin>>inpt;

   vect.push_back(inpt); }

char ch;

cout<<"Input char: ";  cin>>ch;  

for(int i =0;i<len;i++){

   size_t found = vect.at(i).find(ch);  

       if (found != string::npos){

           cout<<vect.at(i)<<" ";

           i++;

       }

}  

return 0;

}

Explanation:

This declares the length of vector as integer

int len;

This prompts the user for length

cout<<"Length: ";  cin>>len;

This declares input as string

string inpt;

This declares string vector

vector<string> vect;

The following iteration gets input into the vector

<em>for(int i =0;i<len;i++){ </em>

<em>    cin>>inpt; </em>

<em>    vect.push_back(inpt); } </em>

This declares ch as character

char ch;

This prompts the user for character

cout<<"Input char: ";  cin>>ch;  

The following iterates through the vector

for(int i =0;i<len;i++){

This checks if vector element contains the character

   size_t found = vect.at(i).find(ch);  

If found:

       if (found != string::npos){

Print out the vector element

           cout<<vect.at(i)<<" ";

And move to the next vector element

           i++;

       }

}  

4 0
3 years ago
Other questions:
  • #TODO: Define a data structure to keep track of which links are part of / not part of the spanning tree.
    14·1 answer
  • Which service is enabled on a cisco router by default that can reveal significant information about the router and potentially m
    10·1 answer
  • Which ipv6 static route would serve as a backup route to a dynamic route learned through ospf?
    12·1 answer
  • Why did Simon bring Michael home?​
    9·2 answers
  • Drawing programs typically create images using mathematical formulas, instead of by coloring pixels, so images can be resized an
    12·1 answer
  • A reference parameter differs from an output parameter in that a reference parameter ______________________ but an output parame
    5·1 answer
  • highlight the possible risks and problems that should be address during the implementation of information system process
    5·1 answer
  • Discuss how a lack of infrastructure in poor communities could contribute to ill-health such as the Unrest looting.​
    9·1 answer
  • What will be displayed after this code segment is run?
    5·1 answer
  • If you're connected to a switch and your NIC is in promiscuous mode, what traffic would you be able to capture
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!