expand the joins

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
jkuiper
Posts: 138
Joined: Fri 04 Aug 2006 14:17

expand the joins

Post by jkuiper » Fri 15 May 2009 19:13

I'm very font of Studio. I'm mostly use it with query builder, because my queries can be very complex. Now I had to create a query with a master table and a detail table. The detail has sometimes records of the master.
The result should like this

Code: Select all

   id   naam   intro
    1    john    jaap
    1    john    klaas
    2    jan      
After al the query looks like this:

Code: Select all

SELECT S.Id, S.Naam, I.Intronaam
FROM Inschrijvers S LEFT JOIN Introducees I ON I.Id = S.Id
The LEFT JOIN is doing the right thing for my result.
Studio only gives the opportunity of INNER, LEFT OUTER and RIGHT OUTER JOIN. Even when I changed the LEFT OUTER JOIN into LEFT JOIN, the designer still gives LEFT OUTER JOIN.

Can studio be expanded with LEFT JOIN and RIGHT JOIN?

jkuiper
Posts: 138
Joined: Fri 04 Aug 2006 14:17

Post by jkuiper » Sun 17 May 2009 08:46

Never mind. I know the problem. LEFT OUTER JOIN and LEFT Join is doing te same. The problem (not really a problem) is the disigner. If you drag a field to the master table, the child comes first.
master - child -> drag field to master -> select * from child
master - child -> drag field to child -> select * from master

Alexz
Devart Team
Posts: 165
Joined: Wed 10 Aug 2005 08:30

Post by Alexz » Mon 18 May 2009 08:06

Yes, you are right. LEFT OUTER and LEFT joins are equivalent.
As for order of tables after dragging fields, this is not a problem. This behaviour was implemented specially to provide control of tables' order in FROM list.

Post Reply