Alibabacloud, Database, Query Optimization, Sql, Relational Databases.
exists ( select * from orders where o_custkey = c_custkey ) If subquery is not used, the customer table and orders table need to be left joined first, and then the rows not joined need to be filtered out. The SQL query is as follows: -- Information of all customers who have never ordered select