I have two tables:
Table: AA with columns A, B , C, D
Table: BB with columns E , F G
I want to get output which is a combination of these two tables like following:
A | B | C | D | E | F | G
I am currently doing following:
Select * from (
( select A, B, C ,D from AA where some condition)
UNION ALL
( select E , F , G , NULL from BB where some condition) )
But it is giving me output which contains only A , B , C , D from AA table while it’s not adding E, F , G from table BB.
What am I doing wrong?
not sure exactly what you idea is , but if you want just plain data from AA and BB in same table display then you can use something like this
but not sure what is the point of this 😐
if you want some combination of data then join is must have.