Here is a way of defining inline table data within a SQL query:
SELECT 1 `id`, 'hello' `name`
UNION ALL
SELECT 2 `id`, 'goodbye' `name`
You can put this into something that expects a query returning the columns id, name and it will work correctly. However, this takes up a lot of unnecessary characters when there are more than one or two rows.
Is there a better way than UNION'ing multiple SELECT's for defining an inline table of values within a MySQL query?