InterviewSolution
Saved Bookmarks
| 1. |
How can we use comments in a PL/SQL code? |
|
Answer» A code with a comment helps the developers in reading the source code properly. Like other programming languages, in PL/SQL, you can easily add comment to the code. Compiler IGNORES the content under the comment. The single-LINE comments under PL/SQL begin with the DELIMITER: -- (double HYPHEN)The multi-line comments are enclosed by: /* and */Let us see both the comments in the following code: DECLARE -- Variable declaration and initialization car varchar2(15) := 'Bentley'; BEGIN /* * UPPER() method in PL/SQL */ dbms_output.put_line(UPPER(car)); END; /Above, we have used both the single line and multi-line comment. The output: BENTLEY |
|