Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 03-06-2009
Member
 
Join Date: Feb 2009
Posts: 20
SELECT UNIQUE and SELECT DISTINCT

Hello , i am practicing Oracle 9i, Can Anybody tell me what is the difference between the UNIQUE and DISTINCT keywords? Because Whenever i Excuted this two Queries SELECT UNIQUE() FROM TABLE and this SELECT DISTINCT() FROM TABLE , I always Get the Same Result , I am not able to identidy the main difference between both the Queries thanks in advance
Reply With Quote
  #2  
Old 03-06-2009
Member
 
Join Date: May 2008
Posts: 2,383
Re: SELECT UNIQUE and SELECT DISTINCT

DISTINCT and UNIQUE are synonymous , Unique is a keyword used in the Create Table() directive to denote that a field will contain unique data, For example: SELECT DISTINCT object_type FROM user_objects;is the same as: SELECT UNIQUE object_type FROM user_objects
__________________
The FIFA Manager 2009 PC Game
Reply With Quote
  #3  
Old 03-06-2009
Member
 
Join Date: Oct 2005
Posts: 2,389
Re: SELECT UNIQUE and SELECT DISTINCT

Hello , There are actually not Much Difference between the two Keyword the UNIQUE Can be Used For only once for a column in a table and the DISTINCT keyword can be Used in select query to retrive distinct data from table
Reply With Quote
  #4  
Old 03-06-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: SELECT UNIQUE and SELECT DISTINCT

sometimes you will want to list only the different (distinct) values in a table. The DISTINCT keyword can be used to return only distinct (different) values Specify DISTINCT or UNIQUE if you want Oracle to return only one copy of each set of duplicate rows selected (these two keywords are synonymous). Duplicate rows are those with matching values for each expression in the select list.Restrictions on DISTINCT and UNIQUE Queries
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "SELECT UNIQUE and SELECT DISTINCT"
Thread Thread Starter Forum Replies Last Post
Select unique values using xsl Elizabeth Allen Software Development 6 17-05-2010 10:27 AM
Select unique values without using distinct Maya Angelou Software Development 6 17-05-2010 10:26 AM
Select unique column in sql server Trini Alvarado Software Development 6 17-05-2010 10:24 AM
Select unique records from a table Conraad Software Development 5 13-05-2010 12:01 AM
Select unique columns from a record set Madhuchhanda Software Development 6 12-05-2010 11:31 PM


All times are GMT +5.5. The time now is 01:24 PM.