TextTable (id, text, user_id) task list
UserTable (user_id, user_name, department_id, role) employee table
DepartmentTable table (department_id, department_name) department
I want to select the same department personnel tasks,
The select should be how to write?
CodePudding user response:
SELECT A. * FROM textTable A, userTable B, departmentTable C WHERE A.u ser_id=B.u ser_id AND B.d epartment_id=C.d epartment_id AND C.d epartment_name='propaganda department'