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

What is a variable in sql?

1051


What are sql data types?

1072


What is auto increment in sql?

1175


What is a record in pl/sql?

1216


what is self-join? : Sql dba

1239


what is a stored procedure? : Sql dba

1190


Can you upgrade sql express to full sql?

1141


What is sql in java?

1134


What are sql triggers used for?

1035


What is the difference between delete and truncate commands?

1098


What is pl sql record in oracle?

1088


Can procedure in package be overloaded?

1140


Is vs as in pl sql?

1037


Can we enter data in a table in design view?

1013


What is use of trigger?

986