Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Select non Unique

tanveer haidertanveer haider Member Posts: 37
hello,
I want to select repeated rows in the table,like

Sr# Name
1 haider
2 jhon
2 jhon
3 smith
4 ali
4 ali
.....
so the query must return result with sr# 2 and 4 because they are repeating.

Comments

  • dokken2dokken2 Member Posts: 532
    : hello,
    : I want to select repeated rows in the table,like
    :
    : Sr# Name
    : 1 haider
    : 2 jhon
    : 2 jhon
    : 3 smith
    : 4 ali
    : 4 ali
    : .....
    : so the query must return result with sr# 2 and 4 because they are repeating.
    :
    :

    you want to run an aggregate query - includes the Group By clause

    [code]
    SELECT table1.LastName
    FROM table1
    GROUP BY table1.LastName
    HAVING (((Count(table1.LastName))>1));
    [/code]
Sign In or Register to comment.