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 delete duplicate rows?
What is normalization and denormalization in sql server?
What is a livelock?
what is the difference between group and having give an example with query and sample output
How to create a view with data from multiple tables?
What is the default server name for sql server?
What are different types of Keys? Please explain all the keys with a suitable example.
What is the difference between NOROW and LOCKROW?
0 Answers Accenture, Honeywell, Satyam,
Write a query to delete duplicate records in SQL SERVER
Differences between logshipping and mirroring
How to insert data with null values?
Which system table contains information on constraints on all the tables created?