I want to join table1 and table2 when table1.B = table2.B then I want Table1.A value in Table2.FK column and when Table2.B have null value then I want to set -1 in Table2.FK column

I tried multiple query but not getting output

New contributor
Akash Khare is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • You want an outer join and you want to look at one of coalesce,nvl,isnull depending on your unknown RDBMS 48 mins ago


Your Answer

Akash Khare is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.