DWQA QuestionsCategory: DatabaseMybatis batch deletion report SQL syntax error
I have a dream asked 2 months ago

XML code

<delete id="deleteByIds"  parameterType = "java.util.List">
        DELETE FROM user WHERE id IN
        <foreach collection="list"  item="item" open="(" separator="," close=")"  >

Information about the console

DELETE FROM user WHERE id IN          (                    ?          )
### Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''1184303620793794562'
         )' at line 3

What I post man said is {“delete IDS”: [“118430362079794562”]}, but “118430362079794562” appears on the console

_ Record 100 million in November replied 2 months ago

The ID set passed needs corresponding alias

1 Answers
Disaster answered 2 months ago

ID too big???