Cover by Jay A. Kreibich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

Binary Expressions

Binary operators take two values as parameter expressions and combine or compare them in some way that produces an output value. This section includes all of the operators with nonkeyword representations, plus AND and OR. With the exception of AND and OR, all of these operators will produce a NULL result if either parameter expression is NULL.

image with no caption

SQLite supports the following binary expression operators:

|| String concatenation

The || operator is used to concatenate text values. This operator is defined by the SQL standard. Although some databases support the nonstandard + operator for concatenating text values, SQLite does not. Non-NULL parameter expressions will first be converted to text values.

* Multiplication

Standard numeric multiplication of two numbers. Non-NULL parameter expressions will first be converted to numeric values. If both expressions are integers, the result will also be an integer.

/ Division

Standard numeric division of two numbers. The result will be the lefthand operator divided by the righthand operator. Non-NULL parameter expressions will first be converted to numeric values. If both expressions are integers, the integer division will be used and the result will also be an integer.

% Modulo or remainder

Standard numeric modulo of two numbers. The expression value will be the remainder of the left operator divided by the right. If either parameter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required