• isn't it just looking for the student_id column, not finding it in the emp table, so its taking it from the student table?

    using table alias's would ensure the correct column is being used/not used.