Is there a way to perform a select and return a static list? Something like the following:
select * from ('CA', 'FB', 'FC')
It should return
CA
FB
FC
If you want each value on a separate row, you can use table constructor values():
select val
from (values ('CA'), ('FB'), ('FC')) as t(val)
If you wanted more columns, you would use tuples rather than singletons:
select val1, val2
from (values
('CA', 'CB'),
('FA', 'FB'),
('FC', 'FD')
) as t(val1, val2)
Perhaps:
select 'CA'
union all
select 'FB'
union all
select 'FC'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With