What is the difference between DISTINCT and GROUP BY?

Member

by horace , in category: Technology , 3 months ago

What is the difference between DISTINCT and GROUP BY?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by julio.mcglynn , 3 months ago

DISTINCT can return NULL values because it considers NULL as a value and selects one NULL from many, however, GROUP BY does not consider NULL values as a record. GROUP BY sorts the records where DISTINCT does not.