1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How will get distinct records in SQL table?

Discussion in 'Database' started by sql-programs, Jan 2, 2014.

  1. sql-programs

    sql-programs New Member

    Joined:
    Oct 21, 2009
    Messages:
    14
    Likes Received:
    2
    Trophy Points:
    0
    Occupation:
    Software Developer
    Home Page:
    For examble:

    In a table name like

    1.Test
    2.Test.
    3.Test..
    4.Test...

    How will get the name "Test" using distinct keyword?
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    Not able to understand what you are looking for?
     
  3. shashikantchauhan

    shashikantchauhan Banned

    Joined:
    Jul 24, 2014
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    web master
    Location:
    bangalore
    its table name and distinct is use for attribute which is called data in table.
    you have to find that which is is distinct then you can use this query
    SELECT DISTINCT column_name,column_name
    FROM table_name;
     
  4. vickya4n

    vickya4n New Member

    Joined:
    Aug 23, 2016
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Male
    Specifies records selected with SQL queries. ... no duplicate CustomerID fields, but the Orders tabledoes because each customer can have many orders.
     

Share This Page