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 are the difference between “where” and “having” clause in sql server?
How to get all stored procedures in sql server?
What are three major types of constraints?
What do you mean by stored techniques? How would we use it?
Tell me what do we need queues in sql service broker?
What is the difference between createstatement and preparedstatement?
Explain what are various ways to enhance the ssrs report?
What are the new scripting capabilities of ssms? : sql server management studio
Explain how does the report manager work in ssrs?
How do you implement session management in SQL Server mode?
What happens if ntwdblib.dll is missing on your machine?
What is the downside of using udf?
What is delete query?
Explain powershell included in sql server 2008?
What are the differences between substr and charindex in sql server.