How to handle callableStatement.registerOutParameter(1, java.sql.Types.BOOLEAN);

前端 未结 1 1234
无人及你
无人及你 2021-01-26 20:57

Have a stored procedure in Oracle 10g/11g like the following:

CREATE OR REPLACE 
PROCEDURE SP_SOME_PROC (  PRM_ID IN NUMBER , START_DATE IN DATE,  RESULT OUT BOO         


        
相关标签:
1条回答
  • 2021-01-26 21:27

    While Oracle has a boolean type you can use in stored procedures, it does not have a boolean column type that can be sent across the JDBC interface. You are going to have to do some impedance matching (i.e. return int 0 & 1 or char 'T' and 'F').

    This lack of a boolean column type is a holdover from ANSI, a source of much wailing and gnashing of teeth on the Oracle forums (look up 'boolean' on AskTom).

    0 讨论(0)
提交回复
热议问题