KnowledgeBoat Logo

Computer Science

The following SQL is which type of join :

SELECT CUSTOMER.CUST_ID, ORDER.CUST_ID, NAME, ORDER_ID 
FROM CUSTOMER, ORDER
WHERE CUSTOMER.CUST_ID = ORDER.CUST_ID?
  1. Equi-join
  2. Natural join
  3. Outer join
  4. Cartesian product

SQL Joins & Grouping

1 Like

Answer

Equi-join

Reason — An equi-join is a type of join where columns from two or more tables are compared for equality using the "=" operator. In the given SQL query, the WHERE clause specifies the condition CUSTOMER.CUST_ID = ORDER.CUST_ID, which compares the CUSTID column from the CUSTOMER table with the CUSTID column from the ORDER table. Therefore, it is an equi-join.

Answered By

2 Likes


Related Questions