INPUT
declare
no number(5);
bal number(6);
deb_bal number(6);
min_bal constant number(5):=500;
begin
no:=&no;
deb_bal:=&deb_bal;
select balance into bal from acc where
acc_no=no;
if bal>min_bal then
update acc set
balance=balance-deb_bal where acc_no=no;
dbms_output.put_line('debit
sucessfully');
else
dbms_output.put_line('you
have not minimum balance');
end if;
end;
OUTPUT
1)
Enter value
for no: 1201
old 8:
no:=&no;
new 8:
no:=1201;
Enter value
for deb_bal: 1000
old 9:
deb_bal:=&deb_bal;
new 9:
deb_bal:=1000;
debit
sucessfully
PL/SQL procedure
successfully completed.
2)
Enter value
for no: 1202
old 8:
no:=&no;
new 8:
no:=1202;
Enter value
for deb_bal: 100
old 9:
deb_bal:=&deb_bal;
new 9:
deb_bal:=100;
you have not
minimum balance
PL/SQL
procedure successfully completed.
4 Comments
I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
ReplyDeleteoracle training in bangalore
This comment has been removed by the author.
ReplyDeleteReally useful content and well-structured information 👏
ReplyDeleteIf you’re planning to enter the testing domain, don’t miss Immek’s Software Testing Training in Chennai. Their courses include manual, automation, and advanced frameworks, plus placement support that helps you get real career results.
jmeter-performance-testing-training-in-chennai
etl-training-in-chennai
Thanks for the useful insights! I joined placement point solutions for Python training in Chennai, and the learning experience was top-notch. The team provides strong placement support and practical exposure that really makes a difference
ReplyDeleteBest Python Training in chennai