Using the “DISTINCT” clause. For example if you fire the below give SQL in “AdventureWorks” , first SQL will give you distinct values for cities , while the other will give you distinct rows.
select distinct city from person.address
select distinct * from person.address
Asked In: Many Interviews |
Alert Moderator