What is the difference between distinct clause and group by
clause?

Answers were Sorted based on User's Feedback



What is the difference between distinct clause and group by clause?..

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

What is the difference between distinct clause and group by clause?..

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

Post New Answer

More SQL Server Interview Questions

What are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture

0 Answers  


What is the difference between DataRow.Delete() and DataRow.Remove()?

0 Answers  


What happens when unicode strings concatenate with non-unicode strings?

0 Answers  


What is the significance of master, tempdb and model databases?

0 Answers  


What are the basic functions for master, msdb, model, tempdb databases?

0 Answers  






can you any body tell me which service pack is installed in the sql server?

3 Answers  


What is the difference between upgrade and migration in sql server?

0 Answers  


What is “begin trans”, “commit tran”, “rollback tran” and “savetran”?

0 Answers  


What are the features of Embedded SQL

0 Answers   HCL,


What are the elements of dbms?

0 Answers  


If a user does not have permission to a table, but has permission to a view created on it, will he be able to view the data in table?

0 Answers  


What is triggers in ms sql server?

0 Answers  


Categories