oracle代码段注释符号是以“/*”开始,以“*/”结束,注释方法如“/*if 2 + 2 = 4 then some_condition := true; end if;*/”。
推荐:《oracle教程》
oracle pl/sql代码中的注释
oracle pl/sql代码的注释可分为2种:
- 单行注释- 多行注释
单行注释以"--"开始,例如:
-- delete from employees where comm_pct is null
多行注释以“/*”开始,以“*/”结束,例如:
/* if 2 + 2 = 4 then some_condition := true; end if; */
但是多行注释不能嵌套多行注释,例如:
/* if 2 + 2 = 4 then some_condition := true; /* we expect this then to always be performed */ end if; */
这是不允许的,会报语法错误。但是多行注释内可以包含单行注释,例如:
/* if 2 + 2 = 4 then some_condition := true; -- we expect this then to always be performed end if; */
这是允许的。但是多行注释内可以包含多行注释的开始字符,例如:
/* if 2 + 2 = 4 then some_condition := true; /* we expect this then to always be performed end if; */
这也是允许的。但不可以包含结束字符,例如:
/* if 2 + 2 = 4 then some_condition := true; we expect this then to always be performed */ end if; */
这是不允许的,存在语法错误
以上就是oracle代码段注释符号是什么的详细内容。