Usually you have to query something like this:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * | |
from customer | |
where last_name = 'SMITH' | |
and age = 32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * | |
from customer | |
where (last_name, age) = ('SMITH', 32) |
The real advantage comes when using a group of rows. Instead of using a temporary table and joining in the query, or making something horrible like:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * | |
from customer | |
where (last_name = 'SMITH' and age = 32) | |
or (last_name = 'JONHSON' and age = 45) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * | |
from customer | |
where (last_name, age) in (values ('SMITH', 32), ('JOHNSON', 45)) |