mysql - Strange error in mybatis mapper -


I have a simple selection that I wrote in my statue mapper:

  & lt ; Select ID = "ListAllOrders" parameter type = "java.util.HashMap" resultMap = "commonMaps.detailedOrderResultMap" & gt; Select & lt; Refid = "commonSql.fragmentOrderFields" />, & lt; Include in refid = "commonSql.fragmentSummaryPriceInfoFields" /> Add order to join external order from graorder order grasummarypriceinfo summarypriceinfo DotPolice_id = summarypriceinfo.id & lt; If test = "userGroupId! = Null" & gt; Where order.userGroupId = # {userGroupId} & lt; / If & gt; Order_last update by command & lt; If test = "limit! = Null" & gt; Limit # {limit} & lt; / If & gt; & Lt; / Select & gt;   

There is a complaint when running this query:

  ### Error in querying database: com.mysql.jdbc.exceptions.jdbc4 MySQLSyntax Error Exception: There is an error in your SQL syntax;   

I'm just discouraged that the corr esponds close to the correct syntax for my MySQL server version include the left oute r grasummarypriceinfo summarypriceinfo for use on line 33

. I can not see any error in my selection ...

Do you have any clue?

You are using the SQL keyword order

  mysql> Select order.film_id, order order from movie order, where order.film_id & gt; 100th boundary 4;   

and got the same error:

Error 1064 (42000): There is an error in your SQL syntax; Check the manual that matches your MySQL server version, to use the correct syntax for 'order.film_id & gt; 100th boundary 4 'on line 1'

Comments