Assume that there is an employee table and a project table.
A relationship table emp_proj contains following column: (id, emp_id, proj_id)
I would like to delete rows from emp_proj
that contain following pairs of (emp_id, proj_id)
: (1,101) , (1,102), (2,202), (3,303)
Note that the table may contain other rows with emp_ids 1, 2 and 3.
How would I use WHERE
clause that would compare these pairs ?
I thought of using nesting of OR
s but that would complicate the query.
Also I would like to do a bulk delete operation that in one-go, would delete all rows that contain the concerned pairs.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…