Evaluate the following SQL query;
What would be the outcome?
A.
200
B.
16
C.
160
D.
150
E.
100
Explanation:
Function Purpose
ROUND(column|expression, n) Rounds the column, expression, or value to n decimal places or, ifn is omitted, no decimal places (If n is negative, numbers to the left of decimal point are rounded.)
TRUNC(column|expression, n) Truncates the column, expression, or value to n decimal places or,
if n is omitted, n defaults to zero
D – 150 , beacuse when -1 is round left of point
C is correct
The answer might have been D, if the above value is rounded with 1 instead of -1.
good explanation
C is the Correct Answer.
C is the correct answer
reason is:
!56.00 when a round -1 is given it omits 6 from 156 and truns to 0 and move the 5 to 6 rounding to 160
it happns the rounding value is above 5
D will be correct if at all value was given in the question as 154.00
Hope this clears every one
I executed this query and I showed 159. Anybody tried with this sentence?
I am sorry. It’s OK, the answer is 160
160 tested