Comments in PL/SQL
The comment makes the code more easy to read and understand. these statements we write as comments are not executed by the compiler and simply get ignored while executing the code. For example, suppose you are writing a PL/SQL block for Manipulating data in the database but the queries you are writing are way too complex for to understand others, hence in this case we can specify the comments wherever needed to make queries more readable and understandable by ourselves or by other programmers.
In databases sometimes we require some context about the query. To specify that context we use comments. In databases, comments are non-executable text that is inserted along with the query. We can specify comments while creating the following:
- Procedures in PL/SQL
- Views in DB
- Functions in PL/SQL
- Triggers in PL/SQL
Like most programming languages, we can also write comments in PL/SQL. There are two types of comments in PL/SQL:
- Single-line Comments
- Multi-line Comments
PL/SQL Comments
PL/SQL is a Procedural Language for SQL language that extends the functionality of the SQL within Oracle Database Management System. Comments can be used to make code more human-readable. It is a kind of note that programmers usually add while writing the code. In this article, We will learn about Comments in detail along with the types and benefits of using Comments.
Contact Us