Hour 8, "Using Operators to Categorize Data"

Quiz Answers

1: True or false: Both conditions when using the OR operator must be TRUE.
A1: False. Only one of the conditions must be TRUE.
2: True or false: All specified values must match when using the IN operator.
A2: False. Only one of the values must match.
3: True or false: The AND operator can be used in the SELECT and the WHERE clauses.
A3: False. The AND can only be used in the WHERE clause.
4: What, if anything, is wrong with the following SELECT statements?
  1. SELECT SALARY
    FROM EMPLOYEE_PAY_TBL
    WHERE SALARY BETWEEN 20000, 30000
    										
  2. SELECT SALARY + DATE_HIRE
    FROM EMPLOYEE_PAY_TBL
    										
  3.  SELECT SALARY, BONUS FROM EMPLOYEE_PAY_TBL WHERE DATE_HIRE BETWEEN 22-SEP-99 AND 23-NOV-99 AND POSITION = 'SALES' OR ...

Get Sams Teach Yourself SQL in 24 Hours, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.