zl程序教程

您现在的位置是:首页 >  后端

当前栏目

mybatis #与$区别

mybatis 区别
2023-09-27 14:23:19 时间

mybatis #与$区别

#{}变量解析到SQL有带引号字符串;如查询条件变量
如:select * from user where name = #{name};
为:select * from user where name = 'Jack';

${}变量解析到ORACLE是没带引号的字符串;如表前缀

如:select * from ${}.user where name 1=1;

为:select * from TABLEPER.user where name 1=1;