Hi all,
I was attempting one of the trial OCP tests. I found following question in it, please read it.
QUESTION
The ITEM table contains these columns:
COST NUMBER(7,2)
RETAIL NUMBER(7,2)
The RETAIL and COST columns must have a value that is greater than zero.
Evaluate these two SQL statements:
1. SELECT retail - (cost(1.25) * .10)
FROM item;
2. SELECT (retail - (cost * 1.25) * .10)
FROM item;
What will be the result?
A Statement 1 will return a lower value than statement 2.
B Statement 1 and Statement 2 will return the same values.
C Statement 1 will return a higher value than statement 2.
D Only one of the statements will execute.
ANS: According to OCP Test correct answer is B.
I've tried this answer, but first statement returns error. Please check it out, and if it corrent answer, please reply back.
Thanx.
I was attempting one of the trial OCP tests. I found following question in it, please read it.
QUESTION
The ITEM table contains these columns:
COST NUMBER(7,2)
RETAIL NUMBER(7,2)
The RETAIL and COST columns must have a value that is greater than zero.
Evaluate these two SQL statements:
1. SELECT retail - (cost(1.25) * .10)
FROM item;
2. SELECT (retail - (cost * 1.25) * .10)
FROM item;
What will be the result?
A Statement 1 will return a lower value than statement 2.
B Statement 1 and Statement 2 will return the same values.
C Statement 1 will return a higher value than statement 2.
D Only one of the statements will execute.
ANS: According to OCP Test correct answer is B.
I've tried this answer, but first statement returns error. Please check it out, and if it corrent answer, please reply back.
Thanx.