How to select multiple rows using one query Is it possible to select multiple rows using one query in SQL Server? For example, I have to run two queries to get my results as follows. How can I achieve the results using one query?
SELECT col1, col2
WHERE order_number = 'unique_value1'

SELECT col1, col2
WHERE order_number = 'unique_value2'
The first query is the fastest, with an iNDEX on order_number


CREATE TABLE mytable (col1 int, col2 int, order_number varCHAR(50))
GO




SELECT col1, col2
frOM mytable
WHERE order_number = 'unique_value1'
UNION
SELECT col1, col2
frOM mytable
WHERE order_number = 'unique_value2'



GO


col1 | col2
---: | ---:




SELECT col1, col2
frOM mytable
WHERE order_number = 'unique_value1' OR order_number = 'unique_value2'
GO


col1 | col2
---: | ---:




SELECT col1, col2
frOM mytable
WHERE order_number IN ( 'unique_value1' ,'unique_value2')
GO


col1 | col2
---: | ---:


db&lt;&gt;fiddle here