select * from student_info stu,major_info col where stu.`所属专业id`=col.id;

学生表

专业表

进行联表查询