1

I've got a working program in Java which is using SQLServer as DB. I know how to use the 'normal' way of using MyBatis like:

<select id="getAllWeapons" resultType="String" parameterType="Map">
        select distinct weaponId 
        from WeaponTab;
</select>

However Im curious if Im able to call Stored Procedures existing in the SQL database that others wrote to make my life easier.

Any documentation or tips to the right direction will do.

I did some digging and saw this:

<select id = "callById" resultMap = "result" parameterType = "Student" statementType = "CALLABLE">
      {call read_record_byid(#{id, jdbcType = INTEGER, mode = IN})}
</select> 

So does it mean the keyword to using Stored Procedures is call?

1

1 Answer 1

1

Yes. It is definition as specification of JDBC(CallableStatement). See https://docs.oracle.com/javase/8/docs/api/java/sql/CallableStatement.html.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.