Quantcast
Channel: Oracle, MySQL, Sybase, Informix and other databases
Viewing all articles
Browse latest Browse all 1350

How to join three tables with all column values are the different except for one?

$
0
0

I have three tables only one column is common (id)

How join these tables? Table is containing record of student, he may have more than one postgraduate qualification, and he may have more than one professional experience.

I am using SQ L server 2008

Table Student

  1. id

  2. name
  3. phone

Table Postgraduate

  1. id
  2. qualification
  3. subject

Table Experience

  1. id
  2. designation
  3. from date
  4. to date

I want data in this manner

Id name qualification Designation from date to date

1 ABC PGDCA lecturer 20/14/2011 20/14/2012 
1 null MA teacher 20/12/2012 20/12 2011 
1 null null asst teacher 20/12/2012 20/12 2011 

2 XYZ MA TEACHER 
2 NULL BA ASSISTANT
i Want In this way I tried join but it is providing duplicate data


Viewing all articles
Browse latest Browse all 1350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>