database - I want to replace the "left outer join" with an alternate basic query, how can I do it? -


The query looks like this:

  Select T1. *, T2 to T2. On the outside external t2 (t1.id1 = t2.id1 and t1.id2 = t2.id2) where t1.name = 'name';  

By the time I was not using native questions, I was good, but now I need to use the JAVA implementation of Hibernate for all questions. The inserted table is not affiliated in any way.

This is the reason why I want to use alternative fundamental queries to the left external join.

Thanks, Mahesh

My only suggestion is the result of two questions, indoors After that, and then in the T2 rows from T1 without any match, something like this:

  choose T1, T2 to T, T2, T2, where T 1. Name = 'name' and T.ID1 = T.ID1 and T.ID2 = T. 2. Choose the ID2 Union T1. *, Zero where T1. Name = 'name' and (t1id1, t1id2) is not (choose t2 from id1, id2);  

I'm not familiar with hibernate and do not know that it gives you the same problem. I believe in the worst case. If you can actually do only basic questions, then having two independent questions and combining the code in the results can be enough.


Comments