What is the difference between "where" and different "connections" in mysql?

Possible duplicate:
In MySQL queries, why use a connection instead of where?

Coincidences are always confusing for me. Can someone tell me what is the difference between different joins, and which one is the fastest, and when to use which connection and what is the difference between join and where clause? Plz gives ur answer in detail, as I already read about affiliations on some websites, but didn't get the right concept.

+3
source share
2 answers

Instead of quoting the entire Wikipedia article, I'm going to suggest your article on SQL joins .

SQL JOIN . , . A JOIN - . ANSI JOIN: INNER, , . , ( , ) .

JOIN . , , , .

, WHERE INNER JOIN. , , , INNER JOIN, , .

MySQL JOIN.

+3

:

SELECT c.customer_name, o.order_id, o.total
FROM customers c, orders o
WHERE c.id = o.customer_id

SELECT c.customer_name, o.order_id, o.total
FROM customers c
INNER JOIN orders o ON c.id = o.customer_id

, mysql, (imho) . :

: http://www.mysqlperformanceblog.com/2010/04/14/is-there-a-performance-difference-between-join-and-where/

+2

Source: https://habr.com/ru/post/1755190/


All Articles