ibatis语句问题小白求教

select a,b,c,d字段
from
t_pms_publication a
left join t_pms_review_common b on a.id = b.rid and b.type = 'publication'
where 1=1
and
(select count(id) from t_pms_pubset_publication p where p.publication_id=a.id )='0'
and后这句话对吗?

不对撒,它相当于是where后的句子了,如果有结果的话就相当于是where 1=1 and count(id)这个样子的

给表名取别名都是需要加as的

这样会报错的吧,你可以把and 后的作为一张表和前面关联,这也不是ibatis 语句的问题,是什么数据库的问题