In the following query, which expression is evaluated first?

SELECT id_number, (quantity – 100 / 0.15 – 35 * 20) FROM inventory

Options
- 100 / 0.15
- quantity – 100
- 35*20
- 0.15-35


CORRECT ANSWER : 100 / 0.15

Discussion Board
Correct answer is 100 / 0.15

According to the precedence of expression as in BODMAS (Brackets, Order, Division, Multiplication, Addition, Subtraction) the expression is evaluated, which ensures the equation steps are completed in the right order. So, the correct answer is 100 / 0.15.

Prajakta Pandit 02-2-2017 02:06 AM

PEMDAS rule

P - Parentheses first
E - Exponents (ie Powers and Square Roots, etc.)
MD - Multiplication and Division (left-to-right)
AS - Addition and Subtraction (left-to-right)

career 09-18-2014 12:33 AM

Correction

35*20 Using the formular PEMDAS.
P-parenthesis
E-exoponents
M-multiplication
D-division
A-additiion
S-substraction

Victor Newton 09-17-2014 02:38 PM

Ans

depende upon operator priority

Arun 08-10-2014 09:28 AM

Answer

35*20

Neela 05-22-2014 05:33 AM

orcl

nothing

sree 07-17-2013 12:56 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement