If my stored procedure has a print statement inside it:
print \'message\'
Is there a way to fetch the output in java program that connects
Yes, there is: https://dba.stackexchange.com/a/44373/5457
Statement stmt = ...; stmt.execute("some sql statement"); SQLWarning warning = stmt.getWarnings(); while (warning != null) { System.out.println(warning.getMessage()); warning = warning.getNextWarning(); }