[discrete] [[esql-binary-operators]] === Binary operators [[esql-binary-operators-equality]] ==== Equality [.text-center] image::esql/functions/signature/equals.svg[Embedded,opts=inline] Check if two fields are equal. If either field is <> then the result is `null`. NOTE: This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>. Supported types: include::types/equals.asciidoc[] ==== Inequality `!=` [.text-center] image::esql/functions/signature/not_equals.svg[Embedded,opts=inline] Check if two fields are unequal. If either field is <> then the result is `null`. NOTE: This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>. Supported types: include::types/not_equals.asciidoc[] ==== Less than `<` [.text-center] image::esql/functions/signature/less_than.svg[Embedded,opts=inline] Check if one field is less than another. If either field is <> then the result is `null`. NOTE: This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>. Supported types: include::types/less_than.asciidoc[] ==== Less than or equal to `<=` [.text-center] image::esql/functions/signature/less_than_or_equal.svg[Embedded,opts=inline] Check if one field is less than or equal to another. If either field is <> then the result is `null`. NOTE: This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>. Supported types: include::types/less_than_or_equal.asciidoc[] ==== Greater than `>` [.text-center] image::esql/functions/signature/greater_than.svg[Embedded,opts=inline] Check if one field is greater than another. If either field is <> then the result is `null`. NOTE: This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>. Supported types: include::types/greater_than.asciidoc[] ==== Greater than or equal to `>=` [.text-center] image::esql/functions/signature/greater_than_or_equal.svg[Embedded,opts=inline] Check if one field is greater than or equal to another. If either field is <> then the result is `null`. NOTE: This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>. Supported types: include::types/greater_than_or_equal.asciidoc[] [[esql-add]] ==== Add `+` [.text-center] image::esql/functions/signature/add.svg[Embedded,opts=inline] Add two numbers together. If either field is <> then the result is `null`. Supported types: include::types/add.asciidoc[] [[esql-subtract]] ==== Subtract `-` [.text-center] image::esql/functions/signature/sub.svg[Embedded,opts=inline] Subtract one number from another. If either field is <> then the result is `null`. Supported types: include::types/sub.asciidoc[] ==== Multiply `*` [.text-center] image::esql/functions/signature/mul.svg[Embedded,opts=inline] Multiply two numbers together. If either field is <> then the result is `null`. Supported types: include::types/mul.asciidoc[] ==== Divide `/` [.text-center] image::esql/functions/signature/div.svg[Embedded,opts=inline] Divide one number by another. If either field is <> then the result is `null`. NOTE: Division of two integer types will yield an integer result, rounding towards 0. If you need floating point division, <> one of the arguments to a `DOUBLE`. Supported types: include::types/div.asciidoc[] ==== Modulus `%` [.text-center] image::esql/functions/signature/mod.svg[Embedded,opts=inline] Divide one number by another and return the remainder. If either field is <> then the result is `null`. Supported types: include::types/mod.asciidoc[]