rewrite a RIGHT JOIN

From: Dan <paraschiv_at_rol.ro>
Date: 11 Oct 2002 01:35:02 -0700
Message-ID: <abb373f7.0210110035.7a77981b_at_posting.google.com>



Hello Everybody,

        Here is my problem: I have an SQL query that works fine on DB2, but I need a query that produces the same results to work on MySql also. My DB2 query uses a RIGHT JOIN that is unsupported by MySql.

        How should I rewrite my query ? Thank you in advance !

Best regards,

        Dan

Here is the DB2 query:

	SELECT 
	   PM.Id, PM.Name, PT_M.PrmTheme_Id 
	FROM 
	 PromoTheme PT 
	JOIN PrmTheme_Mecanism PT_M ON 

(PT_M.PrmTheme_Id=PT.Id) AND (PT.Id= ?)
RIGHT JOIN PromoMecanism PM ON
(PM.Id=PT_M.PrmMecanism_Id)
WHERE PM.Sty_Id= ?
Received on Fri Oct 11 2002 - 10:35:02 CEST

Original text of this message