You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Vinaya Tirikkovalluru <vi...@converge.com> on 2008/02/12 22:11:00 UTC

Subquery with where clause

Hi,

 

I have this situation where I need to write a sub query.

 

The query would be similar to :

 

SELECT * 

  FROM table1 a

   AND EXISTS ( SELECT 1 

                  FROM Table2 b 

                 WHERE b.col1      = a.col1

                           AND b.col2 = a.col2

                   AND  b.col3 = ?

              )

 

This should be a dynamic query where the first query can have where
condition out of the Example class generated by Abator

 

Thanks

Vinaya



This electronic message is intended only for the use of the individual(s) or entity(ies) named above and may contain information which is privileged and/or confidential.  If you are not the intended recipient, be aware that any disclosure, copying, distribution, dissemination or use of the contents of this message is prohibited.  If you received this message in error, please notify the sender immediately.