oracle - I want to return data from duplicate rows SQL Query -


i want return data duplicative rows

select column1, column2 table1  column1   column2 -------   ------- ca         1 cb         2 cb         3 cc         4 cd         5 ce         6 ce         7 ce         8 cf         9 

i want return rows 'cb' , ce. here cb , ce has more 1 row.

you can try out code. query in mysql can use same logic in oracle database. here inner subquery find out columns grouped column1 , return column having count greater 1. outer query display rows of column fetched inner query.here have created table table name name

sql fiddle added reference sqlcode

select * name column1 in(select column1 name group column1 having count(*)>1);


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -