unexpected token: h near line 1, column 142 [select count(o) from com.hm.dao.entity.Tenant o ,Houserentalinfo r ,com.hm.dao.entity.Houses h where o.id = r.userId and r.houseId = h.id and h.housePurpose = ' 公寓房 ' ]
豆浆加糖的博客原始SQL如下:DELETE FROM tablename t WHERE t.id = #{id}改进方法:DELETE t FROM ...原因是mysql5.7中语法对别名要求比较严格,需要在WHERE子句中重新声明别名。或者 DELETE FROM tablename WHERE id = #{id}
weixin_39662611的博客一、问题背景查询语句sql:"select b.city_unit_name as disposeunitname,a.city_event_src_name as eventsrcname from to_stat_info t,to_trans_event_src a,to_trans_unit b where t.event_src_name=a.event_src_...