QuestionQ160Verified/Manipulating DataCopy linkReport a problemAsk AstroTutorSave questionRefer to the structure of the PROGRAMS table: Which two SQL statements execute successfully?Choose twoASELECT NVL(ADD_MONTHS(END_DATE, 1), SYSDATE) FROM programs;BSELECT TO_DATE(NVL(SYSDATE-END_DATE, SYSDATE)) FROM programs;CSELECT NVL(MONTHS_BETWEEN(start_date, end_date), 'Ongoing') FROM programs;DSELECT NVL(TO_CHAR(MONTHS_BETWEEN(start_date, end_date)), 'Ongoing') FROM programs;Show AnswerAnswerExplanationADD_MONTHS returns a DATE, so it can be used with SYSDATE in NVL. MONTHS_BETWEEN returns a number; converting that result with TO_CHAR makes it compatible with the character fallback value 'Ongoing'.Show comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion