Thursday, 15 April 2010

mysql - Aliasing a self join -



mysql - Aliasing a self join -

i have been working mysql , have question on self joins.

when self join, need alias both tables? example:

from client c1, client c2

now know works, seems work with

from customer, client c2

is there particular reason alias both tables beyond readability? there wrong not aliasing 1 table?

functionally, there's no benefit in aliasing both tables. however, aliasing both of them removes potential points of confusion , makes query more readable.

mysql alias self-join

No comments:

Post a Comment