ZF-5713: Zend_Db_Select INTERSECT


I have noticed that there is now support for UNION queries, but still no INTERSECT support. It would be nice to also have intersection support when using postgres, etc, though I believe MySQL does not support it anyway.


you can achive this by using join see http://www.bitbybit.dk/carsten/blog/?p=71

It may be possible to use JOIN, depending on the queries. Besides, I think JOIN could potentially be far slower than INTERSECT.

shouldn't the SQL parser realize that and rebuild the statement?

however to the issue, Zend_Db_Select will only support features that can be done in all sql dialects supported. If you can do it by join though it might be a workaround for all those engines not supporting it. To get this issue through, you should provide generic intersect statements for all drivers, which would make it far easier to look through.

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.