Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions