hello !
for MS SQL 2000
how can I get something like
SELECT name from users WHERE Count(name) > 1
i want to return only the rows where name appears more than 1 time
thank you
Printable View
hello !
for MS SQL 2000
how can I get something like
SELECT name from users WHERE Count(name) > 1
i want to return only the rows where name appears more than 1 time
thank you
SELECT name from users
GROUP BY name
HAVING Count(*) > 1
select name
from users
group by name
having count(*) > 1
works fine thank you
to get all of them and not only one i am using and not only one
select name from users
WHERE name IN(
select name
from users
group by name
having count(*) > 1
)
is it the best way ?