I am new to Ibatis and still learning it. I encountered this SQL query which needs to be converted in to an Ibatis query.
I tried putting in CDATA tag and tried some iterator tag also, but it didn't work out for me. Here's my query:
SELECT comp_small_name
FROM table_company
WHERE companyid IN (
SELECT agentid
FROM (
SELECT *
FROM table_comp_price
WHERE companyid = #compid#
ORDER BY companyid DESC
WHERE ROWNUM <= 2
)
)
This is intended for an Oracle database.