Oracle code segment comment symbols start with "/*" and end with "*/". The comment method is such as "/*IF 2 2 = 4 THEN some_condition := TRUE; END IF;*/".
Recommended: "oracle tutorial"
Comments in Oracle PL/SQL code
Comments on Oracle PL/SQL code can be divided into two types:
- 单行注释 - 多行注释
Single-line comments start with "--", for example:
-- DELETE FROM employees WHERE comm_pct IS NULL
Multi-line comments start with "/ *" and ends with "*/", for example:
/* IF 2 + 2 = 4 THEN some_condition := TRUE; END IF; */
However, multi-line comments cannot be nested within multi-line comments, for example:
/* IF 2 + 2 = 4 THEN some_condition := TRUE; /* We expect this THEN to always be performed */ END IF; */
This is not allowed and a syntax error will be reported. . However, single-line comments can be included within multi-line comments, for example:
/* IF 2 + 2 = 4 THEN some_condition := TRUE; -- We expect this THEN to always be performed END IF; */
This is allowed. However, multi-line comments can contain the starting characters of multi-line comments, for example:
/* IF 2 + 2 = 4 THEN some_condition := TRUE; /* We expect this THEN to always be performed END IF; */
This is also allowed. But it cannot contain ending characters, for example:
/* IF 2 + 2 = 4 THEN some_condition := TRUE; We expect this THEN to always be performed */ END IF; */
This is not allowed and there is a syntax error
The above is the detailed content of What are the oracle code segment comment symbols?. For more information, please follow other related articles on the PHP Chinese website!