Home » SQL & PL/SQL » SQL & PL/SQL » count duplicate  () 1 Vote
count duplicate [message #269535] Sun, 23 September 2007 02:28 Go to next message
avinash_iete
Messages: 1
Registered: September 2007
Junior Member
count duplicate elements
Re: count duplicate [message #269536 is a reply to message #269535] Sun, 23 September 2007 02:29 Go to previous messageGo to next message
BlackSwan
Messages: 25039
Registered: January 2009
Location: SoCal
Senior Member
>count duplicate elements
OK, you may proceed to do so.

[Updated on: Sun, 23 September 2007 02:30] by Moderator

Report message to a moderator

Re: count duplicate [message #269540 is a reply to message #269535] Sun, 23 September 2007 02:59 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member


Count distinct element(
 select count(*) from (select distinct * from table_name);
)

[Updated on: Sun, 23 September 2007 03:02]

Report message to a moderator

Re: count duplicate [message #269543 is a reply to message #269540] Sun, 23 September 2007 04:07 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Question Question Question

What's that?

Regards
Michel
Re: count duplicate [message #269549 is a reply to message #269535] Sun, 23 September 2007 04:38 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

That is count of distinct element. Laughing

To count the duplicate,

select column_name,count(*) from counting group by column_name having count(column_name)>1;
Laughing
Re: count duplicate [message #269766 is a reply to message #269535] Mon, 24 September 2007 08:05 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
avinash_iete wrote on Sun, 23 September 2007 03:28
count duplicate elements


Ok. I have none.
Re: count duplicate [message #269768 is a reply to message #269766] Mon, 24 September 2007 08:09 Go to previous message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Quote:
Ok. I have none.
You might have unique key / primary key. (or) You have entered the data with your EYES open. Laughing

By
Vamsi
Previous Topic: viewing package body text
Next Topic: setting sql prompt using trigger
Goto Forum:
  


Current Time: Mon Dec 05 19:21:22 CST 2016

Total time taken to generate the page: 0.26419 seconds