exam questions

Exam 1z0-061 All Questions

View all questions & answers for the 1z0-061 exam

Exam 1z0-061 topic 4 question 60 discussion

Actual exam question from Oracle's 1z0-061
Question #: 60
Topic #: 4
[All 1z0-061 Questions]

You want to display the date for the first Monday of the next month and issue the following command:
SQL>SELECT TO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE), 'MON'), 'dd "is the first Monday for 'fmmonth rrrr') FROM DUAL;
What is the outcome?

  • A. It executes successfully and returns the correct result.
  • B. It executes successfully but does not return the correct result.
  • C. It generates an error because TO_CHAR should be replaced with TO_DATE.
  • D. It generates an error because rrrr should be replaced by rr in the format string.
  • E. It generates an error because fm and double quotation marks should not be used in the format string.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️
NEXT_DAY(date, 'char'): Finds the date of the next specified day of the week ('char') following date. The value of char may be a number representing a day or a character string.
LAST_DAY(date): Finds the date of the last day of the month that contains date
The second innermost function is evaluated next. TO_CHAR('28-OCT-2009', 'fmMonth') converts the given date based on the Month format mask and returns the character string October. The fm modifier trims trailing blank spaces from the name of the month.

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Currently there are no comments in this discussion, be the first to comment!
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...