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 -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

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