sql - How to write the query that returns records where some column value appears more than once? -



sql - How to write the query that returns records where some column value appears more than once? -

i have table has column statuses. need write query returns records column value appears more once?

something this:

select * table1 count(statusid = 6) > 1

you can write query following:

select * table1 statusid in ( select statusid (select statusid,count(*) cnt table1 statusid=6 grouping statusid having count(*) > 1) tbl )

sql sql-server count

Comments

Popular posts from this blog

php - How to pass multiple values from url -

database - php search bar when I press submit with nothing in the search bar it shows all the data -

ios - How to load .png images from Documents folder of an app -