Home > Database > Oracle > body text

What are the oracle code segment comment symbols?

藏色散人
Release: 2020-10-19 14:23:50
Original
5454 people have browsed it

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;*/".

What are the oracle code segment comment symbols?

Recommended: "oracle tutorial"

Comments in Oracle PL/SQL code

Comments on Oracle PL/SQL code can be divided into two types:

- 单行注释
- 多行注释
Copy after login

Single-line comments start with "--", for example:

-- DELETE FROM employees WHERE comm_pct IS NULL
Copy after login

Multi-line comments start with "/ *" and ends with "*/", for example:

/*
 IF 2 + 2 = 4 THEN
        some_condition := TRUE; 
    END IF; 
*/
Copy after login

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;
 */
Copy after login

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; 
*/
Copy after login

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; 
*/
Copy after login

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; 
*/
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!