Please use the user forum for such question, thanks.
Boris Shiryov wrote:
Hi, All
How can I use subqueries in the select clause?
SQL query like that:
select
t1.*,
(select count(*) from t2 where t1.id=t2.id_t1)
from
t1
executes faster, than "group by"-styled query from t2, on my SQL server.
Hi, All
How can I use subqueries in the select clause?
SQL query like that:
select
t1.*,
(select count(*) from t2 where t1.id=t2.id_t1)
from
t1
executes faster, than "group by"-styled query from t2, on my SQL server.
But I don't know how I can write such query in HQL.
Only solution t