SELECT CONCAT(staff_details_form.id,student_details_form.id) as id, staff_details_form.name as `staff_details_form.name`, staff_details_form.email as `staff_details_form.email`, staff_details_form.username as `staff_details_form.username`, staff_details_form.placeofbirth as `staff_details_form.placeofbirth`, student_details_form.name as `student_details_form.name`, student_details_form.email as `student_details_form.email`, student_details_form.username as `student_details_form.username`, student_details_form.placeofbirth as `student_details_form.placeofbirth` FROM staff_details_form INNER JOIN student_details_form ON staff_details_form.placeofbirth as `staff_details_form.placeofbirth` = student_details_form.placeofbirth as `student_details_form.placeofbirth`