1. Naming rules for identifiers
When you use identifiers in PL/SQL to define variables, constants, the identifier name must begin with a character and cannot exceed 30 characters in length. In addition, to improve the readability of the program, Oracle recommends that users define various identifiers according to the following rules:
(1) When defining variables, it is recommended to use v_ as a prefix, such as V_sal, V_job, and so on.
(2) When defining constants, it is recommended to use C_ as a prefix, such as c_rate.
(3) When defining cursors, it is recommended to use _cursor as a suffix, such as emp_cursor.
(4) When defining an exception, it is recommended to use E_ as a prefix, such as E_integrity_error.
(5) When defining a PL/SQL table type, it is recommended to use _table_type as a suffix, such as sal_table_type.
(6) When defining a PL/SQL table variable, it is recommended to use _table as a suffix, such as sal_table.
(7) When defining a PL/SQL record type, it is recommended to use _record_type as a suffix, such as emp_record_type.
(8) When defining a PL/SQL record variable, it is recommended to use _record as a suffix, such as Emp_record.
2. Casing Rules
When you write an SQL statement and a PL/SQL statement in a PL/LC block, the statement can either use uppercase or lowercase. However, in order to improve the readability and performance of the program, Oracle recommends that the user be encoded in the following casing rules:
(1) The SQL keyword in uppercase format, such as SELECT, UPDATE, SET, where and so on.
(2) PL/SQL keywords in uppercase format, such as DECLARE, BEGIN, end, etc.
(3) data type in uppercase format, such as INT, varchar2,date, etc.
(4) Identifiers and parameters in lowercase format, such as V_sal, c_rate, etc.
(5) Database objects and columns in lowercase format, such as EMP, Sal, ename and so on.
This article from "It Technology Learning and communication" blog, declined reprint!
PL/SQL Code authoring rules