Skip to Main Content
Using SQLite
book

Using SQLite

by Jay A. Kreibich
August 2010
Intermediate to advanced content levelIntermediate to advanced
526 pages
23h 39m
English
O'Reilly Media, Inc.
Content preview from Using SQLite

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning SQL, 3rd Edition

Learning SQL, 3rd Edition

Alan Beaulieu
High Performance MySQL, 4th Edition

High Performance MySQL, 4th Edition

Silvia Botros, Jeremy Tinley

Publisher Resources

ISBN: 9781449394592Errata PageSupplemental Content