Bug #52751 Add prefix to column names on SELECT
Submitted: 11 Apr 2010 23:41 Modified: 28 Sep 2010 13:54
Reporter: Max Lohrmann Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[11 Apr 2010 23:41] Max Lohrmann
Description:
Sometimes it would be nice to select from multiple tables and include a prefix for each column so they can later be separated by the application.
Example:

SELECT tbl1.* PREFIX '_tbl1_', tbl2.* PREFIX '_tbl2_' FROM tbl1 JOIN tbl2 ON (tbl1.id = tbl2.fid)

The resulting columns being:

_tbl1_id
_tbl1_colA
_tbl1_colB
_tbl2_id
_tbl2_colA
_tbl2_colB
... 

How to repeat:
.
[28 Sep 2010 13:54] Susanne Ebrecht
Many thanks for writing a feature request.

Unfortunately, your wish is too individual.

We won't implement this.