SQLite Forum

operator precedence docs missing, suggested clarifications below
Login
Actually NOT is WEAKER than between...

```
sqlite> select not 8 between -1 and 9;
0
sqlite> select (not 8) between -1 and 9;
1
```

The SQLite grammar concurs

```
%left OR.
%left AND.
%right NOT.
%left IS MATCH LIKE_KW BETWEEN IN ISNULL NOTNULL NE EQ.
%left GT LE LT GE.
%right ESCAPE.
%left BITAND BITOR LSHIFT RSHIFT.
%left PLUS MINUS.
%left STAR SLASH REM.
%left CONCAT.
%left COLLATE.
%right BITNOT.
```

I didn't find it clear at all until i saw the table in the grammar :D

As an illustration, check out https://en.cppreference.com/w/c/language/operator_precedence

My read of section is that between is tied with equality.  The thing is I can't find where it says where NOT goes.

I'll go over your other replies and see if I can find more clues on NOT from what you said.  Maybe it's just late and I'm tired.