Artificially Add a Record To MySQL Results
data-manipulation, mysql
Solution
The only way to achieve that with a query would be using `UNION`:
SELECT 'Select', 'Select'
UNION
SELECT ...
Getting the order correct will depend on how you want the results ordered overall.
If the goal is simply to get a heading at the top of the results, it would be easier (plus more efficient) to just add programmatically in the application that's receiving the data.
Problem
Is there any way to slip in a record to the top of a result set in MySQL? For instance, if my results are: ``` 1 | a 2 | b 3 | c etc ``` I want to be able to get: ``` Select | Select 1 | a 2 | b 3 | c etc ``` Where "Select" isn't actually a part of the recordset, but artificially inserted. Thanks.