Pnkl

Pnkl

  • NA
  • 114
  • 65.7k

I need sql query to retrieve a data from different Table

Aug 31 2013 12:41 AM
Hello Guys,

I need your help to solve one query for retrieve data like 'ResultTable' from 3 Different Sql Table and Below i give one exmple:


StudentTable
SIDNameEmail
1Rohan[email protected]
2Ajay[email protected]

EmployerTable
EIDNameEmail
1Anna[email protected]
2Bittu[email protected]

Both Table :Student and Employer Table data insert in to one Table TopicPostTable 
TopicPostTable
PIDEmailUserType
1[email protected]Emp
2[email protected]Emp
3[email protected]Stn

Result Table: in TopicPostTable where UserType is 'Emp' then it join with EmployerTable and UserType is 'Stn' then it join with StudentTable
EmplyerTable
PIDEmailName
1[email protected]Anna
2[email protected]Bittu
3[email protected]Rohan


Thanks...

Answers (2)