Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How we store procedure in oralce for callable statements in jdbc



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

Post New Answer

More JDBC Interview Questions

How can I connect mysql or oracle with java?

1 Answers  


What is database null and Java null?

1 Answers  


what is rowset?

3 Answers   Marlabs,


What are the conditions applies to varchar variable, when using in procedures?

1 Answers  


What does jdbc stand for?

1 Answers  


Why we use jdbc instead of odbc?

1 Answers  


Why resultset is used in java?

1 Answers  


What is jdbc in java?

1 Answers  


What is Apache DBCP API?

1 Answers  


What is jdbc driver in java?

1 Answers  


What is jdbc databasemetadata interface?

1 Answers  


What is Statement and PreparedStatement? whatz the difference?

2 Answers  


Categories