SQL RIGHT JOIN

RIGHT JOIN keyword returns all the rows from the right table (table_name2), even if there are no matches in the left table (table_name1).




SYNTAX :
SELECT column_name(s)
FROM table_name1
RIGHT JOIN table_name2
ON table_name1.column_name=table_name2.column_name

database table 'persons'

u_key

fname

lname

location

10986GauravSahuUnnao
10987LalitGuptaKanpur
10988AnujChauhanLucknow
10989AnkitSinghBanaras

database table 'orders'

p_key

seiral_no

u_key

11333310987
22444410986
33555511111
44666610989



Online Execute/Compile