Suppose I have this table:
|MY_TABLE|
| ID_COL |
| 1 |
| 1 |
| 2 |
| 2 |
Now I want to do a count query on this table that would include zero results. When I try to run my query:
Select ID_COL,count(ID_COL)
from MY_TABLE
where ID_COL = '1' or ID_COL = '2' or ID_COL = '100' group by ID_COL
The result will only be two rows. I want to display 0 for ID_COL = '100'. Is there a way to do this?
Thanks.
BTW, I am using DB2.