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

Answers were Sorted based on User's Feedback



Differences between UNIQUE and DISTINCT in select statements..

Answer / anilkumar kambala

UNIQUE:
UNIQUE CAN TAKE UNIQUE DATA
USING DISTINCT CLAUSE SORTING THE DATA

Is This Answer Correct ?    4 Yes 1 No

Differences between UNIQUE and DISTINCT in select statements..

Answer / pravin d. survase

UNIQUE is only used in oracle but,
DISTINCT is used in all RDBMS.

UNIQUE is used in SELECT statement and as KEY also.
DISTINCT is only used in SELECT.
DISTINCT KEY concept is not present in SQL/ORACLE.

UNIQUE also supress the duplicates but, UNIQUE KEY will
allow the duplicates.
DISTINCT supress the duplicates.

Is This Answer Correct ?    4 Yes 2 No

Differences between UNIQUE and DISTINCT in select statements..

Answer / prabha

Distinct:
Its gives only the non duplicate values in a database table.
Unique:
The UNIQUE constraint uniquely identifies each record in a
database table.its similar to primary key.these values
cannot be repeated.

Is This Answer Correct ?    3 Yes 1 No

Differences between UNIQUE and DISTINCT in select statements..

Answer / carol

unique is a constraint on coloumnsbut distinct is used in DML for query retrieval in select

Is This Answer Correct ?    2 Yes 0 No

Differences between UNIQUE and DISTINCT in select statements..

Answer / cutepa1

Yeah Manoj, Thatz ok, UNIQUE as a constraint. But I like to
know about the diff while its usage in select statement. For
me it seems very similar to DISTINCT, can anyone give me if
there is any difference, please.

Is This Answer Correct ?    15 Yes 15 No

Differences between UNIQUE and DISTINCT in select statements..

Answer / howard cheon

DISTINCT AND UNIQUE are same operation.
But, You cannot specify DISTINCT if the select_list
contains LOB columns.

Is This Answer Correct ?    16 Yes 16 No

Differences between UNIQUE and DISTINCT in select statements..

Answer / hemasundar

Distinct:Its gives only the non duplicate values in a database table.
Unique:The UNIQUE constraint uniquely identifies each record in a database table.its similar to primary key.these values
cannot be repeated.But, nearly both are same...

Is This Answer Correct ?    0 Yes 0 No

Differences between UNIQUE and DISTINCT in select statements..

Answer / narendrasai

UNIQUE: it is a constraint and it was created at the time of table creation, where as

DISTINCT: it is a word used at the time of selection.

So both are same, but usage of both the words are different

Is This Answer Correct ?    0 Yes 0 No

Differences between UNIQUE and DISTINCT in select statements..

Answer / vijay mohan reddy

Hi Howard Cheon,
you are currect... but we cant able to use
both DISTINCT and UNIQUE, if the select_list contains LOB,
LONG columns. It may not a difference.

Could anyone plz give some another major difference..

Thanks in Advance

Vijay Reddy.

Is This Answer Correct ?    9 Yes 10 No

Differences between UNIQUE and DISTINCT in select statements..

Answer / ajeet

there is no diff between distinct and unique in user point
of view. both are same. same functionality. dont bother
about it use whatever you want....

Is This Answer Correct ?    4 Yes 5 No

Post New Answer

More SQL PLSQL Interview Questions

How do I view tables in mysql?

0 Answers  


What is INSTEAD OF trigger ?

13 Answers   Hexaware, TCS,


Is there a way to automate sql execution from the command-line, batch job or shell script?

0 Answers  


What is the use of desc in sql?

0 Answers  


What are the benefits of pl sql?

0 Answers  


what are date and time data types? : Sql dba

0 Answers  


How do you identify a primary key?

0 Answers  


Can we use commit or rollback in trigger? If yes, then how. Please explain with a suitable example?

5 Answers   HSBC,


what is ref cursor in pl/sql?

3 Answers  


Which is faster joins or subqueries?

0 Answers  


What is the maximum number of rows in sql table?

0 Answers  


what are the security recommendations while using mysql? : Sql dba

0 Answers  


Categories