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

How to enable tcp/ip protocol on a sql server?

0 Answers  


Where are sql server user names and passwords stored in sql server?

0 Answers  


Write a sql query to delete duplicate records from a table called table1

0 Answers  


What is the purpose of linked server configuration in sql server?

0 Answers  


What number sorts of privileges are accessible in sql?

0 Answers  






what are the steps you will take, if you are tasked with securing an sql server? : Sql server database administration

0 Answers  


Differences between Standby Vs No recovery?

2 Answers   Wipro,


Can you please explain the difference between function and stored procedure?

0 Answers  


How to compose an inquiry to demonstrate the points of interest of an understudy from students table whose name begins with k?

0 Answers  


What does it mean to manipulate data?

0 Answers  


How optimize sql query with multiple joins in sql server?

0 Answers  


Explain temporary table vs table variable by using cursor alternative?

0 Answers  


Categories