In oracle, the variables are used for storing the data temporarily. These variables are used in the execution to manipulate data.

The syntax of variable declaration is shown below:

Code:
variable_name data_type [not null : value];
Example: The following example computes the sum of two values and prints the output.

Code:
declare
  a numeric;
  b numeric;
  c numeric;
begin
  a := 10;
  b := 20;
  c := a+b;
  dbms_output.put_line(c);
end;
/