postgresql 当中,
select * from t2 where ccode=(select  ccode from t1 where cnam like 'HZ%' limit 1;);
这个查询的子查询(select  ccode from t1 where cnam like 'HZ%' limit 1;)会不会执行多次?如果分开写,
select  ccode from t1 where cnam like 'HZ%' limit 1;  -- t1 有几百条记录,ccode唯一,,t2中有很多相同的ccode
怎么把ccode当初一个参数cx, 传给第二个查询???
select * from t2 where ccode=cx;