why is it repeated three times?

Since inner join is working as Cartesian Product. To get distinct rows either use distinct keyword after select or use group by.


select a.m_num,a.filename,a.title,a.price,a.stock
from newboard a , cart b
where a.m_num = b.m_num 
and a.board_num = ANY(select board_num from cart where m_num = '82')
 group by a.m_num,a.filename,a.title,a.price,a.stock;

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top