Gurbirs
asked on
Select Data From Two Tables And show distinct records and second table records come first then first table record and having relationship.
Suppose i have table name tblfavuser(Contains data of favorite user) and tbluser(contains the user data). I want to show distinct record from both table and tblfavuser comes first then tbluser.
Can you post some sample data and the expected results?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can use Union
Select fav_user.id, favuser.name from fav_user
union
Select user.id, user.name from user