CC SQL 7. advanced data Filtering

Card Set Information

Author:
dau108
ID:
146225
Filename:
CC SQL 7. advanced data Filtering
Updated:
2012-04-07 12:40:41
Tags:
CC SQL advanced data Filtering
Folders:

Description:
CC SQL 7. advanced data Filtering
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user dau108 on FreezingBlue Flashcards. What would you like to do?


  1. using the AND operator
    • SELECT prod_id, prod_price, prod_name
    • FROM products
    • WHERE vend_id = 1003 AND prod_price <= 10;
  2. usingthe OR operator
    • SELECT prod_name, prod_price
    • FROM products
    • WHERE vend_id = 1002 OR vend_id = 1003;
  3. using the IN operator
    • SELECT prod_name, prod_price
    • FROM products
    • WHERE vend_id IN (1002,1003)
    • ORDER BY prod_name;
  4. using the NOT operator
    • SELECT prod_name, prod_price
    • FROM products
    • WHERE vend_id NOT IN (1002,1003)
    • ORDER BY prod_name;

    NOT in MySQL MySQL supports the use of NOT to negate IN,BETWEEN, and EXISTS clauses. This is quite different from most other DBMSs that allow NOT to be used to negate any conditions.

What would you like to do?

Home > Flashcards > Print Preview