Q 38. How do we avoid getting duplicate entries in a query without using the distinct keyword ?
Ans :
DISTINCT is useful in certain circumstances, but it has drawbacks that it can increase the load on the query engine to perform the sort (since it needs to compare the result set to itself to remove duplicates). We can remove duplicate entries using the following options:
➢ Remove duplicates using row numbers.
➢ Remove duplicates using self-Join.
➢ Remove duplicates using group by.
No comments:
Post a Comment