Jay Pipes wrote:

Yes, indeed, but then again, that's what makes MySQL such a convenient
calculator, Roy! :

[EMAIL PROTECTED]: /home/jpipes]$ mysql --user=root --password
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.0.51a-3ubuntu5.1 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SELECT 22+20 AS "Answer to life, the Universe, and Everything";
+----------------------------------------------+
| Answer to life, the Universe, and Everything |
+----------------------------------------------+
|                                           42 |
+----------------------------------------------+
1 row in set (0.03 sec)

Who says standard SQL cannot be a calculator? It also looks slightly like Oracle :)

select 22+20 as "Answer to life, the Universe, and Everything"
from (values '1') as dual;

Do not attempt this on MySQL, though...

And just to stop a good discussion: IMHO this is a useful MySQL extension...

Roy

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to