I need to write a query which will retrieve me the fullname (available in fullname) of the ownerid and creatorid. Since both are referring the same table, it is retrieving me two rwo. But I need fullname for both ownerid and creatorid fullname in one row. How to do this? owner id and creator id is the reference name in userdetail table.
create table page(page_key,page_number,ownerid,creatorid)
create table userdetail(id,fullname,phonenumber)
you need to join table
userdetailtwice since you want to get thefullnameof two ids in you tablepageOne more thing, if
owneridandcreatorIDcan be null, useLEFT JOINinstead ofINNER JOIN.