sql - How to get data from three or more tables -


i need display distinct data between 3 tables. how requirement.

firsttable:

9999999999                      8888888888            7777777777 6666666666 5555555555 

secondtable:

7777777777 9999999999 

thirdtable:

8888888888 

i want output in format.

6666666666 5555555555 

use left join

   select t1."col"      table1 t1 left join table2 t2         on t1."col" = t2."col" left join table3 t3         on t1."col" = t3."col"     t2."col" null        , t3."col" null  

output:

|        col | -------------- | 6666666666 | | 5555555555 | 

see sqlfiddle


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -