This content originally appeared on DEV Community and was authored by Kelvin Wangonya
Saw this in the MySQL docs. I'm assuming this only works for relational databases.
I don't know if it's very useful but definitely interesting.
MariaDB[] > SELECT SIN(PI()/4), (4+1)*5;
+------------------+---------+
| SIN(PI()/4) | (4+1)*5 |
+------------------+---------+
| 0.70710678118655 | 25 |
+------------------+---------+
1 row in set (0.02 sec)
postgres=# SELECT SIN(PI()/4), (4+1)*5;
sin | ?column?
--------------------+----------
0.7071067811865475 | 25
(1 row)
This content originally appeared on DEV Community and was authored by Kelvin Wangonya

Kelvin Wangonya | Sciencx (2021-10-23T15:29:20+00:00) You can use your database as a simple calculator. Retrieved from https://www.scien.cx/2021/10/23/you-can-use-your-database-as-a-simple-calculator/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.