IMPLICIT JOIN
Function
An IMPLICIT JOIN has the same function as an INNER JOIN. It returns the result set from two tables that satisfy the WHERE condition, but it does not use the JOIN keyword to explicitly specify the join condition. Instead, it is implemented through the WHERE clause.
Syntax
SELECT table_reference.col_name, table_reference.col_name, ... FROM table_reference, table_reference WHERE table_reference.col_name = table_reference.col_name;
Parameters
| Parameter | Description |
|---|---|
| col_name | The column name, specifying the columns to be returned. |
| table_reference | The table name to be joined. Must be an existing table. Otherwise, an error is reported. |
| WHERE | An IMPLICIT JOIN uses the WHERE condition to achieve a join similar to JOIN ... ON ..., returning matching records. Supports both equi-join and non-equi-join conditions. |
Precautions
- The tables to be joined must already exist. Otherwise, an error is reported.
- The IMPLICIT JOIN command does not contain the JOIN ... ON ... keywords. Instead, it uses the WHERE clause as the join condition to connect the two tables.
- An implicit join is equivalent to an INNER JOIN. You are advised to use the explicit JOIN syntax for better readability.
Examples
Return student names and course names where the courseId matches.
SELECT student_info.name, course_info.courseName FROM student_info, course_info WHERE student_info.courseId = course_info.courseId;
Example of a non-equi implicit join:
SELECT a.name, b.name FROM student_info_1 a, student_info_2 b WHERE a.score > b.score;
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot