Home / CSE MCQs / DBMS MCQs :: SQL Basics

CSE MCQs :: DBMS MCQs

  1. SQL applies predicates in the _______ clause after groups have been formed, so aggregate functions may be used.
  2. A.
    Group by
    B.
    With
    C.
    Where
    D.
    Having

  3. Aggregate functions can be used in the select list or the_______clause of a select statement or subquery. They cannot be used in a ______ clause.
  4. A.
    Where, having
    B.
    Having, where
    C.
    Group by, having
    D.
    Group by, where

  5. he ________ keyword is used to access attributes of preceding tables or subqueries in the from clause.
  6. A.
    In
    B.
    Lateral
    C.
    Having
    D.
    With

  7. Which of the following creates temporary relation for the query on which it is defined ?
  8. A.
    With
    B.
    From
    C.
    Where
    D.
    Select

  9. Subqueries cannot:
  10. A.
    Use group by or group functions
    B.
    Retrieve data from a table different from the one in the outer query
    C.
    Join tables
    D.
    Appear in select, update, delete, insert statements.

  11. Which of the following is not a aggregate function ?
  12. A.
    Avg
    B.
    Sum
    C.
    With
    D.
    Min

  13. The EXISTS keyword will be true if:
  14. A.
    Any row in the subquery meets the condition only.
    B.
    All rows in the subquery fail the condition only.
    C.
    Both of these two conditions are met.
    D.
    Neither of these two conditions is met. View Answer

  15. How can you find rows that do not match some specified condition?
  16. A.
    EXISTS
    B.
    Double use of NOT EXISTS
    C.
    NOT EXISTS
    D.
    None of the mentioned is correct.