Monday, 26 August 2013

MYSQL Select table and column name

MYSQL Select table and column name

I've got a SQL query like this one :
" SELECT T1.id, T2.user FROM T1 INNER JOIN T2 ON T1.user_id = T2.id"
The result is something like "id | user".
I'd like to know if there's a way to have the same result with the table
name before the column name (something like "T1.id | T2.user") without
changing the query (with a concat for example) ?
Thanks !

No comments:

Post a Comment