Sqlite-arithmetic-operators

提供:Dev Guides
2020年6月23日 (火) 02:27時点におけるMaintenance script (トーク | 投稿記録)による版 (Imported from text file)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先:案内検索

SQLite-算術演算子

以下は、SQLiteの算術演算子の使用法を示すいくつかの簡単な例です-

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