Q:

Write a PL/SQL block to show single and multiline comments

0

Write a PL/SQL block to show single and multiline comments.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

DECLARE
  some_condition  BOOLEAN;
  pi              NUMBER := 3.1415926; -- the value of pi is 3.1415926 : this is single line comment
  radius          NUMBER := 10;
  area            NUMBER;
BEGIN
 
  IF 2 + 2 = 4 THEN
    some_condition := TRUE;
  /* IF is the simple control flow statement  : this is multi line comment*/
  END IF;
 
  /* The line below in the statement computes the area of a circle.
  After the area is computed, the result is displayed. : : this is multi line comment*/
 
  area := pi * radius**2;
  DBMS_OUTPUT.PUT_LINE('The area of the circle is: ' || area);
END;
/

Sample Output:

The area of the circle is: 314.15926

Statement processed.

0.00 seconds

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now