这种方式肯定有效,但它调用 UNIX_TIMESTAMP 2 次:
mysql> select UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP('2009-09-23 22:07:42');
+---------------------------------------------------------------+
| UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP('2009-09-23 22:07:42') |
+---------------------------------------------------------------+
| 639 |
+---------------------------------------------------------------+
1 row in set (0.05 sec)