时间:2022-12-06 01:26
like防止sql注入的示例:
在不同数据库下的用法不同,例如:
//mysql环境
select * from test where school_name like concat('%',${name},'%')
//oracle环境
select * from test where school_name like '%'||${name},'%'
//SQL Server环境
select * from test where school_name like '%'+${name},+'%'