sql - Simplify static Select statement by removing unions -


i want define values statically inside query, not using table.

select 1 id, 'one' value   union select 2, 'two' 

is possible simplify query, write without unions?

you can use construct.

select * (values(1, 'one'), (2, 'two')) a(id,value) 

sql fiddle test


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -