我需要返回比赛Start_time
( - 4小时)以匹配我的时区,如下表所示:
select Start_time, Race_Name
from Race_Table
但我需要像select (hour, -4)Start_time, Race_Name from Race_Table
答案 0 :(得分:3)
<强> MySQL的:强>
SELECT Race_Name,
DATE_SUB(Start_time, INTERVAL 4 HOUR)
FROM Race_Table
SQL Server:
SELECT Race_Name,
DATEADD(HOUR, -4, Start_time)
FROM Race_Table