windskystar73
Programmer
I have a table, called "person" that has "name" and "id" column that has the following data.
id, name
1 Tom
2 David
1 Tom
3 John
2 David
I want to display duplicated rows. i tried like this.
select * from person having count(*) > 1;
but it displays only one row.
but this statement returns what I want.
select * from person group by id, name having count(*) > 1;
can anybody tell me the difference between these two select statements?
thanks..
id, name
1 Tom
2 David
1 Tom
3 John
2 David
I want to display duplicated rows. i tried like this.
select * from person having count(*) > 1;
but it displays only one row.
but this statement returns what I want.
select * from person group by id, name having count(*) > 1;
can anybody tell me the difference between these two select statements?
thanks..