sql sentence

Posted on 2011-05-13
Last Modified: 2012-05-11
When I write a sql sentence, it selects only the phonenumbers distinct and the related city and address, right?

SELECT DISTINCT Mytable.phonenumbers,, Mytable.address

FROM Mytable
Question by:Braveheartli
    LVL 22

    Assisted Solution

    by:Om Prakash
    SELECT DISTINCT phonenumbers, city, address FROM Mytable
    this will select combination of distinct phone number , city and address and not simply the phone number
    LVL 39

    Accepted Solution

    LVL 12

    Assisted Solution

    by:Mohamed Abowarda
    LVL 32

    Assisted Solution


    distinct works on the entire row and not a single column
    LVL 1

    Author Closing Comment

    Thank u

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now