MySQL Forums
Forum List  »  Newbie

select all vaues, including those not in row
Posted by: Larry Woods
Date: October 28, 2021 09:45AM

Here is what I want to do:

SELECT x FROM tbl WHERE x in (100,200)

where there is NO '200'


with an output:

x
----------------
100
NULL

or some variation of this, such as:

x ?
_____________________
100 | 100
200 | NULL

I just don't want to have to issue separate SELECTs for each value.

Thanks

Options: ReplyQuote


Subject
Written By
Posted
select all vaues, including those not in row
October 28, 2021 09:45AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.