Right Join - Mysql

How to use right join in mysql?

Snippet Code

Rate this page :
  [ 0 votes]

MySQL RIGHT JOIN query returns all the rows in the right table, based on the matches found in the left table. When no matches are found, the result will be NULL in the left side.

Syntax: SELECT column_name(s) FROM table1 RIGHT JOIN table2 ON table1.column_name=table2.column_name; Eg; SELECT T1.name,T2.student_type FROM student AS T1 RIGHT JOIN student_detail AS T2 ON T1.id=T2.id;


Ask Questions

Ask Question