我正在尝试这个
SELECT DATEDIFF(second,log.start_time,log.end_time)
as seconds
from log
where log.log_id = "some crazy UUID";
但我收到一个错误,因为DATEDIFF()
不接受像 second 这样的格式化程序 expr。
所以我尝试了,
SELECT second(DATEDIFF(second,log.start_time,log.end_time))
as seconds
from log
where log.log_id = "some crazy UUID";
但这也不适用于格式化。