What is the difference between distinct clause and group by
clause?
Answers were Sorted based on User's Feedback
Answer / swamy
Distinct Clause:
---------------
Distinct Clause Will Eliminate the Duplicate data or Rows
when u r selecting from table .So it Produce the Data or
Rows with out Duplication.Generally Distinct Clause will
be Placed on the Column of the Table.
Group Clause:
-------------
Group Clause will group or pack the rows or data based on
the Column(S).
Is This Answer Correct ? | 24 Yes | 5 No |
Answer / rkvenky
distinct suppress the duplicates of data in the select stmt.
where as group by combines the data which we willgive in
order.
2.group by used at the end of select stmt
distint used in select stmt to columns
3.
group by is function where distinct is keyword
Is This Answer Correct ? | 8 Yes | 13 No |
How to enable tcp/ip protocol on a sql server?
Where are sql server user names and passwords stored in sql server?
Write a sql query to delete duplicate records from a table called table1
What is the purpose of linked server configuration in sql server?
What number sorts of privileges are accessible in sql?
what are the steps you will take, if you are tasked with securing an sql server? : Sql server database administration
Differences between Standby Vs No recovery?
Can you please explain the difference between function and stored procedure?
How to compose an inquiry to demonstrate the points of interest of an understudy from students table whose name begins with k?
What does it mean to manipulate data?
How optimize sql query with multiple joins in sql server?
Explain temporary table vs table variable by using cursor alternative?