2
我需要获取结果与两个表的组合。甲骨文加入查询与类似的条款
select template_id
from templatetbl
where template_xml like '%889d-5765405edb42%'
在quering上,我得到了24条记录。
现在我想用我之前得到的模板ID获取另一组记录。
select *
from sites
where site_xml like '%templateid%'.
Templateid是我之前得到的。
我想这样的查询
select *
from sites
where site_xml like (select template_id
from templatetbl
where template_xml like '%889d-5765405edb42%')
但得到错误的单行子查询返回多行。
请帮到这两个查询
我认为这仍然将有'太多rows'错误,如果子查询匹配的'templatetbl'多行 – Sodved