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
What is a subquery in a select query statement in ms sql server?
How many primary keys are possible in a table?
What are different types of table joins?
On a windows server 2003 active – passive failover cluster, how do you find the node which is active?
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
What is indexing explain it with an example?
in the physical file layout, where should the transaction log be stored in relation to the data file? : Sql server administration
Explain the difference between control flow and data flow?
Can an automatic recovery be initiated by a user?
What is mapping schema?
What is a data source file?
What is the difference between set and select?
How do you delete duplicate records in sql server?
Why the trigger fires multiple times in single login?
What is normalization of database?