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
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.
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
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 )
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
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)
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.
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
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
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
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
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.
Peter_Chen
Highly Voted 2 years, 4 months agoDrexan
Most Recent 2 months, 2 weeks agofantastic_side_eye
3 months, 2 weeks agoKizTine
1 year, 3 months agoVoidWanderer
5 months agodurvaljr20
6 months, 3 weeks agositttttt
7 months agositttttt
7 months agoac77458
9 months agotom2992
8 months, 3 weeks agoac77458
9 months agoLee_jong_suk
1 year, 1 month agoRoneros
1 year, 4 months agoGuru_C
1 year, 6 months agoFredderik91
1 year, 7 months agojokri
1 year, 8 months agoPinoZ
1 year, 9 months agoAugustoaq
1 year, 10 months agoOrxan_H
1 year, 9 months agojfc1
2 years agoAbo_Dave
2 years, 1 month agoJ4vi
1 year, 10 months ago