delimiter // set @d=now(); select * from comment; select timestampdiff(second,@d,now()); delimiter ; Query OK, 0 rows affected (1 min 55.58 sec) +----------------------------------+ | timestampdiff(second, @d, now()) | +----------------------------------+ | 2 | +----------------------------------+ 1 row in set (1 min 55.58 sec)