If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > how to display ducplicate records / row ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-11-04, 22:53
newk newk is offline
Registered User
 
Join Date: May 2004
Posts: 2
how to display ducplicate records / row ?

hi,

how can i display duplicate records?

thanks
Reply With Quote
  #2 (permalink)  
Old 05-12-04, 01:24
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,609
What do you define as a "duplicate" row? The obvious answer is:
Code:
SELECT columnList
   FROM myTable
   GROUP BY columnList
   HAVING 1 < Count(*);
You'll need to replace columnList with a comma separated list of the columns that you find interesting.

-PatP
Reply With Quote
  #3 (permalink)  
Old 05-12-04, 11:02
trieder trieder is offline
Registered User
 
Join Date: Sep 2003
Posts: 69
Just

SELECT *
FROM Table_Name;

Should do the trick, replace star with column names. If you're doing a join, then obviously one piece of the query is causing things to not be displayed. Show us your query.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On