A brief introduction to operator expressions in SQLite
This article introduces the relevant knowledge of "A brief introduction to operator expressions in SQLite". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Operator expressions in SQLite
In SQLite, operators include unary operators, binary operators, and ternary operators. The parameters and priorities required by these operators are given in figure 3.12. Among them, the unary operator has the highest precedence and the ternary operator has the lowest priority.
Figure 3.12 operator and execution order
The unary operator is actually an operation on a target. In SQLite, there are four unary operators supported, namely "-", "+", "~" and NOT, which are described as follows:
Flip the symbol of the value and multiply it by-1.0.
The +: operator is basically a no-operation, leaving a value with the same symbol as before, which does not make a negative value positive.
~: like C language, "?" Operator to perform bitwise inversion. This operator is not part of the SQL language standard.
The NOT:NOT operator uses 3VL to reverse Boolean expressions. (we will introduce 3VL later.)
The binary operator operates on two targets and is infix (that is, between two operands). All the binary operators supported by SQLite are listed in Table 3-1, which are arranged from highest to lowest priority.
Table 3-1 binary operator
That's all for "A brief introduction to operator expressions in SQLite". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!