#####
and t_name=#{tname}
#####
注意事项:
内容后的and和or不能去掉
trim作用和where一样,xx =xx AND xx=xxx
choose when otherwise //相当于if else if else结构
foreach标签 //用来遍历传入进来的sql参数不满足执行
注意事项:在映射接口中的方法参数为数组或者集合的话,mybatis会默认把里面的元素放入map集合中
用arg0,arg1或者param1param2来获取所以要使用@Param注解来指定访问方式
collections ------ 要遍历的集合或者数组
item ---------------保存每一个值得临时变量
spearator---------------每循环一次得分隔符
open--------------“” 循环开始添加的东西
close-----------""循环结束添加的东西
(#{student.sid},#{student.sname},#{student.sage},#{student.sphone},null)
#####
可以把公共的Sql语句声明到
声明INSERT INTO student VALUE 引入



