I have two tables: One with 1009 records and another with 11949. When I do a join, I have 11949 records, and the records in the 1009 records table are repeated several times. I need to do a select with join, but bring only the amount of records contained in the smaller table, since everything in the smaller table exists in the largest. Below my select:
select er.id_exm_rea
from t_cmo_Exame_Realizado er
inner join t_cmo_planilha_leitura pl on er.id_xfc = pl.id_xfc
t_cmo_read_lead - > Smaller table (1009 records)
t_cmo_Exame_Realizado - > Table Major (11949 records)