hii,
can any one explain me the difference between where clause and a having clause with an example. i mean where to use each of them and in which situations other than the fact that we need to use groupby in case of having.
i have gone through the materials but i couldn't find the exact difference and the exact circumstances in which we should use.
Joined: 23 Nov 2006 Posts: 8724 Location: 221 B Baker St
Hello,
Usually we have a requirement and look for a solution. You appear to have found some solution and are trying to look for a requirement to use it.
WHERE specifies one or more columns. HAVING specifies a result table.
Are you familiar with the "IBM Manuals" link at the top of the page? Several sets of DB2 documentation are available there. These (as well as the other sets of documentation) are your friend