Well, I have two tables in an sql database. One has an ID column and its description.
Second table has two specific columns among many namely RefID1 and RefID2 so they both be having ID from the first table.
Now the problem is that I want to write a sql select statement from table 2 and display 1st table’s description at the place of RefID1 and RefID2 instead of the numeric IDs.
Hope I was clear in explaining my question 🙂
I will be very thankful for your replies.
Regards,
Mujtaba Panjwani
This statement allows for the possibility of either RefID1 or RefID2 being null. It will return a null value for a.description or b.description if either respective RefID# is null. The only way to stop your query from returning the RefID1 and RefID2 is to explicitly list all fields you want returned from A (tabl1) instead of using A.*