MySQL Forums
Forum List  »  Perl

Re: using exists against entire column?
Posted by: Bill Karwin
Date: December 07, 2006 01:53PM

I would do this with a self-join:

SELECT ...
FROM mytable AS b
  JOIN mytable AS d ON b.column_b = d.column_d

Anytime you need to compare values on one row to values on another row (or rows) in the same table, a self-join is probably the solution.

Regards,
Bill K.

Options: ReplyQuote


Subject
Written By
Posted
Re: using exists against entire column?
December 07, 2006 01:53PM


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.