Sams Teach Yourself SQL in 24 Hours

Sams Teach Yourself SQL in 24 Hours

By Ron Plew and Ryan Stephens

Q&A

  1. Can I have more than one AND in the WHERE clause?

    Yes. In fact, all the operators can be used multiple times. An example would be

    SELECT SALARY 
    FROM EMPLOYEE_PAY_TBL
    WHERE SALARY > 20000
    AND BONUS BETWEEN 1000 AND 3000
    AND POSITION = 'VICE PRESIDENT'
    
  2. What happens if I use single quotation marks around a NUMBER data type in a WHERE clause?

    Your query still processes. Quotation marks are not necessary for NUMBER fields.

Share ThisShare This

Informit Network