Select where OR

0 votes

Is there a method to choose data if more than one requirement applies to the same field?

For example, I would usually write something like this:

select * from MYTABLE where age = 18 or age = 20 or age = 22

Is there a way to instead say something like:

select * from TABLE where field = 18 || 20 || 22

Can someone help me with this?

Feb 24, 2022 in Database by Hemant
• 140 points
365 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Database

0 votes
0 answers

SELECT.... WHERE... OR

Is there a method to choose data ...READ MORE

Feb 25, 2022 in Database by Vaani
• 7,070 points
403 views
0 votes
1 answer

IN vs OR in the SQL WHERE Clause

I assume you want to know the ...READ MORE

answered Sep 24, 2018 in Database by DataKing99
• 8,250 points
3,941 views
0 votes
1 answer

Which is faster/best? SELECT * or SELECT col1, col2,......colN

There are four big reasons that select * is ...READ MORE

answered Sep 27, 2019 in Database by Omaiz
• 560 points
784 views
0 votes
1 answer

SQL SELECT WHERE field contains words

Use this query to include any of words: SELECT * ...READ MORE

answered Feb 21, 2022 in Database by Neha
• 9,020 points
19,868 views
0 votes
1 answer

How do I split a cell in Excel into two or more where they are divided horizontally?

Table cells should be combined. To make a ...READ MORE

answered Apr 6, 2022 in Database by gaurav
• 23,260 points
19,515 views
0 votes
1 answer

Locking or Transactions MongoDB

MongoDB does not use conventional locking with ...READ MORE

answered Jul 24, 2018 in Database by shams
• 3,670 points
1,235 views
0 votes
1 answer

What is MySQL Workbench?

MySQL Workbench is a designing or a ...READ MORE

answered Nov 29, 2018 in Database by Sahiti
• 6,370 points
708 views
0 votes
1 answer

MySQL Workbench Functionalities

The functionalities of MySQL Workbench are as ...READ MORE

answered Nov 29, 2018 in Database by Sahiti
• 6,370 points
1,039 views
0 votes
1 answer

What are the various MySQL Workbench editions?

MySQL Workbench is mainly available in three ...READ MORE

answered Dec 6, 2018 in Database by CodingByHeart77
• 3,750 points
874 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP