补充:
<select id="selectSumQFromTPATemReqMain" parameterType="HashMap" resultType="Integer">
select sum(quantity)
from tRF_PickAccessory_TempRequest_Main with(nolock)
where UserID =#{UserID} and WSOType=#{WSOType} and model=#{Model}
and IssueID in(select A from dbo.Fn_StrSplitToTable(#{IssueIDs},',',','))
</select>
可以正常获取字段名,只不过key值对应的value为null
<select id="selectSumQFromTPATemReqMain" parameterType="HashMap" resultType="Integer">
select quantity
from tRF_PickAccessory_TempRequest_Main with(nolock)
where UserID =#{UserID} and model=#{Model}
and IssueID in(select A from dbo.Fn_StrSplitToTable(#{IssueIDs},',',','))
</select>
拿不到字段名,拿到的map为null
我不是要查表的字段名,我要的是查询出来的结果的字段名。比如:select ShelfNo,Model,RemainderQty,BomNo,MasterID
from tRF_Product_Detail where LableNo='200000'
当表中没有查到LableNo='200000'的结果时,该如何获得字段名?只是举个例子,实际的查询语句可能更复杂