How we store procedure in oralce for callable statements in jdbc
Answer / Kaushal Kishor Mishra
[{n 'QNO': '101344',n 'question': 'How we store procedure in oracle for callable statements in jdbc',n 'answer': 'To create a stored procedure in Oracle that can be called using JDBC, follow these steps:nn1. Connect to the Oracle database and create a new package:nn CONNECT / as sysdba;n CREATE OR REPLACE PACKAGE myPackage ASn PROCEDURE myProcedure(p_param IN number);n /nn2. Define the body of the stored procedure inside the package:nn CREATE OR REPLACE PACKAGE BODY myPackage ASn PROCEDURE myProcedure(p_param IN number) ISn BEGINn -- Your SQL code heren END myProcedure;n /nn3. Compile the package:nn ALTER PACKAGE myPackage COMPILE;nn4. Test the stored procedure using SQL*Plus or another Oracle client.nn5. Use JDBC CallableStatement to call the stored procedure from your Java code.
| Is This Answer Correct ? | 0 Yes | 0 No |
How can I connect mysql or oracle with java?
What is database null and Java null?
what is rowset?
What are the conditions applies to varchar variable, when using in procedures?
What does jdbc stand for?
Why we use jdbc instead of odbc?
Why resultset is used in java?
What is jdbc in java?
What is Apache DBCP API?
What is jdbc driver in java?
What is jdbc databasemetadata interface?
What is Statement and PreparedStatement? whatz the difference?