Control Output
This is a discussion on Control Output within the DB2 forums, part of the Database category; I am using db2 database. I want to control the presentation of the rows in my final output. How can ...
-
Control Output
I am using db2 database. I want to control the presentation of the rows in my final output. How can I achieve this.
-
04-07-2007, 09:17 AM #2
- Join Date
- Apr 2006
- Answers
- 124
One way to control the presentation of the rows in final output is to use Group by. I assume you know the syntax and usage of this. If not let me know and I will explain here in detail.
-
Rahul thanks for your valuable input. It would be great if your could give me th syntax also with example so that I could try it out.
-
04-09-2007, 08:59 AM #4
- Join Date
- Apr 2006
- Answers
- 124
Suppose you have a emp table with empname column you can associate columns having same empname as below:
SELECT empname, COUNT(*) from emp GROUP BY empname
Let me know if you have any doubts.
-
Sponsored Ads


Reply With Quote





