?
Solved

sql sentence

Posted on 2011-05-13
5
Medium Priority
?
380 Views
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.city, Mytable.address

FROM Mytable
0
Comment
Question by:Braveheartli
5 Comments
 
LVL 22

Assisted Solution

by:Om Prakash
Om Prakash earned 300 total points
ID: 35752456
SELECT DISTINCT phonenumbers, city, address FROM Mytable
this will select combination of distinct phone number , city and address and not simply the phone number
0
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 1200 total points
ID: 35752716
0
 
LVL 12

Assisted Solution

by:Mohamed Abowarda
Mohamed Abowarda earned 100 total points
ID: 35752868
0
 
LVL 32

Assisted Solution

by:Ephraim Wangoya
Ephraim Wangoya earned 400 total points
ID: 35754170

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

Author Closing Comment

by:Braveheartli
ID: 35754850
Thank u
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, we’ll look at how to deploy ProxySQL.
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month14 days, 4 hours left to enroll

807 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