i have table like :
table : a
a_id, b_id, c_id, type, created_at
i should join a with table b or c
for each row, just one of the b_id or c_id is filled(according to type)
if b => a should join with b
c => a should join with c
how can i do this in postgresql
Loading
Rajanikant HawaldarPosted Jun 14, 2021, 5:44 AM
AdarshPosted Jun 14, 2021, 5:38 AM
Rajanikant HawaldarPosted Jun 14, 2021, 5:34 AM
AdarshPosted Jun 14, 2021, 5:32 AM
Rajanikant HawaldarPosted Jun 14, 2021, 5:28 AM
Two left joins with "AND a = ..." in the join condition.