RIGHT OUTER JOIN
Function
Match the right table with the left table and return all matched records of the right table. If no matched record is found, NULL will be returned.
Syntax
1 2 |
SELECT attr_expr_list FROM table_reference RIGHT OUTER JOIN table_reference ON join_condition; |
Keyword
RIGHT OUTER JOIN: Return all matched records of the right table. If no record is matched, NULL is returned.
Precautions
The to-be-joined table must exist. Otherwise, an error is reported.
Example
To join the courseId from the course_info table to the courseId from the student_info table for inner join and return the records in the course_info table, run the following statement. If no joined record is found, NULL will be returned.
1 2 |
SELECT student_info.name, course_info.courseName FROM student_info RIGHT OUTER JOIN course_info ON (student_info.courseId = course_info.courseId); |
Feedback
Was this page helpful?
Provide feedbackThank 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