I have a simple query output of two rows and single column
Virginia
Texas
I want the output as
Virginia | Texas
I just tried it as two subqueries in column list.
select
(select state from table where code='VA') as state1
(select state from table where code='TX') as state2
from tablename
Is there better way to get the result