Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Differences between UNIQUE and DISTINCT in select statements

Answer Posted / kkparambath

SELECT DISTINCT Example

The "Persons" table:
P_Id LastName FirstName Address City
1 Hansen Ola Timoteivn10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger

Now we want to select only the distinct values from the
column named "City" from the table above.

We use the following SELECT statement:
SELECT DISTINCT City FROM Persons

The result-set will look like this:
City
Sandnes
Stavanger

Is This Answer Correct ?    7 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are views faster than queries?

915


Does oracle use sql?

875


What is trigger and types?

964


What is a primary key example?

900


what is the stuff function and how does it differ from the replace function? : Sql dba

988


Explain the difference between drop and truncate commands in sql?

959


What is the default isolation level in sql server? : Transact sql

961


How long does it take to learn pl sql?

999


What are the possible values for the boolean data field?

899


What does pragma mean?

970


What is null in pl/sql?

1021


Explain autonomous transaction.

1092


How consistent is the view of the data between and within multiple sessions, transactions or statements ?

2169


What is data type in sql?

918


What are %type and %rowtype for?

1011