MySql SELECT AS - Append all field names

前端 未结 4 1700
傲寒
傲寒 2021-01-17 11:32

I\'d like to do something like this:

SELECT table.id AS prefix_id, table.name AS prefix_name

... and have the prefix added dynamically to a

4条回答
  •  醉酒成梦
    2021-01-17 12:14

    To avoid ambiguity in columns with multiple tables it appears you must manually specify each column name that exists with the same name in more than one table.

    http://dev.mysql.com/doc/refman/5.0/en/identifier-qualifiers.html

提交回复
热议问题