Store table:
OBJECT_ID | PRICE | NAME |
---|---|---|
1 | 200 | A |
2 | 500 | B |
3 | 900 | C |
4 | 500 | D |
Example 1:
SELECT * FROM store
WHERE name='B' AND price = 500;
OBJECT_ID | PRICE | NAME |
---|---|---|
2 | 500 | B |
Example 2:
SELECT * FROM store
WHERE name='B' OR price = 500;
OBJECT_ID | PRICE | NAME |
---|---|---|
2 | 500 | B |
4 | 500 | D |
Example 3:
SELECT * FROM store
WHERE price = 900 AND (name='A' OR name='C');
OBJECT_ID | PRICE | NAME |
---|---|---|
3 | 900 | C |