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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started