Monday, July 7, 2014

PL/SQL Constants

As the name implies a constant is a value used in a PL/SQL Block that remains unchanged throughout the program. A constant is a user-defined literal value. You can declare a constant and use it instead of actual value.

For example: If you want to write a program which will increase the salary of the employees by 25%, you can declare a constant and use it throughout the program. Next time when you want to increase the salary again you can change the value of the constant which will be easier than changing the actual value throughout the program.
The General Syntax to declare a constant is:

Validate numeric field using javascript

The user input should always validated so that we can get correct and reliable data.

 For example, if you want user to input their age but if user inputs any letters then the system should not accept is as an input.