SQL: GROUP BY Preferable than DISTINCT Why

We should not use DISTINCT in SQL query, it takes more up.

Select distict ename,enum

from emp

where ename=’krishna’

and enum=1000

The alternative way is:

Select ename,enum

from emp

where ename=’krishna’

and enum=1000

group by ename,enum

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.