INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Other

Distinct versus distinctrow by randysmid
Posted: 6 Mar 03

Hi,
As most people know, you can add the keyword "DISTINCT" to your SQL statement to retrieve unique records based on a field.  Example:
SELECT DISTINCT LastName FROM Employees;

The "DISTINCT" keyword will only base its's search on a field, whereas the "DISTINCTROW" will base its' search on the entire record.  This is extremely useful in searching for identical records that might have been posted to the database twice (in error).

In the Query Properties, this is represented by "Unique Values" (aka DISTINCT) and "Unique Records" (aka DISTINCTROW).  These properties can be set to Yes or No.  The default value for both of them is "No".

Comments, questions, suggestions?
     rsmith@cta.org


Back to Microsoft: Access Queries and JET SQL FAQ Index
Back to Microsoft: Access Queries and JET SQL Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close