下面哪个示例是内部连接的最佳实践?下面的示例非常简单,但是如果涉及多个表怎么办?你会选择哪种方法?
示例查询:
简单的
SELECT suppliers.supplier_id, suppliers.supplier_name, orders.order_date
FROM suppliers, orders
WHERE suppliers.supplier_id = orders.supplier_id;
使用关键字 INNER JOIN
SELECT suppliers.supplier_id, suppliers.supplier_name, orders.order_date
FROM suppliers
INNER JOIN orders
ON suppliers.supplier_id = orders.supplier_id;