Question: PL/SQL Oracle 12c. Write a function which inputs two dates and compares the two dates. The function returns -1, 0, or +1 depending on whether

PL/SQL Oracle 12c. Write a function which inputs two dates and compares the two dates. The function returns -1, 0, or +1 depending on whether the 1st date is less, equal to, or greater than the 2nd date. (The time component is not to be considered here.)

Purpose: To compare two dates

Input Parameters: 2 dates

Input/Output parameters: None

Output Parameters: None

Return value: Integer(-1, 0, +1)

Preconditions: Dates in standard format

Postconditions: Dates unchanged. Comparison Value Returned.

- Write a simple driver to call and test procedure

- Test each of the three different possible comparison values.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!