MySQL Forums
Forum List  »  Newbie

Re: In JOIN, what happens two of the same id name appears?
Posted by: Peter Brawley
Date: March 01, 2021 08:22PM

> Is there a book you recommend for beginners?

Perhaps https://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch01.pdf speaks to you?

> SELECT web_events.id, accounts.id, accounts.name
> FROM web_events
> How can you SELECT accounts.name from web_events?

You can't---you need to join to the other table ...

SELECT web_events.id, accounts.id, accounts.name
-> FROM web_events
-> ;
ERROR 1054 (42S22): Unknown column 'accounts.id' in 'field list'

... Read about Join. Also search for "join" at https://www.artfulsoftware.com/infotree/queries.php



Edited 1 time(s). Last edit at 03/01/2021 08:23PM by Peter Brawley.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.