Skip to content
Advertisement

Query to list columns where some values are not available

I have two tables in a database that look like this:

I am trying to get a table like this. There will be null values since not every column in Table PAR will have the same key in table AT

I tried to use the following query but I did not get my output. I also tried to use IFNULL but I still cant seem to figure this out

Advertisement

Answer

What you want here is all values from table P irrespective there are values in table A like A.C and A.D will be blank in final output

So output from above query will be

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement