SQL中,like的SQL注入防止,使用预编译SQL(?)的写法

xiaoxiao2021-02-27  256

Mysql数据库

str = "and indexNum like concat('%',?,'%')"

Oracle

str = "like '%' || ? || '%'"

SQL Server str = "like '%' + ? + '%'"

  
转载请注明原文地址: https://www.6miu.com/read-8771.html

最新回复(0)