Here is my query
select * from table1 inner join table2 on table1.typeId=table2.typeId;
This works fine if the typeId in table2 is’nt repeated more than once but gives duplicate rows if typeId exists more than once.
Is there any way to avoid duplicate rows??
table1 -- Name typeId
Jay 1
roy 2
table2 -- Type typeId
L 1
M 1
N 2
K 2
Expected output Jay 1
Output getting is Jay 1
Jay 1
1 Answer