Q. 5.1
There are three forms of IF statements:
IF-THEN, IF-THEN-ELSE, and
IF-THEN-ELSIF.
The IF statement associates a Boolean value with a
sequence of statements enclosed by the keywords THEN
and END IF. The sequence of statements is
executed only if the boolean value returns TRUE. If
the value returns FALSE or NULL, the
IF statement does nothing.
The second form of IF statement adds the keyword
ELSE followed by an alternative sequence of
statements. The sequence of statements in the ELSE
clause is executed only if the Boolean value in IF
returns FALSE or NULL. By using
ELSE it is ensured that a series of statements is
executed in either case.
Q.5.2
DECLARE invoice_amount NUMBER;
BEGIN
invoice_amount := &enter_value;
IF invoice_amount < 0 THEN
RAISE_APPLICATION_ERROR(-20021,
'execute_sql: Negative value entered.
Status = ' || status);
END IF;
END;
Hope this helped. Please do upvote and if there are any queries please ask in comments section.
Question 5 (Marks: 15) Q.5.1 The IF Statement is the most commonly used control-flow statement. Discuss...
business and society
QUESTION 5 (20 Marks) 5.1 Critically discuss the principles of ethical decision making (10 marks) 5.2 Propose some practical suggestions for making ethical decisions. (5 marks) 5.3 Indicate why ethical decision making can be difficult (5 marks) QUESTION 6 (20 Marks) There are SEVEN (7) key environments that affect businesses today. Discuss these in the light of forces pushing towards more freedom (free markets) and those pushing towards more state control
QUESTION 5 (20 Marks) 5.1 Critically...