直接上代码:
SELECT a.id,a.hospital_code,a.dept_code,a.dept_code,a.doctor_name FROM tb_doctor_info a , tb_doctor_info b WHERE a.id<>b.id AND a.doctor_code=b.doctor_code AND a.dept_code=b.dept_code AND a.hospital_code=b.hospital_code ;
效果
直接上代码:
SELECT a.id,a.hospital_code,a.dept_code,a.dept_code,a.doctor_name FROM tb_doctor_info a , tb_doctor_info b WHERE a.id<>b.id AND a.doctor_code=b.doctor_code AND a.dept_code=b.dept_code AND a.hospital_code=b.hospital_code ;
效果