Previous Solution for one Value
Is there a way to return multiple NULL or 'nan' values if we have a query with multiple ID values? In other words, if a table has a datetime "ID" which is a primary key. It is incrementing in ticks of one second. Some of those seconds (entries) are missing and you would want to return 'nan' or 'empty' once you query a large range of IDs.
Working Code for one value:
SELECT ID FROM TABLE WHERE ID in ('2017-06-29 23:10:00') UNION ALL (SELECT 'nan') LIMIT 1
Trying to achieve dynamic query for multiple values. In this example, I query 3 IDs, but the list can grow to thousands - non-working Example:
SELECT ID FROM TABLE WHERE ID in ('2017-06-29 23:10:00', '2017-06-29 23:10:01','2017-06-30 00:11:03') UNION ALL (SELECT 'nan') LIMIT 1