nerdexam
Oracle

1Z0-007 · Question #184

Evaluate this SQL statement: SELECT e.employee_id, (.15 e.salary) + (.5 e.commission_pct) + (s.sales amount (.35 e.bonus)) AS CALC_VALUE FROM employees e, sales s WHERE e.employee_id = s.emp_id…

The correct answer is C. There will be no difference in the value displayed in the CALC_VALUE column. There will be no difference in the value displayed in the CALC_VALUE column because not arithmetic operations or usage of alias for the calculated expression in the SELECT clause will not cause change the value appearance. Incorrect Answers A: There will be no difference in the…

Basic SQL SELECT Statements

Question

Evaluate this SQL statement:

SELECT e.employee_id, (.15* e.salary) + (.5 * e.commission_pct) + (s.sales amount * (.35 * e.bonus)) AS CALC_VALUE FROM employees e, sales s WHERE e.employee_id = s.emp_id; What will happen if you remove all the parentheses from the calculation?

Options

  • AThe value displayed in the CALC_VALUE column will be lower.
  • BThe value displayed in the CALC_VALUE column will be higher.
  • CThere will be no difference in the value displayed in the CALC_VALUE column.
  • DAn error will be reported.

How the community answered

(55 responses)
  • A
    5% (3)
  • B
    9% (5)
  • C
    82% (45)
  • D
    4% (2)

Explanation

There will be no difference in the value displayed in the CALC_VALUE column because not arithmetic operations or usage of alias for the calculated expression in the SELECT clause will not cause change the value appearance. Incorrect Answers A: There will be no difference in the value displayed in the CALC_VALUE column. B: There will be no difference in the value displayed in the CALC_VALUE column. D: There is no error in this statement.

Topics

#operator precedence#arithmetic expressions#parentheses#SELECT expressions

Community Discussion

No community discussion yet for this question.

Full 1Z0-007 Practice