I have two table
1. Table A
userId
userFirstName
UserLastName
2. Table B
createdByUserId
updatedByUserId
deletedByUserId
tableName
tableCreateDate
I would like to do a select of Table B (include the createByUserID, updatedByUserId, and deletedByUserId) and get the Table A’s userFirstName and userLastName in one query (userName according to the userID been fetched)? Is this possible in one nested query? or it really needs two query, one query fetch out the userId and second fetch out userdetail.
If I understand what you want you can just Join Three times. (I chose Left Joins in case some of the ID’s are null)