INNER JOIN using with UNION - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Monday, June 7, 2021

INNER JOIN using with UNION

I have 2 tables.

  • projects
  • points ( I keep project points from user. user id and basvuru id are primary key at the other tables)

I tried to left join but not work as I want.

These are my tables:

enter image description here

enter image description here

When I write

select a.id as lemica, b.user_id as semica, b.id as temica, a.*,b.* 
from basvurular as a
LEFT JOIN points as b
ON a.id=b.basvuru_id
where a.onay=1

I got 5 records. But I need to get basvurular records to the page with joined points table.

Can you help how can I do this?



source https://stackoverflow.com/questions/67862406/inner-join-using-with-union

No comments:

Post a Comment