Experience Have done application programming as well as some installation and administration mostly with MySQL for web servers and site development and also with IMS and DB2 on legacy systems in the past.
Question Hello there, I am studying IT and have an exam and I know I should know this but I have only just found out there is an order to the operators! Can you help?
what is the correct order of SQL operators?
a) OR, AND, NOT, =
b) =, NOT, AND, OR
c=, >, <, <=, >=
d>=, <=, <, >, =
Operator precedences are shown in the following list, from lowest precedence to the highest. Operators that are shown together on a line have the same precedence.
:=
||, OR, XOR
&&, AND
NOT
BETWEEN, CASE, WHEN, THEN, ELSE
=, <=>, >=, >, <=, <, <>, !=, IS, LIKE, REGEXP, IN
|
&
<<, >>
-, +
*, /, DIV, %, MOD
^
- (unary minus), ~ (unary bit inversion)
!
BINARY, COLLATE