Results 1 to 2 of 2
  1. #1
    Join Date
    May 2006
    Posts
    1

    does anyone know ....

    I'm a beginner so pls bear with me...you have to be familiar with the sample database from Microsoft called Nwind.mdb before you can help me...

    In the Design view of the 'Products' table, the SQL statement is:
    SELECT DISTINCTROW Suppliers.SupplierID, Suppliers.CompanyName


    FROM Suppliers
    ORDER BY Suppliers.CompanyName;

    somebody explain this to me pls....what's the difference between 'SELECT' and 'SELECT DISTINCTROW' ? why did it include SupplierID if CompanyName is the one that we can see in Datasheet view?
    thanks guys!

  2. #2
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    DISTINCTROW tells Access to return only one copy of a duplicated record in the answer set.

    As for why CompanyID and CompanyName are used, I suspect it is to guard against the possibility that two different company entities could have the same name.

    Patrick

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums