Variable Naming

Contact Us or call 1-877-932-8228
Variable Naming

Variable Naming

PL/SQL variable names must start with a letter and can be followed by up to 29 additional characters (for a total maximum length of 30 characters). Valid characters include letters, numerals, dollar signs, underscores, and number signs. Note that dashes in names are not permitted (this is a common problem when using XML and PL/SQL together). Also note that variable names are not case sensitive. This is similar to SQL but unlike other case sensitive languages such as Java.

There is no standard naming convention for variables beyond the enforcement on size and characters used. Some programmers use v_ to distinguish a variable from a parameter (identified using p_). Others indicate the data type in a similar manner (i_ for integer, d_ for date, v_ for VARCHAR2). It is advisable to have your organization select a naming standard to encourage some degree of uniformity in coding.

Next