Assumming I have a stored functions in Oracle database called getSalary() that takes employee id as parameter.
I wonder whether we can call this function using Native SQL syntax, since if we use the hibernate stored procedures syntax, it requires us to return a resultset, which in my case, most of my existing functions return specific values and not a result.
Eg. can we do this?
Double sal = (Double) sess.createSQLQuery("select getSalary(100) as salary from dual")
Please advise.
Thank you.
_________________ Thank you.
Regards,
Jap.
|