a group of SQL statements that forms a logical unit and performs a particular task.
are used to encapsulate a set of operations or queries to execute on database.
can be compiled and executed with different parameters and results and may have any combination of input/output parametersCreate procedure
Create procedure procedurename (specify in, out and in out parameters)
BEGIN Any multiple SQL statement; END;
Call procedure in java application using CallableStatement
CallableStatement csmt = con. prepareCall(”{call procedure name(?,?)}”);
csmt. registerOutParameter(column no. , data type);
csmt. setInt(column no. , column name) csmt.execute();
See the following video on collection interface in Java API.
http://www.youtube.com/watch?v=bBxfjR7c4wY
Also visit our site from more such Java / J2EE/ Core Java interview question with answers videos.