JDBC + PL / SQL = Is it that simple or is there a catch?

I plan to execute Oracle PL \ SQL blocks via JDBC (I can’t check it yet, a few days question). Is there anything I should know? Does everything work the same as with regular SQL?

I mean:

ResultSet rs = st.executeQuery("DECLARE BEGIN NULL; END;"); 

Or do I need some custom classes? I would like to keep it as simple as possible (without ORM, etc.).

Thanks!

+4
source share
1 answer

You can invoke anonymous PL / SQL blocks using standard CallableStatement (and Oracle JDBC drivers). See Returning data from an anonymous PL / SQL block for sample code.

see also

+4
source

All Articles