At times, when you want to compute the result of a mathematical formula, you can use MySQL to do the task. It is a great tool for this. Here are a few examples:
Query:
SELECT PI();
Output:
+------------+| PI() |+------------+| 3.141593 |+------------+
Query:
SELECT PI() * 7;
Output:
+------------+| PI() * 7 |+------------+| 21.991149 |+------------+
Query:
SELECT 399*12/4, 6*12;
Output:
+------------+------------+| 399*12/4 | 6*12 |+------------+------------+| 1197.0000 | 72 |+------------+------------+