Advanced Data Filtering Flashcards

1
Q

AND + OR

A

SELECT prod_name, prod_price
FROM Products
WHERE (vend_id = ‘DLL01’ OR vend_id = ‘BRS01’)
AND prod_price >= 10;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

IN or NOT IN

A

SELECT prod_name, prod_price
FROM Products
WHERE vend_id IN (‘DLL01’,’BRS01’)
ORDER BY prod_name;

IN can contain another SELECT statement
IN executes faster than list of OR operators

How well did you know this?
1
Not at all
2
3
4
5
Perfectly