SQL Basic! Ultimate Trivia Quiz

10 Questions | Total Attempts: 280

SettingsSettingsSettings
SQL Basic! Ultimate Trivia Quiz - Quiz

.


Questions and Answers
  • 1. 
    Which SQL function is used to count the number of rows in a SQL query?
    • A. 

       COUNT()

    • B. 

      NUMBER()

    • C. 

      SUM()

    • D. 

      COUNT(*)

  • 2. 
    Which SQL keyword is used to retrieve a maximum value?
    • A. 

      MOST

    • B. 

       TOP

    • C. 

      MAX

    • D. 

      UPPER

  • 3. 
    Which of the following SQL clauses is used to DELETE tuples from a database table?
    • A. 

      DELETE

    • B. 

      REMOVE

    • C. 

      DROP

    • D. 

      CLEAR

  • 4. 
    If you don’t specify ASC or DESC after a SQL ORDER BY clause, the following is used by default __________
    • A. 

      ASC

    • B. 

      DESC

    • C. 

      There is no default value

    • D. 

      None of the mentioned

  • 5. 
    Which of the following function is an aggregate function?
    • A. 

      Union

    • B. 

      Like

    • C. 

      Group By

    • D. 

      Max

  • 6. 
    Which statement is wrong about PRIMARY KEY constraint in SQL?
    • A. 

      The PRIMARY KEY uniquely identifies each record in a SQL database table

    • B. 

      Primary key can be made based on multiple columns

    • C. 

      Primary key must be made of any single columns

    • D. 

      Primary keys must contain UNIQUE values.

  • 7. 
    In existing table, ALTER TABLE statement is used to
    • A. 

      Add columns

    • B. 

      Add constraints

    • C. 

      Delete columns

    • D. 

      Delete constrains

    • E. 

      All of the above

  • 8. 
    Wrong statement about UPDATE keyword is
    • A. 

      If WHERE clause in missing in statement the all records will be updated.

    • B. 

      Only one record can be updated at a time using WHERE clause

    • C. 

      Multiple records can be updated at a time using WHERE clause

    • D. 

      None is wrong statement

  • 9. 
    Wrong statement about ORDER BY keyword is
    • A. 

      Used to sort the result-set in ascending or descending order

    • B. 

      The ORDER BY keyword sorts the records in ascending order by default.

    • C. 

      To sort the records in ascending order, use the ASC keyword.

    • D. 

      To sort the records in descending order, use the DECENDING keyword.

  • 10. 
    In a table, a column contains a duplicate value, if you want to list all different value only, then which SQL clause is used?
    • A. 

      SQL DISTINCT

    • B. 

      SQL UNIQUE

    • C. 

      SQL BETWEEN

    • D. 

      SQL Exists

Related Topics
Back to Top Back to top