In performance wise distinct is good or group by is good?
eg:select name from emp group by name;
select distinct name from emp;

Answer Posted / anil sharma

Group apply before where clause and distinct apply after
where clause.
So group by is good.

Is This Answer Correct ?    4 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a subquery in a select query statement in ms sql server?

578


How many primary keys are possible in a table?

513


What are different types of table joins?

551


On a windows server 2003 active – passive failover cluster, how do you find the node which is active?

640


but what if you have to create a database with two filegroups, one on drive c and the other on drive d with log on drive e with an initial size of 600 mb and with a growth factor of 15%? : Sql server database administration

525






What is indexing explain it with an example?

544


in the physical file layout, where should the transaction log be stored in relation to the data file? : Sql server administration

541


Explain the difference between control flow and data flow?

521


Can an automatic recovery be initiated by a user?

549


What is mapping schema?

565


What is a data source file?

489


What is the difference between set and select?

565


How do you delete duplicate records in sql server?

500


Why the trigger fires multiple times in single login?

715


What is normalization of database?

595