Distinct and Group by

  • If you have a query like

    SELECT Distinct Person_Name, Count(*) From Person_table

    Group BY Person_Name   (Thanks Mathew!)

    does the Distinct do anything?  I know the results are the same with and without the Distinct, but does it add anything behind the scenes?  The executiuon plans seem to be the same.

     

    Steve

  • I don't believe so.

    Of course I assume you mean..

    SELECT Distinct Person_Name, Count(*) From Person_table

    Group BY Person_Name


    Mathew J Kulangara
    sqladventures.blogspot.com

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply