|
@@ -5,14 +5,16 @@
|
|
|
|
|
|
Boolean operator for comparing against one or multiple expressions.
|
|
|
|
|
|
-* Equality (`=`)
|
|
|
+[[sql-operators-equality]]
|
|
|
+==== `Equality (=)`
|
|
|
|
|
|
["source","sql",subs="attributes,callouts,macros"]
|
|
|
--------------------------------------------------
|
|
|
include-tagged::{sql-specs}/filter.sql-spec[whereFieldEquality]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* Null safe Equality (`<=>`)
|
|
|
+[[sql-operators-null-safe-equality]]
|
|
|
+==== `Null safe Equality (<=>)`
|
|
|
|
|
|
["source","sql",subs="attributes,callouts,macros"]
|
|
|
--------------------------------------------------
|
|
@@ -24,35 +26,40 @@ include-tagged::{sql-specs}/docs/docs.csv-spec[nullEqualsCompareWithNull]
|
|
|
include-tagged::{sql-specs}/docs/docs.csv-spec[nullEqualsCompareTwoNulls]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* Inequality (`<>` or `!=`)
|
|
|
+[[sql-operators-inequality]]
|
|
|
+==== `Inequality (<> or !=)`
|
|
|
|
|
|
["source","sql",subs="attributes,callouts,macros"]
|
|
|
--------------------------------------------------
|
|
|
include-tagged::{sql-specs}/filter.sql-spec[whereFieldNonEquality]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* Comparison (`<`, `<=`, `>`, `>=`)
|
|
|
+[[sql-operators-comparison]]
|
|
|
+==== `Comparison (<, <=, >, >=)`
|
|
|
|
|
|
["source","sql",subs="attributes,callouts,macros"]
|
|
|
--------------------------------------------------
|
|
|
include-tagged::{sql-specs}/filter.sql-spec[whereFieldLessThan]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* `BETWEEN`
|
|
|
+[[sql-operators-between]]
|
|
|
+==== `BETWEEN`
|
|
|
|
|
|
["source","sql",subs="attributes,callouts,macros"]
|
|
|
--------------------------------------------------
|
|
|
include-tagged::{sql-specs}/filter.sql-spec[whereBetween]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* `IS NULL/IS NOT NULL`
|
|
|
+[[sql-operators-is-null]]
|
|
|
+==== `IS NULL/IS NOT NULL`
|
|
|
|
|
|
["source","sql",subs="attributes,callouts,macros"]
|
|
|
--------------------------------------------------
|
|
|
include-tagged::{sql-specs}/filter.sql-spec[whereIsNotNullAndIsNull]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* `IN (<value1>, <value2>, ...)`
|
|
|
+[[sql-operators-in]]
|
|
|
+==== `IN (<value1>, <value2>, ...)`
|
|
|
|
|
|
["source","sql",subs="attributes,callouts,macros"]
|
|
|
--------------------------------------------------
|
|
@@ -64,21 +71,24 @@ include-tagged::{sql-specs}/filter.sql-spec[whereWithInAndMultipleValues]
|
|
|
|
|
|
Boolean operator for evaluating one or two expressions.
|
|
|
|
|
|
-* `AND`
|
|
|
+[[sql-operators-and]]
|
|
|
+==== `AND`
|
|
|
|
|
|
["source","sql",subs="attributes,callouts,macros"]
|
|
|
--------------------------------------------------
|
|
|
include-tagged::{sql-specs}/filter.sql-spec[whereFieldAndComparison]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* `OR`
|
|
|
+[[sql-operators-or]]
|
|
|
+==== `OR`
|
|
|
|
|
|
["source","sql",subs="attributes,callouts,macros"]
|
|
|
--------------------------------------------------
|
|
|
include-tagged::{sql-specs}/filter.sql-spec[whereFieldOrComparison]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* `NOT`
|
|
|
+[[sql-operators-not]]
|
|
|
+==== `NOT`
|
|
|
|
|
|
["source","sql",subs="attributes,callouts,macros"]
|
|
|
--------------------------------------------------
|
|
@@ -91,42 +101,48 @@ include-tagged::{sql-specs}/filter.sql-spec[whereFieldEqualityNot]
|
|
|
Perform mathematical operations affecting one or two values.
|
|
|
The result is a value of numeric type.
|
|
|
|
|
|
-* Add (`+`)
|
|
|
+[[sql-operators-plus]]
|
|
|
+==== `Add (+)`
|
|
|
|
|
|
["source","sql",subs="attributes,callouts,macros"]
|
|
|
--------------------------------------------------
|
|
|
include-tagged::{sql-specs}/arithmetic.sql-spec[plus]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* Subtract (infix `-`)
|
|
|
+[[sql-operators-subtract]]
|
|
|
+==== `Subtract (infix -)`
|
|
|
|
|
|
["source","sql",subs="attributes,callouts,macros"]
|
|
|
--------------------------------------------------
|
|
|
include-tagged::{sql-specs}/arithmetic.sql-spec[minus]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* Negate (unary `-`)
|
|
|
+[[sql-operators-negate]]
|
|
|
+==== `Negate (unary -)`
|
|
|
|
|
|
["source","sql",subs="attributes,callouts,macros"]
|
|
|
--------------------------------------------------
|
|
|
include-tagged::{sql-specs}/arithmetic.sql-spec[unaryMinus]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* Multiply (`*`)
|
|
|
+[[sql-operators-multiply]]
|
|
|
+==== `Multiply (*)`
|
|
|
|
|
|
["source","sql",subs="attributes,callouts,macros"]
|
|
|
--------------------------------------------------
|
|
|
include-tagged::{sql-specs}/arithmetic.sql-spec[multiply]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* Divide (`/`)
|
|
|
+[[sql-operators-divide]]
|
|
|
+==== `Divide (/)`
|
|
|
|
|
|
["source","sql",subs="attributes,callouts,macros"]
|
|
|
--------------------------------------------------
|
|
|
include-tagged::{sql-specs}/arithmetic.sql-spec[divide]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* https://en.wikipedia.org/wiki/Modulo_operation[Modulo] or Remainder(`%`)
|
|
|
+[[sql-operators-remainder]]
|
|
|
+==== `Modulo or Remainder(%)`
|
|
|
|
|
|
["source","sql",subs="attributes,callouts,macros"]
|
|
|
--------------------------------------------------
|
|
@@ -136,7 +152,8 @@ include-tagged::{sql-specs}/arithmetic.sql-spec[mod]
|
|
|
[[sql-operators-cast]]
|
|
|
=== Cast Operators
|
|
|
|
|
|
-* Cast (`::`)
|
|
|
+[[sql-operators-cast-cast]]
|
|
|
+==== `Cast (::)`
|
|
|
|
|
|
`::` provides an alternative syntax to the <<sql-functions-type-conversion-cast>> function.
|
|
|
|