sql where multiple values – SQL Where Clause with multiple values

sql where multiple values – SQL Statement using Where clause with multiple values Using LIKE, IN, BETWEEN, and wildcards to match multiple values in SQL.

sql where multiple values

The popular method to use multiple values in WHERE is to use the “IN” function.

sql query where clause multiple values

sql where multiple values

SELECT column_name(s)
FROM your_table_name
WHERE column_name IN (value1, value2, ...); 

SQL Statement using Where clause with multiple values

select partyNm from t
where memberName in ('Virat', 'Sachin')
group by partyNm
having count(distinct memberName) = 2

sql field equals multiple values

SELECT medianet.*, location.area 
FROM medianet
LEFT JOIN location ON location.area = medianet.area_id
WHERE medianet.published = 1 
AND medianet.type = 45
AND medianet.area_id IN (3,4,6,8,10)

don’t Miss : Mysql Where Multiple Values

Read Also:  SQL LEFT OUTER JOIN overview and examples

Example – Combining AND & OR conditions

SELECT *
FROM members
WHERE (member_id > 5 AND profile_id = 85)
OR (member_name = 'Krishna');

I hope you get an idea about sql where multiple values.
I would like to have feedback on my infinityknow.com.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.