select * from person where name like "%"#{name}"%" spa
select * from person where name like '%'||#{name}||'%' code
select * from person where name like '%${name}%' 編譯
where username LIKE concat(cancat('%',#{username}),'%')
三種寫法對比後,第一種屬於預編譯SQL,後兩種都不是,所以推薦使用第一種寫法 select