$
select
* from a where id
= $
{recId
}
最后生成的
SQL为:
1select
* from a where id
= 1
即:直接将参数值替换到了原来$
{recId
}的位置,相当于硬拼
SQL
#
select
* from a where id
= #
{recid
}
最后生成的
SQL为:
select
* from a where id
= ?
即:#
{...}被识别为一个
SQL参数
转载请注明原文地址: https://win8.8miu.com/read-18565.html