I have a table A containing id (auto incremented) as a primary key and a table B containing id as a foreign key.While selecting data from Table B if there are duplicate ids