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
How to Insert multiple rows with a single insert statement?
Is null in sql server?
Explain the steps to use transact-sql cursor?
How to create dbo table in sql server?
How do I start sql server 2016?
What are “lock” hints?
What is the sql case statement used for? Explain with an example?
What is difference between unique and primary key?
How to skip remaining statements in a loop block using continue statements?
Is null vs coalesce?
Explain the categories of stored procedure?
How to change a login name in ms sql server?
What is the purpose of the model database?
How to change server name in sql server?
your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files? : Sql server administration