mysql - How to fetch two records from subquery -
i want fetch 2 records subquery gives error below u tried
below works :
select id, (select color tblcolor pid=id) color form maintable
not works
select id, (select color,price tblcolor pid=id) form maintable
please me solution it
from question, seems you're looking for:
select t1.id, t2.color, t2.price maintable t1 inner join tblcolor t2 on t1.id = t2.pid
Comments
Post a Comment