SQL Foundations  «Prev  Next»

SQL Select Insert - Quiz

What is wrong with the following statements?

Each question is worth one point. Select the best answer for each question.
 

1. What is wrong with the statement shown below?
SELECT * FROM THE TABLE BasicTable
Please select the best answer.
  A. The asterisk should be replaced with the SQL key phrase ALL COLUMNS.
  B. THE TABLE is incorrect.
  C. A sort order is not indicated.
  D. All of the above

2. What is wrong with the statement shown below?

INSERT COLUMNS (Lastname, Firstname, Phonenumber)
into BasicTable values ("Smith", "John")
              
Please select the best answer.
  A. The table name is not in the correct location.
  B. The column count does not match the input variable count.
  C. The table name is not listed first, followed by the columns, then the data.
  D. All of the above

3. What is wrong with the statement shown below?
SELECT Firstname, Lastname FROM BasicTable WHERE Lastname = Smith
Please select the best answer.
  A. The columns should be listed after the table name.
  B. The WHERE clause should come before the FROM clause.
  C. String values in the WHERE clause must be enclosed in quotes.
  D. The asterisk (*) should be used instead of column names.