jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes SQL query needed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "SQL query needed" Watch "SQL query needed" New topic

SQL query needed

Nagendra Shastry

Joined: Oct 26, 2010
Posts: 19
Hi All,

I am a student on Computer Science and not having much knowledge. So please don't mind if my quesrion is silly.
I need to write a sql query to group by a column where column has duplicate values( having count more than one)
Please help me out.
T Mishra
Ranch Hand

Joined: Apr 04, 2006
Posts: 108

Hi Nagendra ,

It would be really helpful if you can tell us details about what you've tried so far and the problem you're facing.

Tushar (SCJP 1.5)
Shashank Gollapudi
Ranch Hand

Joined: Jan 19, 2012
Posts: 33
Hi Nagendra,

As per what i have understood,

Let x be the column you wanted to find duplicates on,

use group by clause on x then followed by having clause using the count function

For example: Select x from sometable group by x having count(x) > 1
I agree. Here's the link: http://aspose.com/file-tools
subject: SQL query needed
It's not a secret anymore!