table 1
ID |
Department |
Date |
111 |
67 |
2015-04-28 |
222 |
58 |
2015-04-28 |
333 |
58 |
2015-04-28 |
table2
ID |
Department |
message |
111 |
14 |
test |
985 |
14 |
jkjioj |
852 |
14 |
oijoj |
000 |
74 |
pokce |
if i pass a parameter of table2.department=14 i want it to fetch all the records from table2. however the id of 111 exists in table1.i want to therefore ignore the record of 111 in table2.
so the expected output should be
ID |
Department |
Message |
985 |
14 |
jkjioj |
852 |
14 |
oijoj |