It's not a secret anymore!*
The moose likes JDBC and the fly likes SQL count statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQL count statement" Watch "SQL count statement" New topic
Author

SQL count statement

Henry ostley
Greenhorn

Joined: Mar 04, 2012
Posts: 4
Hi,
Is it possible in a count statement to return the value that is being counted as well as the actual number of times it appears?
So for instance:
Oxford 4
Cambridge 7
LSE 14
Thanks
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3456
    
  47

Something along the lines of might fit your need, if I understood it correctly.

An SQL tutorial might come in handy.
 
Don't get me started about those stupid light bulbs.
 
subject: SQL count statement
 
Similar Threads
ArrayIndexOutOfBoundsException
jtable help
missing expression error
How to count the execution time of my select statement?
Count of Records