MySQL Forums
Forum List  »  Newbie

compare rows in the same table
Posted by: Aleksey Terehov
Date: March 17, 2010 03:56AM

I have a table test:
id, second_id, name.
And I have data in table
1|1|first,
2|2|second,
3|4|third.
I nedd get only this rows that id=second_id.
SELECT * From test where id=second_id, don't work. But the column id is int, second_id varchar.
How do it?

Options: ReplyQuote


Subject
Written By
Posted
compare rows in the same table
March 17, 2010 03:56AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.