Link to home
Start Free TrialLog in
Avatar of BR
BRFlag for Türkiye

asked on

mySQL simple left join statement

Dear Experts,
below mysql statement is working but I think I do something wrong,
it takes too long to bring the data.

What is wrong with it? How should I improve it?
 I use MySQL

SELECT table1.uid,table1.isim, table2.toplam, table2.bayikodu
FROM table1
LEFT JOIN table2 ON table2.bayikodu = table1.uid	
Where bayikodu is Null

Open in new window

SOLUTION
Avatar of Leonidas Dosas
Leonidas Dosas
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BR

ASKER

Dear David, how can I run Explain on my query?
Thank you, it's a good advise
Avatar of BR

ASKER

Dera All,
Where can i learn all this mySql joint statement logics?
I think, i need to learn the logic behind
Just insert the word EXPLAIN just before your SELECT.

As for learning SQL, start with YouTube + then move onto Udemy + other courseware providers.

There are so many great courses.

A really great starting point are the several books written on High Performance MariaDB, you can find at Amazon. All this information is available for free + these books do a great job of collecting + organizing this info. Likely these books will save you many hours of time.

Welcome to SQL-ing!
Avatar of BR

ASKER

THANK YOU All