You are on page 1of 1

What is the difference between Function and Procedure? 1..

Procedure is a sub program written to perform a set of actions and returns multiple valuesUsing out parameters or return no value at all. 2..Function is a subprogram written to perform certain computations and return a single value. What are the modes for passing parameters to Oracle? There are three modes for passing parameters to subprograms 1.IN - An In-parameter lets you pass values to the subprogram being called. In the subprogram it acts like a constant and cannot be assigned a value. 2. OUT An out-parameter lets you return values to the caller of the subprogram. It acts like an initialized variable its value cannot be assigned to another variable or to itself. 3.INOUT An in-out parameter lets you pass initial values to the subprogram being called and returns updated values to the caller. What is the difference between Truncate and Delete Statement? 1.Truncate Data truncated by using truncate statement is lost permanently and cannot be retrieved even by rollback. Truncate command does not use rollback segment during its execution, hence it is fast.

You might also like