Saturday, 10 September 2016

Get Player Name and Coach Name from a single table in MYSQL ?

Table Name: playercoach
Player Coach Table
Here, the number in the column coach represents the sno of the coach.
Procedure 1:
SELECT player.sno,,(SELECT FROM playercoach coach WHERE AS coachname FROM playercoach player
Procedure 2:
SELECT player.sno,, AS coachname FROM playercoach player JOIN playercoach coach ON
Procedure 1 would be better in the sense of performance.

No comments:

Post a Comment

Your comment is so valuable as it would help me in my growth of knowledge.