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 > modifying a select to return row count

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-02-05, 15:07
radiohead radiohead is offline
Registered User
 
Join Date: Jul 2005
Posts: 5
modifying a select to return row count

select year, make, model, color, unit, count(*) from property group by year, make, model, color, unit having count(*) > 1;

The above query is useful to identify similar records inside of a single table, but I would sometimes only like to know the number of rows that would be returned as if I ran the query without a limit.

Any help much appreciated.
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