COMPUTER SCIENCE AND ENGINEERING
SQL
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
The SQL statementSELECT ROUND(45.926, -1) FROM DUAL;
|
is illegal
|
|
prints garbage
|
|
prints 045.926
|
|
prints 50
|
Explanation:
Detailed explanation-1: -For above given example, the output would be 50 because the nearest tens of 45.926, is 50. Taking another example, if we have to round (44.678, -1), the out put would be 40, because the nearest tens of 44.678 is 40.
Detailed explanation-2: -SELECT ROUND(45.926, -1) FROM dual; Result: 50, considering the value to be 4.5926, rounding it to 5 and then printing the result.
Detailed explanation-3: -The ROUND() function rounds a number to a specified number of decimal places. Tip: Also look at the FLOOR() and CEILING() functions.
Detailed explanation-4: -The correct answer is Select, where, group by, having.
There is 1 question to complete.