1

Without any definite proof I've been preferring to use the following to get a distinct list of x:

SELECT  x
FROM    tb_containRepeatedX
GROUP BY x

As opposed to

SELECT  DISTINCT x
FROM    tb_containRepeatedX

Is this the correct strategy?

whytheq
  • 34,466
  • 65
  • 172
  • 267

1 Answers1

1

According to the execution plan. It's the same,

With GROUP:

enter image description here

With DISTINCT:

enter image description here

John Woo
  • 258,903
  • 69
  • 498
  • 492