Home > database >  How to search out the connection from table 1 column belong to the category of row in table 2.
How to search out the connection from table 1 column belong to the category of row in table 2.

Time:04-09

I was a little white, use is SQLserver2008 version, form the following

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'
  • Related