SELECT TRUNC(1234.5678,-2) FROM DUAL;

  1. 12

  2. 1234

  3. 1200

  4. 1234.56


Correct Option: C
Explanation:

To solve this question, the user needs to understand the TRUNC function in SQL and how it rounds a given number to a specified number of decimal places or digits.

The TRUNC function in SQL is used to truncate a number to a certain number of decimal places or digits. It takes two arguments, the first being the number to be truncated and the second being the number of decimal places or digits to which the number should be truncated.

In this case, the number 1234.5678 is being truncated to the nearest 100th, or -2 decimal places. This means that any decimal places beyond the 100th place will be dropped.

Now let's go through each option and explain why it is right or wrong:

A. 12: This option is incorrect because truncating 1234.5678 to the nearest 100th place would result in the number 1200, not 12.

B. 1234: This option is incorrect because the TRUNC function rounds the number down to the nearest 100th place, but it does not remove any digits before the decimal point. So the resulting number will still be 1234 with two decimal places truncated.

C. 1200: This option is correct. Truncating 1234.5678 to the nearest 100th place yields the number 1200 since all decimal places beyond the 100th place are dropped.

D. 1234.56: This option is incorrect because truncating 1234.5678 to the nearest 100th place would result in the number 1200 with two decimal places removed, not 1234.56.

Therefore, the correct answer is:

The Answer is: C

Find more quizzes: