Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam 1z0-071 topic 1 question 4 discussion

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

Which two are true? (Choose two.)

  • A. ADD_MONTHS adds a number of calendar months to a date.
  • B. CEIL requires an argument which is a numeric data type.
  • C. CEIL returns the largest integer less than or equal to a specified number.
  • D. LAST_DAY returns the date of the last day of the current month only.
  • E. LAST_DAY returns the date of the last day of the month for the date argument passed to the function.
  • F. LAST_DAY returns the date of the last day of the previous month only.
Show Suggested Answer Hide Answer
Suggested Answer: AC 🗳️
Reference:
https://docs.oracle.com/database/121/SQLRF/functions025.htm
https://docs.oracle.com/cd/B28359_01/server.111/b28286/functions004.htm

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Peter_Chen
Highly Voted 1 year, 8 months ago
maby AE is Right... C. CEIL returns the largest integer less than or equal to a specified number. Can change : CEIL returns the minmum integer more than or equal to a specified number
upvoted 11 times
...
ac77458
Most Recent 3 weeks, 2 days ago
Selected Answer: AB
Based on Oracle's definitions, even though they do not make sense. Since when common sense is common practice? Anyhow for test purposes. According to that information I believe the correct answers are ABE. Although you can only choose 2. Oracle's Definition of CEIL: CEIL returns the smallest integer that is greater than or equal to n. ( https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CEIL.html#GUID-6DCC9AFB-9B80-4C27-AF63-5AA3B1E43660 ) C is incorrect as it says: CEIL returns the largest integer less than or equal to a specific number. This is the definition of FLOOR ( https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/FLOOR.html#GUID-67F61AC7-C097-4397-A122-213157BF584F ) E: LAST_DAY ( https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/LAST_DAY.html#GUID-296C7C02-7FB9-4AAC-8927-6A79320CE0C6 )
upvoted 1 times
tom2992
2 weeks, 1 day ago
No. B isn't correct cause CEIL can use with date and interval too.
upvoted 1 times
...
...
ac77458
3 weeks, 2 days ago
B also could an answer as if you execute select ceil('abc') from dual; you get ORA-017222: invalid number. Making this even more confusing.
upvoted 1 times
...
Lee_jong_suk
5 months ago
Selected Answer: AE
AE is the correct answer. SELECT LAST_DAY(TO_DATE('09-SEP-2023')) FROM DUAL; //op- 30-09-2023 SELECT CEIL('100'.2) FROM DUAL; //op 101 select add_months(TO_DATE('25-DEC-2023'),3) from dual; //op 25-03-2024
upvoted 1 times
...
Roneros
8 months ago
A and E are the correct answers. A - ADD_MONTHS returns the date date plus integer months. (https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ADD_MONTHS.html#GUID-B8C74443-DF32-4B7C-857F-28D557381543) E - LAST_DAY returns the date of the last day of the month that contains date. The return type is always DATE, regardless of the datatype of date. (https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions072.htm)
upvoted 1 times
...
Guru_C
10 months ago
C. CEIL returns the largest integer less than or equal to a specified number. How does Option:C is correct. CEIL always return greater than or equal to specified number.
upvoted 3 times
...
fantastic_side_eye
10 months, 2 weeks ago
The two true statements are: AE Explanation: B. CEIL is an Oracle SQL function that requires an argument which is a numeric data type. This statement is false, as CEIL can also take input arguments of type DATE or TIMESTAMP. C. CEIL is an Oracle SQL function that returns the smallest integer greater than or equal to a specified number. This statement is false, as CEIL actually returns the largest integer less than or equal to a specified number. D. LAST_DAY is an Oracle SQL function that returns the date of the last day of the current month only. This statement is false, as LAST_DAY can be used with any date argument to return the last day of that month. E. This statement is true. LAST_DAY is an Oracle SQL function that can be used with a date argument to return the date of the last day of the month for that date. For example, LAST_DAY('2023-06-26') would return '2023-06-30'. F. This statement is false. LAST_DAY can be used with any date argument to return the last day of that month, not just the previous month.
upvoted 2 times
KizTine
7 months, 1 week ago
Are you sure that CEIL function can also take input arguments of type DATE or TIMESTAMP ? I think it can take nonnumeric data type (that can be implicitly converted to a numeric data type) as an argument. https://www.w3resource.com/oracle/oracle-numeric-functions/oracle-ceil-function.php
upvoted 1 times
...
...
Fredderik91
11 months, 2 weeks ago
AE is correct, C is false CEIL return SMALL NOT LARGEST https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/CEIL.html#GUID-6DCC9AFB-9B80-4C27-AF63-5AA3B1E43660
upvoted 1 times
...
jokri
1 year ago
por sure AE are correct. C cannot be correct by "CEIL returns the largest integer...". Correct answer should be "CEIL returns the smallest integer..."
upvoted 1 times
...
PinoZ
1 year, 1 month ago
Selected Answer: AE
C is the definition of FLOOR()!
upvoted 3 times
...
Augustoaq
1 year, 2 months ago
I think that these are correct: A, B, E. C is wrong because CEIL returns the smallest integer that is greater than or equal to the specified number
upvoted 1 times
Orxan_H
1 year ago
Why B incorrect: This function takes as an argument any numeric data type or any nonnumeric data type that can be implicitly converted to a numeric data type. The function returns the same data type as the numeric data type of the argument. https://docs.oracle.com/database/121/SQLRF/functions025.htm#SQLRF00614
upvoted 4 times
...
...
jfc1
1 year, 3 months ago
Selected Answer: AE
C is wrong because CEIL returns the smallest integer greater than or equal to a specified number. https://docs.oracle.com/database/121/SQLRF/functions025.htm#SQLRF00614 E is good Because select last_day(('01-FEB-2023')) as "xxxgg" from dual; Answer : 2/28/2023 Finally the answer is AE
upvoted 1 times
...
Abo_Dave
1 year, 4 months ago
Why B is not correct ?? It is true the CIEL_FUNCTION() requires a numeric data type. I do not understand why it is being ignored! please refer to this source: https://www.w3resource.com/sql/arithmetic-functions/ceil-with-positive-value.php
upvoted 2 times
J4vi
1 year, 2 months ago
It admits VARCHAR and make an implicit transformation
upvoted 3 times
...
...
lambros
1 year, 7 months ago
I understand why it is A and C. I do not understand why D is not correct??
upvoted 1 times
lambros
1 year, 7 months ago
Sorry i meant E !!!!
upvoted 1 times
...
Peter_Chen
1 year, 7 months ago
ERROR IS ONLY. IF D IS correct,THEN F IS correct E= D+F
upvoted 1 times
...
...
MILIKURAN
1 year, 8 months ago
Selected Answer: AE
Answer: A, E "CEIL returns smallest integer greater than or equal to n. and can use any numeric or nonnumeric data type that can be implicit converted to numeric adta type" https://docs.oracle.com/database/121/SQLRF/functions025.htm#SQLRF00614
upvoted 4 times
...
yashas1145
1 year, 8 months ago
Selected Answer: AE
A, E may be right. As per option C, Ceil returns the lesser integer compared to the argument provided. last_day('date') provides the last day of whatever date is provided as argument.
upvoted 2 times
...
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 ...