SQL Query for Selecting multiple rows with multiple column value

1.1k Views Asked by At

I want to do the following in the db2 SQL

select * from table where column =(value1,value2,value3)

result should return all the rows with all columns for the given table whose column values is value1,value2 and value3

1

There are 1 best solutions below

0
On

Do you want in?

select * from mytable where mycol in ('value1', 'value2' ,'value3')

This returns entire rows of mytable for which mycol has one of the three literal values enumerated on the right side of the in operator.