NITIN Rdbms Assignment
NITIN Rdbms Assignment
Table Deposit
ACTNO VARCHAR2(5)
CNAME VARCHAR2(20)
BNAME VARCHAR2(18)
AMOUNT NUMBER(8,2)
ADATE DATE
Query:- create table Deposit(ACNO VARCHAR2(5) primary key,CNAME
VARCHAR2(20),BNAME VARCHAR2(18),AMOUNT NUMBER(8,2),ADATE DATE) ;
Output:-
Table Branch
BNAME VARCHAR2(18)
CITY VARCHAR2(18)
Query:- create table Branch(BNAME VARCHAR2(18),CITY VARCHAR2(18));
Output:-
Table Borrow
LOANNO VARCHAR2(5)
CNAME VARCHAR2(20)
BNAME VARCHAR2(18)
AMOUNT NUMBER(8,2)
Query:- create table Borrow(LOANNO VARCHAR2(5),CNAME
VARCHAR2(20),BNAME VARCHAR2(18),AMOUNT NUMBER(8,2),PRIMARY
KEY(LOANNO),FOREIGN KEY(CNAME) REFERENCES CUSTOMER);
Output:-
Query:-desc Branch;
Output:-
Query:-desc Customer;
Output:-
Table Deposit
Account Branch Name Amount Amount Date
NumberCusto
mer Name
Table Branch
VRCE NAGPUR
AJNI NAGPUR
KAROLBAGH DELHI
MG ROAD BANGLORE
ANDHERI MUMBAI
VIRAR MUMBAI
NEHRU DELHI
PALACE
POWAI MUMBAI
GE ROAD BANGLORE
ANDHERI MUMBAI
Table Customer
ANIL KOLKATA
SUNIL DELHI
MEHUL BARODA
MADHURI PATNA
PRAMOD NAGPUR
SANDIP NAGPUR
SHIVANI SURAT
KRANTI MUMBAI
SHALINI MUMBAI
SANJANA MUMBAI
Table Borrow
Output:-
Output:-
Output:-
Output:-
2.Give names of Customer having the same living city as their Branch City.
3.Give names of Customers who are borrowers as well as depositers and living city
Nagpur
Query:- select Customer.CNAME from Deposit,Borrow,Customer
where Deposit.CNAME= Borrow.CNAME and Customer.CNAME=Borrow.CNAME
and Customer.CNAME=Deposit.CNAME and Customer.CITY='NAGPUR'
Output :-
5.Give names of Customers who are depositers and have the same branch city as that of
Mr. Sunil
Query:-SQL> select CNAME from Deposit JOIN Branch on
Deposit.BNAME=Branch.BNAME WHERE Branch.CITY =(SELECT Branch.CITY
FROM Branch JOIN DEPOSIT ON Deposit.BNAME=Branch.BNAME WHERE
Deposit.CNAME='SUNIL');
Output:-
Output:-
7.Give names of depositers having the same branch as the branch of Sunil
Query:-SQL> SELECT CNAME FROM DEPOSIT WHERE BNAME=(SELECT BNAME
FROM DEPOSIT WHERE CNAME='SUNIL');
Output:-
8.Give names of borrowers having loan amount greater than the loan amount of
Pramod
Query:-SQL> select B.BNAME from Borrow B,Deposit D where D.BNAME=B.BNAME and
B.AMOUNT>=(select amount from Borrow where CNAME='PRAMOD');
Output:-
9.Give names of customers living in the City where branch of Depositer Sunil is located
NITIN KUMAR SINGAUR 19 | P a g e MCA – 1st SEMESTER
Query:-SQL> select CNAME from Customer where CITY=(select Branch.CITY from
Branch,Deposit where Deposit.BNAME=Branch.BNAME AND Deposit.CNAME='SUNIL');
Output:-
10.Give loan number and loan amount of borrowers having the same branch as that of
Sunil
Query:-SQL> SELECT LOANNO,AMOUNT FROM BORROW WHERE
BNAME=(SELECT BNAME FROM DEPOSIT WHERE CNAME='SUNIL');
Output:-
11.Give loan number, Loan Amount, Account number and deposit amount of customer
having in city Nagpur
Query:-SQL> SELECT B.LOANNO,B.AMOUNT,D.ACNO,D.AMOUNT FROM
BORROW B,DEPOSIT D,CUSTOMER C WHERE D.CNAME=C.CNAME AND
C.CITY='NAGPUR' AND B.BNAME=D.BNAME;
Output:-
12.Give loan number, Loan Amount, Account number and deposit amount of customer
having branch located in Mumbai
NITIN KUMAR SINGAUR 20 | P a g e MCA – 1st SEMESTER
Query:-SQL> select b.LOANNO,b.AMOUNT,d.ACNO,d.AMOUNT from Deposit d,Borrow b,Customer
c,Branch br where C.CNAME=D.CNAME and D.BNAME=Br.BNAME and Br.CITY in(select CITY from
Branch where CITY='MUMBAI');
Output:-
13.Give oan number, Loan Amount, Account number, deposit amount, Branch Name,
Branch City and Living City of Pramod
Query:- select b.LOANNO,b.AMOUNT,d.ACNO,d.AMOUNT,br.BNAME,br.CITY,c.CITY
from Deposit d, Borrow b,Customer c,Branch br where b.CNAME=c.CNAME and d.CNAME =
c.CNAME and c.CITY=br.CITY and c.CNAME=’PRAMOD’;
Output:-
14.Give deposit details and loan details of customer in the city where Pramod is living
Query:-SQL> SELECT * FROM DEPOSIT,BORROW,CUSTOMER WHERE
CUSTOMER.CITY=(SELECT CITY FROM CUSTOMER WHERE CNAME='PRAMOD')
AND BORROW.CNAME=CUSTOMER.CNAME AND BORROW.CNAME
=DEPOSIT.CNAME ;
Output:-
16.Give names of depositers having amount greater than 5000 and having the same
living city as Mr. Pramod
Query:-SQL> SELECT DEPOSIT.CNAME FROM DEPOSIT ,CUSTOMER WHERE
CUSTOMER.CNAME=DEPOSIT.CNAME AND CUSTOMER.CITY=(SELECT CITY
Output:-
1. List all the customers who are depositers but not borrowers
Query:- SQL> select CNAME from Deposit minus(select CNAME from Borrow);
Output:-
2.List all the customers who are both depositers and borrowers.
Query:-SQL> SELECT CNAME FROM DEPOSIT INTERSECT SELECT CNAME FROM
BORROW;
Output:-
3.List all the customers, along with their amount who are either borrowers or depositers
NITIN KUMAR SINGAUR 25 | P a g e MCA – 1st SEMESTER
and living city Nagpur
Query:-SQL> SELECT DEPOSIT.CNAME FROM DEPOSIT,BORROW,CUSTOMER
WHERE CUSTOMER.CNAME=DEPOSIT.CNAME AND
BORROW.CNAME=DEPOSIT.CNAME AND CUSTOMER.CITY='NAGPUR';
Output:-
4.List all the depositers having deposit in all the branches where Sunil is having an
account.
Query:-SQL> SELECT DEPOSIT.CNAME FROM DEPOSIT,BRANCH WHERE
BRANCH.BNAME=DEPOSIT.BNAME AND DEPOSIT.BNAME IN(SELECT CNAME
FROM DEPOSIT WHERE CNAME='SUNIL');
Output:-
5.List all the customers living in City Nagpur and having branch city Mumbai or Delhi
Query:-SQL> select Customer.CNAME from Customer,Deposit,Branch where
Branch.BNAME=Deposit.BNAME and Customer.CNAME=Deposit.CNAME and
Customer.CITY='NAGPUR' and Branch.CITY in('MUMBAI','DELHI
Output:-
Output:-
7.List all the depositers living in city Nagpur and having branch in city Mumbai
Query:-SQL> select Deposit.CNAME from Deposit,Customer,Branch where
Deposit.CNAME=Customer.CNAME AND Deposit.BNAME=Branch.BNAME AND
Customer.CITY='NAGPUR' OR Branch.CITY='MUMBAI';
Output:-
Output:-
Output:-
10.List the borrowers having branch city same as that of Mr. Sunil.
Query:-SQL> SELECT CNAME FROM BORROW WHERE BNAME=(SELECT BNAME
FROM BORROW WHERE CNAME='SUNIL');
Output:-
12.List the depositer having tha same living city as that of Mr. Sunil and the same
branch city as that of mr. Sunil.
NITIN KUMAR SINGAUR 28 | P a g e MCA – 1st SEMESTER
Query:-SQL> SELECT DEPOSIT.CNAME FROM DEPOSIT,CUSTOMER,BRANCH
WHERE CUSTOMER.CNAME=DEPOSIT.CNAME AND
BRANCH.BNAME=DEPOSIT.BNAME AND CUSTOMER.CITY=(SELECT CNAME
FROM DEPOSIT WHERE CNAME='SUNIL') AND BRANCH.CITY=(SELECT CNAME
FROM CUSTOMER WHERE CNAME='SUNIL');
Output:-
13.List the depositers having amount less than 1000 and living in the same city as Mr.
Anil
Query:-SQL> SELECT DEPOSIT.CNAME FROM DEPOSIT,CUSTOMER WHERE
DEPOSIT.CNAME=CUSTOMER.CNAME AND DEPOSIT.AMOUNT<=1000 AND
CUSTOMER.CITY=(SELECT CNAME FROM CUSTOMER WHERE CNAME='ANIL');
Output:-
14.List all the customers who are both Depositors and borrowers and living in the same
city as Mr. Anil
Query:-SQL> SELECT DEPOSIT.CNAME FROM DEPOSIT,BORROW,CUSTOMER
WHERE CUSTOMER.CNAME=DEPOSIT.CNAME AND
BORROW.CNAME=DEPOSIT.CNAME OR CUSTOMER.CITY=(SELECT CNAME
FROM CUSTOMER WHERE CNAME=’ANIL’);
Output:-
15.List all the cities where branches of Anil and SunIl are located
Query:-SQL> select Customer.CITY from Branch B,Customer,Deposit D where
16.List all the customers name and amount for depositers living in the city where either
Anil or Sunil is Living
Query:-SQL> SELECT D.CNAME,D.AMOUNT FROM DEPOSIT D,CUSTOMER C
WHERE C.CNAME=D.CNAME AND C.CITY IN(SELECT C1.CITY FROM
CUSTOMER C1 WHERE C1.CNAME IN('SUNIL','ANIL'));
Output:-
17.List the amount for the depositers living in the city whete Anil is living
Query:-SQL> SELECT DEPOSIT.AMOUNT FROM DEPOSIT JOIN CUSTOMER ON
CUSTOMER.CNAME=DEPOSIT.CNAME WHERE CUSTOMER.CITY =(SELECT
CNAME FROM CUSTOMER WHERE CNAME='ANIL');
Output:-
19.List the customers who are borrowers or depositers and having living city Nagpur
and branch city as that of Mr. Sunil.
Query:-SQL> SELECT DEPOSIT.CNAME FROM
DEPOSIT,BORROW,CUSTOMER,BRANCH WHERE
CUSTOMER.CNAME=DEPOSIT.CNAME AND BORROW.CNAME=DEPOSIT.CNAME
AND DEPOSIT.BNAME=BRANCH.BNAME AND CUSTOMER.CITY='NAGPUR' AND
BRANCH.CITY=(SELECT CNAME FROM CUSTOMER WHERE CNAME='SUNIL');
Output:-
20.List the customers who are both borrowers and depositers and having the same
branch city as that of Mr. Anil.
Query:-SQL> select Deposit.CNAME from Deposit,Borrow,Customer,Branch where
Customer.CNAME=Deposit.CNAME AND Borrow.CNAME=Deposit.CNAME AND
Deposit.BNAME=Branch.BNAME AND Branch.CITY=(SELECT CNAME FROM
CUSTOMER WHERE CNAME='ANIL');
Output:-
4.List total deposit of customer having account date later than 1 Jan 96. Query:-
NITIN KUMAR SINGAUR 32 | P a g e MCA – 1st SEMESTER
SQL> select sum(AMOUNT) FROM Deposit where ADATE<='01-JAN-96';
Output:-
Output:-
Assignment No. - 6
Group by and Having
1. List the branches having sum of deposit more than 50000
Query:- SQL> select BNAME from Deposit group by BNAME having
sum(AMOUNT)>5000;
Output:
3.List the names of customers having deposit in the branches where the average deposit
is more than 50000
Query :-SQL> SELECT CNAME FROM DEPOSIT WHERE AMOUNT IN(SELECT
AVG(AMOUNT) FROM DEPOSIT)OR AMOUNT>5000;
Output:-
8. Give names of customers in VRCE branch having more deposit than all customer
from SB branch Andheri
Query :-SQL> SELECT D.CNAME FROM DEPOSIT D WHERE D.BNAME='VRCE'
AND D.AMOUNT > ALL ( SELECT MAX (DISTINCT D1.AMOUNT) FROM DEPOSIT
D1 WHERE D1.BNAME='ANDHERI');
9.Give names of customers in VRCE branch having more deposit than any other
customer in Andheri branch
Query :-SQL> SELECT CNAME FROM DEPOSIT WHERE AMOUNT > ALL (SELECT
AMOUNT FROM DEPOSIT WHERE BNAME='ANDHERI')AND BNAME='VRCE' ;
Output:-
10.Give names of customers having highest deposit in the branch where sunil is having
deposit
Query :-SQL>SELECT D1.CNAME FROM DEPOSIT D1, BRANCH B1 WHERE
D1.BNAME = B1.BNAME AND D1.AMOUNT >=ALL (SELECT D2.AMOUNT FROM
DEPOSIT D2, BRANCH B2 WHERE D2.CNAME ='SUNIL' AND D2.BNAME =
B2.BNAME AND B1.BNAME = B2.BNAME);
Output:-
12.Give names of customers having more deposit than the average deposit in their
respective branches.
Query :-SQL> SELECT D1.CNAME FROM DEPOSIT D1 WHERE D1.AMOUNT >= ALL
(SELECT AVG(D2.AMOUNT) FROM DEPOSIT D2 WHERE D1.BNAME = D2.BNAME
GROUP BY D2.BNAME);
Output:-
17.Give the names of cities in which the maximum number of branches are located.
Query :-SQL> SELECT CITY FROM BRANCH GROUP BY CITY HAVING COUNT
(BNAME)>=ALL(SELECT COUNT(BNAME) FROM BRANCH GROUP BY CITY);
Output:-
18.Give the names of customers living in the city where the maximum number of
depositers are located
Query :-SQL> SELECT C.CITY FROM CUSTOMER C WHERE CITY IN(SELECT
C.CITY FROM DEPOSIT D,CUSTOMER C WHERE C.CNAME=D.CNAME GROUP BY
C.CITY HAVING COUNT(D.CNAME) >ALL(SELECT COUNT(D.CNAME) FROM
DEPOSIT D,CUSTOMER C WHERE C.CNAME=D.CNAME GROUP BY C.CITY));
Output:-
20.Count the number of customers living in the city where branch is located.
4.Give 10% interest to all depositers living in Nagpur and having branch in city Mumbai.
Query :-SQL>UPDATE DEPOSIT SET AMOUNT=AMOUNT+(AMOUNT*10)/100
WHERE CNAME IN(SELECT CNAME FROM CUSTOMER WHERE CITY='NAGPUR')
AND BNAME IN(SELECT BNAME FROM BRANCH WHERE CITY='MUMBAI');
Output:-
6.Change the deposit of VRCE branch to 1000 and change the branch as VRCE- Ambazari
Query :-SQL>UPDATE DEPOSIT SET BNAME ='VRCE_AMBAZARI', AMOUNT=1000
WHERE BNAME='VRCE’;
Output:-
10.Deposit the sum of the deposits of Sunil and Vijay in the account of Anil.
Query :-SQL> UPDATE DEPOSIT SET AMOUNT=( SELECT SUM(AMOUNT) FROM
DEPOSIT WHERE CNAME IN('SUNIL','VIJAY')) WHERE CNAME='ANIL';
Output:-
Output:-
13.Transfer Rs. 10 from the account of Anil to the account of Sunil if both are living in Nagpur.
Query :-SQL> UPDATE DEPOSIT SET AMOUNT =AMOUNT-10 WHERE CNAME='ANIL'
AND CNAME IN(SELECT C.CNAME FROM CUSTOMER C CUSTOMER C1 WHERE
C1.CNAME='SUNIL' AND C.CITY ='NAGPUR' AND C.CITY=C1.CITY);
Output:-
15.Transfer Rs. 10 from the account of Anil to the account of Sunil if they are having
the same branches.
Query :-SQL> UPDATE DEPOSIT SET AMOUNT =AMOUNT- 10 WHERE
CNAME='ANIL' AND BNAME IN(SELECT D.BNAME FROM DEPOSIT D WHERE
D.CNAME='SUNIL');
Output:-
16.Add Rs. 1000 to the account of all those depositers who are having the highest deposit
amount in their respective branches.
Query :-SQL> UPDATE DEPOSIT SET AMOUNT=AMOUNT+1000 WHERE CNAME
IN( SELECT D.CNAME FROM DEPOSIT D GROUP BY D.BNAME,D.CNAME HAVING
AVG(D.AMOUNT)>=ALL(SELECT MAX(D1.AMOUNT) FROM DEPOSIT D1 WHERE
D.BNAME=D1.BNAME GROUP BY D1.BNAME));
Output:-
18.Add Rs. 100 to the amount of all depositers having deposit higher than the average deposit
of their branch
Query :-SQL> UPDATE DEPOSIT SET AMOUNT=AMOUNT+100 WHERE AMOUNT
IN (SELECT AVG(AMOUNT) FROM DEPOSIT GROUP BY BNAME);
Output:-
Output:-
20.Add Rs. 100 to the amount of all depositers having deposit higher than the average deposit
of their branch.
Query :-SQL> UPDATE DEPOSIT SET AMOUNT =AMOUNT+100 WHERE CNAME
IN(SELECT D.CNAME FROM DEPOSIT D GROUP BY D.CNAME HAVING
AVG(D.AMOUNT)> ALL( SELECT AVG(D1.AMOUNT) FROM DEPOSIT D1));
Output:-
4.Delete deposit of Anil and Sunil if both are having branch VIRAR.
Query:-SQL> DELETE FROM DEPOSIT WHERE CNAME IN('SUNIL','ANIL') AND
EXISTS (SELECT * FROM DEPOSIT D1,DEPOSIT D2 WHERE
D1.CNAME='ANIL'AND D2.CNAME='SUNIL'AND D1.BNAME=D2.BNAME AND
D1.BNAME='VIRAR');
Output:-
6.Delete deposit of Anil and Sunil if both are having same living city.
Query:-SQL> DELETE FROM DEPOSIT WHERE CNAME IN ('ANIL','SUNIL')AND EXISTS
(SELECT* FROM CUSTOMER C,CUSTOMER C1 WHERE C.CNAME='ANIL' AND
C1.CNAME='SUNIL' AND C.CITY=C1.CITY);
Output:-
7.Delete deposit of Anil and Sunil if both are having less deposit than Vijay
Query:-SQL> DELETE FROM DEPOSIT WHERE CNAME IN('ANIL','SUNIL') AND
EXISTS( SELECT * FROM DEPOSIT D,DEPOSIT D1 WHERE D.CNAME
IN('ANIL','SUNIL') AND D1.CNAME='VIJAY' AND D.AMOUNT< D1.AMOUNT);
Output:-
12.Delete borrower having loan more than 1000 and branch Karolbagh
Query:-SQL> DELETE FROM BORROW WHERE AMOUNT>1000 AND BNAME
IN(SELECT BNAME FROM BRANCH WHERE BNAME='KAROLBAGH');
Output:-
13.Delete the names of those depositers of VRCE branch who live in city Bombay
Query:-SQL> DELETE FROM DEPOSIT WHERE BNAME ='VRCE' AND CNAME IN(
SELECT CNAME FROM CUSTOMER WHERE CITY='BOMBAY');
Output:-
Table STUDENT
NAME VARCHAR(20)
CLASS VARCHAR(20)
ROLLNO NUMBER(10) PRIMARY KEY
AGE NUMBER(10)
CITY VARCHAR(20)
DOB DATE
MOB NUMBER(10)
Table BOOK
ACNO NUMBER(10)
BOOK_NAME VARCHAR(20)
AUTHOR VARCHAR(20)
PUBLISHER VARCHAR(20)
PRICE NUMBER
YEAR_OF_PUBLICATION DATE
Output:-
Output:-
Table DEPARTMENT
DPT_NO NUMBER PRIMARY KEY
DPT_NAME VARCHAR(20)
HOD VARCHAR(20)
PHONE_NO NUMBER
Table SUPPLIER
SUP_ID VARCHAR(3) PRIMARY KEY
SUP_NAME VARCHAR(20)
SUP_ADDRESS VARCHAR(20)
Query:-
Output:-
Output:-
Assignment No. 10
Output:-
3.Find the name of the student whose age greater then 18.
Query:- SQL> SELECT NAME FROM STUDENT WHERE AGE>18;
Output:-
6.Find the name of the books which price are greater then 10000.
7.Find the name of the students who is student of the MCA 1st semester.
Query:- SQL> SELECT NAME FROM STUDENT WHERE CLASS='MCA1st';
Output:-
10.Delete the record of the books which price are greater then 5000.
Query:- SQL> DELETE FROM BOOK WHERE PRICE>5000;
Output:-
1. Find the name of the student whose living in durg and age is greater then 35.
Query :- SQL> select NAME from student where city='durg' AND age>35;
Output ;-
2. Select student name from student table where city is durg and age is greater then 35.
Output :-
3. Find the name of the all student who lived in the bilashpur and age is less then 18.
Output :-
5. Find the name of the books which publish in the 2020 and price are greater and equal to 500.
Query :- SQL> select BOOK_NAME from book where YEAR_OF_PUBLICATION BETWEEN '01-JAN-
2020' AND '31-DEC-2020' AND price>=500;
Output :-
10. Find the name of the student where city is the descending order.
Query :- SQL> select NAME from student ORDER BY CITY DESC;
Output :-
12. Find the detail of the student who is greater than 01-JAN-2000.
Query :- SQL> select*from student where DOB>'01-JAN-2000';
Output :-
Assignment No.12
1. Find the account no of all books which issue on 10-Mar-2021.
Query :- SQL> select ACNO from book_issue where DATE_OF_ISSUE='10-MAR-2021';
Output :-
Output :-
4. Find the name of the book which year of publication not in a 2022 and the publisher is the PHP or
TATA MAIGHAI.
Query :- SQL> select BOOK_NAME from BOOK where YEAR_OF_PUBLICATION!='01-01-2022' AND
PUBLISHER= 'PHP'OR PUBLISHER='tata maighai';
Output :-
5. Find the name of the all students whose class is MCA 3rd and city is Raipur or Bhilai.
Query :- SQL> select NAME from student where CLASS='mca3rd' AND (CITY='raipur' OR CITY='bhilai');
Output :-
Output:-
DECLARE
n INTEGER;
i INTEGER;
j INTEGER;
BEGIN
DBMS_OUTPUT.PUT_LINE('9 terms cos(x) series');
n := 9;
j := 1;
DBMS_OUTPUT.PUT_LINE('cos(x) = ' || j);
j := j - 1;
FOR i IN 2..n LOOP
IF MOD(i, 2) = 0 THEN
j := j + 2;
DBMS_OUTPUT.PUT_LINE('-(x^' || j || '/' || j || '!)');
ESLE
j := j + 2;
DBMS_OUTPUT.PUT_LINE('+(x^' || j || '/' || j || '!)');
END IF;
IF j = n OR j + 1 = n THEN
EXIT;
END IF;
END LOOP;
END;
/
Output :-
Output:-
Outpput :-
6. Write a program in PL/SQL program to print the series of Even Number 1 to 10.
Coding :-
declare
num integer;
begin
dbms_output.put_line('Path: even.sql');
dbms_output.put_line('Author:- Nitin Kumar Singaur');
dbms_output.put_line('Date:- 07/12/2022 ');
dbms_output.put_line('unit:- V ');
dbms_output.put_line('MCA-1st SEMESTER');
dbms_output.put_line('even number series :');
for num in 1..10
loop
if mod(num,2)=0
then
dbms_output.put_line(num);
end if;
end loop;
end;
/
Output :-
Output :-
Output :-
Output :-
Output :-
Output :-
Output :-
Output :-
Output:-
UPDATE empdev
SET salary = salary + incentive
WHERE eid= emp_id;
updated := 'Yes';
END IF;
DBMS_OUTPUT.PUT_LINE (
'Table updated? ' || updated || ', ' ||
'incentive = ' || incentive || '.'
);
END calculate_incentive;
BEGIN
dbms_output.put_line('Author : Nitin Kumar Singaur');
dbms_output.put_line('Date:- 20/12/2022 ');
dbms_output.put_line('MCA-I SEMESTER');
dbms_output.put_line('Unit - v');
select salary into sal from empdev where eid=e;
target_qty := &target_qty;
calculate_incentive(sal, target_qty, e);
END;
/
Output:-
Output:-
Output:-
Output:-
Output:-
Output:-
Output:-
Output:-
Output:-
Output:-
Output:-
Output:-
Output:-
Output:
Output:
for k in 1..i
loop
dbms_output.put('*');
end loop;
dbms_output.new_line;
i:=i-2;
end loop;
end;
/
Output: