I would have expected an error message because:
You can't join USING (player) because 'Players' has no 'player', and if it did, the WHERE
clause would be redundant. The WHERE clause also references the non-existant Players.Player.
rob wrote:
Hi, query question:
I have 2 tables created using Mysql:
1) Players
Name(varchar),Team(varchar),Goals(tinyint),Assists(tinyint),Shutouts(tinyint),points(int).
2)draftees ID(smallint),Name(varchar),Phone(varchar),Player(varchar)
The problem I run into is when I run this statement only the first ID that has a certain Player is listed, even though multiple ID's may have the same player.
SELECT ID,Name,draftees.Player,goals,assists,shutouts,points FROM Players INNER JOIN draftees USING (Player)
WHERE Players.Player=draftees.Player ORDER BY ID
I hope that I have explained my problem clearly, Any help would be appreciated... Rob
--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php