SQL报错version for the right syntax to use near ‘LIMIT 10

The first time I encountered this error was when I needed to query a piece of random data with a table, just like a cat and a tiger

The Controller file is written like this:

The Mapper file is written like this

 

Then the XML file is written like this

 

Then there was that error. After checking, I found out that it was a problem with the Page object.

So if you, like me, just want to randomly connect tables to query a piece of data, just change the Mapper file like this

 

 

Guess you like

Origin blog.csdn.net/CJB2020818/article/details/129732906