web笔记

Ibatis我们使用SqlMap进行Sql查询时需要引用参数参数引用遇符号#和$之间区分:

#进行与编译进行类型匹配而$进行数据类型匹配例:

select * from table where id = #id# 其字段id字符型#id#表示'id'类型id整型#id#id类型 
select * from table where id = $id$ 字段id整型Sql语句会出错字段id字符型Sql语句应该写成 select * from table where id = '$id$'

posted @ 2018-01-03 11:12  Calo-missile  阅读(70)  评论(0编辑  收藏  举报