0

I have a mysql table containing with bunch of duplicate data. for example

ID           Visited URL

1             google.com
1             facebook.com
1             google.com
1             facebook.com
2             google.com
2             google.com

I need to avoid these duplicate rows and get unique rows as follows.

ID           Visited URL

1            google.com
1            facebook.com
2            google.com

How could I do that? any suggestions??

2 Answers 2

2

you can use either of the following

 Select ID,VisitedURL from tablename group by ID,VisitedURL

or

 SELECT DISTINCT ID,VisitedURL from tablename
Sign up to request clarification or add additional context in comments.

Comments

0

What about SELECT DISTINCT ID, Visited URL FROM YOUR TABLE..

It will only gives you non duplicated rows;

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.