Home
About
Contact
Login
Home
Code and Articles
Videos
Books
Search
Demos
Portfolio
Home
>
Categories
>
Code from a Category
Asp.net C# / VB (187)
PHP (86)
MSSQL (56)
CSS (8)
Zoho CRM (47)
Zoho Invoice (1)
jQuery (16)
DotNetNuke (2)
VB.Net (66)
Zoho Creator (5)
Zoho Mail (2)
Other (7)
Zoho Support (1)
Salesforce CRM (3)
SugarCRM (1)
Difference between DISTINCT and GROUP BY
User Name:
codelecturer
Name:
Mike Chauhan
Contact Me:
www.datawebcoder.com/ContactUs.aspx
Home Page:
www.datawebcoder.com
6 years of total IT experience including programming, application development, System Maintenance . 3 years of Experienced and expertise in .Net Framework VB, Visual Basic.Net, ASP.Net 2.0, 3.5 and AD...
[More]
Viewed Times:
187
Add Date:
11/13/2011
Here explaning Difference between DISTINCT and GROUP BY
A DISTINCT and GROUP BY usually generate the same query plan, so performance should be the same across both query constructs. GROUP BY should be used to apply aggregate operators to each group. If all you need is to remove duplicates then use DISTINCT. If you are using sub-queries execution plan for that query varies so in that case you need to check the execution plan before making decision of which is faster.
Example of DISTINCT:
Example of GROUP BY:
Example of GROUP BY with aggregate function:
Reply above Post
Related Posts
What is difference between HTTP Handler and HTTP Module.
What is difference between delete and truncate
What is difference between stored procedure and Functions?
Difference between Threads and Processes.
ZOHO CRM: Differences between 3 Rules
Post a Comment
Name:
(Optional)
Email:
(Optional, you can get an email if somebody replys your comments)*
Email me if somebody respons my comment below:
Yes
No
Details**:
Enter Text
as Below:
(case insensitive, if hard to read, click the "get a new one" button)
* Your email address will not be shared with any third parties for any reason.
** Maximum 1000 charactors.