At 05:57 AM 25/09/2011, you wrote:
>How can I use the using clause on a join between two tables that have diff 
>column names? Do I have to use a derived table to rename the columns first?
>
>EX:
>SELECT username FROM users INNER JOIN
>(SELECT poster_username AS username FROM test) USING(username);

USING is a part of the MERGE statement syntax, not apparently what you are 
after here (assumes I understand what you want to achieve, of course!)

For an output set from a join you don't need manufacture matching column names 
- you're just matching data.

SELECT 
  u.username, 
  u.whateverelse
from users u join test t 
ON t.poster_username = u.username

./hb

Reply via email to