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

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

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -