table 'loan':
+--------+
| loanID |
+--------+
| 1 |
| 2 |
| 5 |
| 10 |
| 15 |
+--------+
table 'commitmentAssigned':
+--------------+--------+
| commitmentID | loanID |
+--------------+--------+
| 8 | 1 |
| 9 | 1 |
| 9 | 10 |
+--------------+--------+
I run this query:
select * from loan WHERE loanID NOT IN ("SELECT loanID from commitmentAssign WHERE commitmentID = 9 ");
and hoping to see a return set with loanID = 2, 5, 15 but instead, it gives me:
+--------+
| loanID |
+--------+
| 1 |
| 2 |
| 5 |
| 10 |
| 15 |
+--------+
Can any1 help correcting my query?? THANKS in advance!
+--------+
| loanID |
+--------+
| 1 |
| 2 |
| 5 |
| 10 |
| 15 |
+--------+
table 'commitmentAssigned':
+--------------+--------+
| commitmentID | loanID |
+--------------+--------+
| 8 | 1 |
| 9 | 1 |
| 9 | 10 |
+--------------+--------+
I run this query:
select * from loan WHERE loanID NOT IN ("SELECT loanID from commitmentAssign WHERE commitmentID = 9 ");
and hoping to see a return set with loanID = 2, 5, 15 but instead, it gives me:
+--------+
| loanID |
+--------+
| 1 |
| 2 |
| 5 |
| 10 |
| 15 |
+--------+
Can any1 help correcting my query?? THANKS in advance!