title: In a join, how to prefix all column names with the table it came from
body: <p>I'm analysing a rather horrible legacy database/codebase, trying to reduce server load by combining queries into joins (including an email alert cron job that typically invokes well over a million separate queries).</p>
  
  <pre><code>SELECT * FROM 
  class_alerts_holding ah 
  INNER JOIN class_listings l ON l.id = ah.lid 
  INNER JOIN class_users u ON u.id = ah.uid
  LEFT JOIN class_prodimages pi ON pi.pid = ah.lid
  </code></pre>
  
  <p>This spits out 120 columns...</p>
  
  <pre><code>aid | id | lid | uid | oid | catName | searchtext | alertfreq | listType | id | owner | title | section | shortDescription | description | featured | price | display | hitcount | dateadded | expiration | url | notified | searchcount | repliedcount | pBold | pHighlighted | notes | ...
  </code></pre>
  
  <p>To assist my analysis of how to construct the new queries it would be awesome if I could prefix the columns in the result with the table they came from in the JOIN e.g.</p>
  
  <pre><code>class_alerts_holding.aid | class_alerts_holding.id | class_listings.lid | ...
  </code></pre>
  
  <p>Is there a way to achieve this?</p>