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 |
What is the difference between varchar and nvarchar?
Where is localdb stored?
what is the difference between them (ethernet networks and token ring networks)? : Sql server database administration
How to truncate a table first before running a package?
How do you find value of first column before inserting value into the second column in the same table for checking that second column must have different value than first column.
Define left outer join?
What do you mean by tablesample?
How you can change a cross join into an inner join?
What is transaction ? Give me one example.
How is table type constraint applied to a table?
What is difference between commit and rollback when used in transactions?
Can foreign key be deleted?