1.返回插入ID
a.xml
insert into KLC_QUESTION
(QUESTION_TITLE,QUESTION_DESC,STATUS,MODIFIER,CREATOR,GMT_CREATE,GMT_MODIFY,ANONYMOUS)
values (#questionTitle#,#questionDesc#,1,#modifier#,#creator#,now(),now(),#anonymous#)
select LAST_INSERT_ID() as value
b. java 类操作
public int insert(KlcQuestion klcQuestion) {
return (Integer) this.getSqlMapClientTemplate().insert("KlcQuestion.insert", klcQuestion);
}
2. ibatis result select 使用
3.ibatis iterate 使用
SELECT
DISTINCT(DATA_OWNER)
FROM DATA_API_DETAIL
WHERE STATUS = 1
#idList[]#