嵌套异常是java.sql.SQLException:找不到列'createdBy'

时间:2017-07-21 12:00:06

标签: mysql spring-mvc jdbctemplate

String sql = "select *,T.createdBy_id,(select count(*) from subscription S where S.topic_id=T.id) as subscriptionCount,"+
            "(select count(*) from resource R where R.topic_id=T.id) as topicCount from topic T "+
            "WHERE T.createdBy_id=6";

如果我在mySQL shell上执行相同的查询,它可以正常工作。 很久以来我一直在尝试这个。帮助赞赏

0 个答案:

没有答案