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 25, 2022 in Database by Vaani
• 7,020 points
279 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 24, 2022 in Database by Hemant
• 140 points
282 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,240 points
3,379 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
619 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,060 points
19,015 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
13,627 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,010 views
0 votes
1 answer

Is SELECT * harmful in Database?

There are really three major reasons: Inefficiency in ...READ MORE

answered Sep 7, 2018 in Database by DataKing99
• 8,240 points
641 views
0 votes
1 answer

Which one is suitable for real time big database- Primary Key or Unique Index?

What is a unique index? A unique index ...READ MORE

answered Oct 12, 2018 in Database by Frankie
• 9,830 points
1,579 views
0 votes
1 answer

What is SELECT DISTINCT statement

This statement is used to return only ...READ MORE

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

What is the syntax of SELECT statement?

This statement is used to select data ...READ MORE

answered Nov 27, 2018 in Database by Sahiti
• 6,370 points
927 views
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