How do you use Outer Join in MySQL

Questions by lekhrajdeshmukh   answers by lekhrajdeshmukh

Showing Answers 1 - 20 of 20 Answers

sampra

  • Feb 13th, 2008
 

you cant get it directly take left outer join and right outer join and then take union of both

  Was this answer useful?  Yes

sampra

  • Feb 13th, 2008
 

select sname,phone,feebal,feepaid from student s left outer join fees f
on s.sid=f.sid;

union

 select sname,phone,feebal from student s right outer join fees f on s.si
d=f.sid;


u can use this compile code

Hi,

There is only left outer join and right outer join. There is not full outer join as such.

In addition to outer join there are following joins
Inner Join(shows rows for matching conditions only)
Cross Join(Shows Cartesian product of both tables.Each row of first table is combined with all rows of second table and so on)
Straight Join(Similar to inner join but left table is checked first. It is used for speeding query execution)
Natural Join(All rows from both tables are shown for matching column names and data)

If you need any further assistance or discussion please mail me at altafhsayyed@yahoo.com

Thanks and regards

  Was this answer useful?  Yes

helter

  • Jul 22nd, 2011
 

Full outer join combines the effect of applying both left and right outer joins. A records in the full outer joined tables do not match, the result set will have NULL values for every column of the table that lacks a matching row. In those records that will match, single row will be produced in the result set (containing fields populated from both tables).

  Was this answer useful?  Yes

LUCKY

  • Aug 28th, 2011
 

SELECT TABLE1.COLOMN ,TABLE1.COLUMN......, TABLE2.COLOMN, TABLE2.COLUMN FROM TABLE1 OUTTER JOIN ON TABLE1.COMMON COLUMN= TABLE2.COMMON COLUMN

  Was this answer useful?  Yes

Full outer join returns all matched rows from left table and right table. In simple words, it is a combination of both right and left joins

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions