Here’s something to contemplate:

What’s the difference between “group by” and “select distinct” in a simple query like:

select distinct a.LastName
from   dbo.Account a with (nolock)

could be rewritten as:

select   a.LastName
from     dbo.Account a with (nolock)
group by a.LastName

Who can tell us what the difference in execution would be?  When would you pick one over the other?

Leave a Reply

You can wrap your code with [ruby][/ruby] or [python][/python] blocks for syntax highlighting and you can use these traditional tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>