using defaultyou can use the keyword default


Using DEFAULT

You can use the keyword DEFAULT rather than that of the assignment operator to initialize the variables. For e.g. the declaration
blood_type CHAR := ’O’;

it can be rewrite as follows:

blood_type CHAR DEFAULT ’O’;

Use DEFAULT for the variables that have a typical value. Use the assignment operator for the variables (like counters & accumulators) which have no typical value. Some of the examples are shown below:

hours_worked INTEGER DEFAULT 40;
employee_count INTEGER := 0;

You can also use DEFAULT to initialize the cursor parameters, subprogram parameters,  and fields in a user-defined record.

Request for Solution File

Ask an Expert for Answer!!
PL-SQL Programming: using defaultyou can use the keyword default
Reference No:- TGS0172477

Expected delivery within 24 Hours