Quick Search:
 The Oracle CONSTANT Variable      [Return To Index] Jump to:  


An Oracle constant is a variable which is is defined or declared once, and which is not changeable at run-time. A constant is exactly what its name implies: a value which is fixed and unchanging. The constant declaration specifies the name, data type, and value of the constant. A constant declaration can also specifiy the NOT NULL CONSTRAINT.

Example Syntax:

constant_name CONSTANT datatype [NOT NULL] { := | DEFAULT } expression;

Example Usage:

C_WIDTH CONSTANT numeric(8,1) := 25.1;

In the constant declaration example above the constant is named "C_WIDTH", is given the datatype of NUMERIC, and a value of "25.1"

Related Links:

Related Code Snippets:
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org