原创

Mybatis中PostgreSQL的LIKE关键字使用大全

SELECT * FROM public."user"
WHERE UPPER(username) LIKE UPPER('%' || #{username} || '%');

SELECT * FROM public."user"
WHERE CONCAT(username) LIKE CONCAT('%', #{username}, '%');

SELECT * FROM public."user"
WHERE username LIKE '%' || #{username} || '%';
正文到此结束
该篇文章的评论功能已被站长关闭
本文目录