SQLite - Arithmetic Operators


Advertisements


Example

Following are some simple examples showing the usage of SQLite Arithmetic Operators −

sqlite> .mode line
sqlite> select 10 + 20;
10 + 20 = 30

sqlite> select 10 - 20;
10 - 20 = -10

sqlite> select 10 * 20;
10 * 20 = 200

sqlite> select 10 / 5;
10 / 5 = 2

sqlite> select 12 %  5;
12 %  5 = 2

sqlite_operators.htm

Advertisements