Q: 5
Which two statements are true about the rules of precedence for operators?
Options
Discussion
My pick: A and B. Arithmetic with the same precedence runs left to right, and parentheses always let you change order for operations. C and E are just common traps people fall for on SQL exams. If someone thinks D fits, let me know but pretty sure it's not.
A and B for me. Arithmetic ops with equal precedence go left to right, and you can stack parentheses as much as you want to force order. The traps in C and E come up a lot on Oracle questions. Anyone disagree?
A and B tbh. C is tricky but + doesn't have top precedence, and E is a common trap, since || actually comes after arithmetic ops in Oracle SQL. Some practice sets trip people up on this.
Not totally sure but is it A and B? Guessing based on what I remember from SQL practice tests here-can someone confirm?
Its A and B, showed up just like this on a similar exam. Precedence was all about left-to-right for same level ops and using parentheses. Not sure anyone picking C or E but that’s not how Oracle handles it.
A and B tbh. The plus operator looking like highest precedence (C) trips folks up, but it's multiplication/division first in SQL. E is another gotcha since concat runs after math ops. Correct me if I missed something.
I don’t think E is right, gets a lot of people since concat || seems higher but it’s actually after arithmetic in Oracle SQL. Has to be A and B for precedence rules. Anyone strongly think C applies here?
Option A and B, saw this on a practice exam recently.
B and A imo. Plus and minus have equal precedence so A fits, and parentheses in B always override defaults. E is a classic trap, since || actually comes after arithmetic in Oracle SQL. Happy to be corrected, but pretty sure.
Be respectful. No spam.