The rules are listed in descending order:
Parentheses (as well as brackets in lookup expressions and IN expressions). Note that you can freely add parentheses any time you want to impose an alternative precedence or to make precedence clearer.
* /
+ -
= <> < > <= >=
IS (IS NULL, IS NOT NULL, IS EMPTY, IS NOT EMPTY)
BETWEEN
NOT
AND
OR
|| (OR) doesn't have a highter order of precedence than + (addition). Here I'll show you why:
SELECT 1+1||'1.9' AS addition_operator FROM DUAL; --output: 21.9
SELECT '1.9'||1+1 AS or_condition FROM DUAL; --output: 2.91
In the first SELECT statement is first adding up 1+1 (2) and then concatenating with '1.9', making the output '21.9'.
Lastly, the second SELECT statement concatenates '1.9' with 1 ('1.91') and then adding up 1, making the output '2.91'.
This proves that, in this case, whatever comes first in the statement will be calculated.
If there was an order of precedence, the outputs would've been:
OR first: '12.9' (1+(1||'1.9')) and '2.91' (('1.91'||1)+1).
+ first: '21.9' ((1+1)||'1.9') and '1.92' ('1.9'||(1+1)).
So the correct answers are C and E.
This Oracle doc explains between OR, AND, and NOT. https://docs.oracle.com/en/database/other-databases/nosql-database/22.2/sqlreferencefornosql/operator-precedence.html
This section is not available anymore. Please use the main Exam Page.1z0-071 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
CyberP
Highly Voted 10 months, 2 weeks agoLuisLikes
Most Recent 1 month, 2 weeks agobignosepig
3 months ago21b6ee4
4 months agoSzczurk3y
1 month agoalic_alex
1 year, 1 month agodexdinh91
1 year, 3 months agoholdfaststrongly
1 year, 6 months agoAGoodStuff
1 year, 7 months ago