1z0-071 Exam QuestionsBrowse all questions from this exam

1z0-071 Exam - Question 4


Which two are true? (Choose two.)

Show Answer
Correct Answer: ACE

ADD_MONTHS adds a number of calendar months to a date, which is a correct functionality of this function. LAST_DAY returns the date of the last day of the month for the date argument passed to the function, correctly describing what this function does. In contrast, the CEIL function returns the smallest integer greater than or equal to a specified number, which makes the suggested answer incorrect. CEIL does not return the largest integer less than or equal to a specified number. LAST_DAY is not limited to the current month only, as it can be applied to any date.

Discussion

17 comments
Sign in to comment
Peter_ChenOptions: AE
Sep 3, 2022

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

MILIKURANOptions: AE
Sep 6, 2022

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

PinoZOptions: AE
Mar 18, 2023

C is the definition of FLOOR()!

Guru_C
Jul 9, 2023

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.

Abo_Dave
Dec 13, 2022

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

J4vi
Feb 22, 2023

It admits VARCHAR and make an implicit transformation

fantastic_side_eyeOptions: AE
Jun 26, 2023

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.

KizTine
Sep 27, 2023

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

ac77458
Apr 13, 2024

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.

lambrosOptions: AC
Sep 13, 2022

I understand why it is A and C. I do not understand why D is not correct??

lambros
Sep 13, 2022

Sorry i meant E !!!!

Peter_Chen
Oct 9, 2022

ERROR IS ONLY. IF D IS correct,THEN F IS correct E= D+F

jfc1Options: AE
Jan 11, 2023

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

AugustoaqOptions: AE
Feb 19, 2023

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

Orxan_H
Apr 16, 2023

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

jokriOptions: AE
May 6, 2023

por sure AE are correct. C cannot be correct by "CEIL returns the largest integer...". Correct answer should be "CEIL returns the smallest integer..."

Fredderik91Options: AE
May 28, 2023

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

RonerosOptions: AE
Sep 4, 2023

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)

Lee_jong_sukOptions: AE
Dec 8, 2023

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

ac77458Options: AB
Apr 13, 2024

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 )

tom2992
Apr 22, 2024

No. B isn't correct cause CEIL can use with date and interval too.

sittttttOptions: AE
Jun 11, 2024

A and E is the correct answer. C is incorrect because ceil always return smallest integer greater than or equal to values.

sitttttt
Jun 11, 2024

B also so A,B and E

durvaljr20Options: AE
Jun 24, 2024

https://docs.oracle.com/database/121/SQLRF/functions025.htm "CEIL returns the smallest integer that is greater than or equal to n. "