Home

Lines in a multiline comment should start with *

Description

    The rule "Lines in a multiline comment should start with *" states that when writing a multiline comment in PL/SQL, each line should begin with an asterisk (*). This is a common convention for multiline comments in programming languages, and helps to make the code more readable and easier to understand.

Key Benefits

  • Clear Syntax: * at the beginning of each line makes the code more readable.
  • Easier to Maintain: Allowing for comments to span multiple lines makes it easier to maintain the code.
  • More Readable: Multi-line comments are more descriptive and easier to read than single-line comments.

 

Non-compliant Code Example

SELECT 
/* 
Customer table is for holding customer data such as Name, Address, etc.  --Non compliant code
Also it contains some crucial information like Credit limit, amount spent etc. --Non compliant code
*/
    NAME,
    ADDRESS,
    CREDIT_LIMIT       
FROM
    CUSTOMERS

Compliant Code Example

SELECT 
/* 
* Customer table is for holding customer data such as Name, Address, etc.--Compliant code
* Also it contains some crucial information like Credit limit, amount spent etc.--Compliant code
*/
    NAME,
    ADDRESS,
    CREDIT_LIMIT       
FROM
    CUSTOMERS
Visual Expert 2024
 VEPLSQLRULE180