In MyBatis, you mark the places where parameters should be inserted into your SQL like so:
SELECT * FROM Person WHERE id = #{id}
The bind feature is available with mybatis version 3.2 or greater. For versions below that:- The following worked for me, in Mysql. I have used the concat function.
select name,email from users where upper(name) like concat("%",concat(upper(#{searchQuery}),"%")) or upper(email) like concat("%",concat(upper(#{searchQuery}),"%")) and upper(email) != upper(#{email}) ;