您的位置:首页 > 其它

ibatis中 #和$ 区别

2012-07-13 14:55 295 查看
在IbatiS的select中有两个占位符 # 和 $

   我们先看一个查询语句:

    select * from user where Name = #userName#;
ibatis解析成:select * from user where Name = ? 这样的语句,然后在填充参数。
   

   select * from user where Name = ‘$userName$’
ibatis解析成:select * from user where Name = '传过来的值'  (传过来的值直接填充)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ibatis user