Which SQL statement would you execute to display the expiration date of the warranty for a product?

View the Exhibit and examine the description of the PRODUCT_INFORMATION table. You want to display the expiration date of the warranty for a product. Which SQL statement would you execute?

View the Exhibit and examine the description of the PRODUCT_INFORMATION table.

You want to display the expiration date of the warranty for a product.

Which SQL statement would you execute?

A.
SELECT product_id, SYSDATE + warranty_period
FROM product_information;

B.
SELECT product_id, TO_YMINTERVAL(warranty_period)
FROM product_information;

C.
SELECT product_id, TO_YMINTERVAL(SYSDATE) + warranty_period FROM product_information;

D.
SELECT product_id, TO_YMINTERVAL(SYSDATE + warranty_period) FROM product_information;



Leave a Reply 2

Your email address will not be published. Required fields are marked *


user

user

TO_YMINTERVAL(’03-11′) would return 3 years 11 months as INTERVAL YEAR TO MONTH type
TO_YMINTERVAL(’01-05′) would return 1 year 5 months as INTERVAL YEAR TO MONTH type
TO_YMINTERVAL(’00-01′) would return 0 years 1 month as INTERVAL YEAR TO MONTH type

user

user

Year To Month Interval. Add YY-MM to the Sysdate.

C is invalid:

select to_yminterval(SYSDATE) from dual; — invalid —

select to_yminterval(’01-05′) from dual; output ==> 1-5