SQL语句编译后提示缺失右括号
select TBL_TOPIC.* from TBL_TOPIC
where boardId=1
and topicId not in (select topicId from TBL_TOPIC where boardId=1 and rownum<=1 order by publishTime)
and rownum <20 order by publishTime
提示缺失右括号
把子查询提取查询结果写入not in()中没有问题
select topicId from TBL_TOPIC where boardId=1 and rownum<=1 order by publishTime
查询结果1,2
select TBL_TOPIC.* from TBL_TOPIC
where boardId=1
and topicId not in (1,2)
and rownum <20 order by publishTime
正确
请问怎么回事啊?