Results 1 to 4 of 4

Thread: SELECT UNIQUE and SELECT DISTINCT

  1. #1
    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

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    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

  3. #3
    Join Date
    Oct 2005
    Posts
    2,393

    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

  4. #4
    Join Date
    May 2008
    Posts
    2,297

    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

Similar Threads

  1. Select unique values using xsl
    By Elizabeth Allen in forum Software Development
    Replies: 6
    Last Post: 17-05-2010, 10:27 AM
  2. Select unique values without using distinct
    By Maya Angelou in forum Software Development
    Replies: 6
    Last Post: 17-05-2010, 10:26 AM
  3. Select unique column in sql server
    By Trini Alvarado in forum Software Development
    Replies: 6
    Last Post: 17-05-2010, 10:24 AM
  4. Select unique records from a table
    By Conraad in forum Software Development
    Replies: 5
    Last Post: 13-05-2010, 12:01 AM
  5. Select unique columns from a record set
    By Madhuchhanda in forum Software Development
    Replies: 6
    Last Post: 12-05-2010, 11:31 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,613,132.19741 seconds with 17 queries