Write a PL/SQL program for a function

Write a PL/SQL program for a function returning total tax collected from a particular place.

PL/SQL program
Create of Replace Function Tax-Amt
Place varchar2,
Return Number is
Place_wise_tot_tax : = 0;
Begin
   Select sum(TaxAmt) from Tax where location = Place;
   Place_wise_tot_tax = TaxAmt;
   Return Place_wise_tot_tax
End Tax-Amt
What are the types PL/SQL code blocks?
What are the types PL/SQL code blocks? - Anonymous Block: It is a block of codes without a name...
Advantages of PL/SQL
Advantages of PL/SQL - Support SQL data manipulation, Provide facilities like conditional checking, branching and looping...
What is a union, intersect, minus?
What is a union, intersect, minus? - Union operator is used to return all rows from multiple tables and eliminate duplicate rows...
Post your comment