Mega Code Archive

 
Categories / MySQL / Select Clause
 

Arithmetic Operators

mysql> mysql> SELECT 2+1; +-----+ | 2+1 | +-----+ |   3 | +-----+ 1 row in set (0.00 sec) mysql> mysql> SELECT 4-2/4; +--------+ | 4-2/4  | +--------+ | 3.5000 | +--------+ 1 row in set (0.00 sec) mysql> mysql> SELECT 4-(2/4); +---------+ | 4-(2/4) | +---------+ |  3.5000 | +---------+ 1 row in set (0.00 sec) mysql>