|
-
Mar 9th, 2002, 09:38 PM
#1
SQL Statement Help
How can I get rid of duplicates records and also get to know how many records were there?
Let's say I have a 5 same records in the table, I know I can get that in one records by DISTINCT but is there any way of knowing that table has 5 same records.
I hope you get my point
-
Mar 9th, 2002, 09:51 PM
#2
You could GROUP by the Distinct Field(s) then use a COUNT() to get the no. of records, i.e.
SELECT COUNT(FIELD1) AS Records, FIELD1 FROM TABLE1 GROUP BY FIELD1 ORDER BY FIELD1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|