Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SQL 新手
我正在使用该TO_TIMESTAMP功能将列更改为日期时间。无论如何我可以在TO_TIMESTAMP每次运行 SQL 时应用它的函数中减去 5 小时?
TO_TIMESTAMP
我目前如何使用它:
select col1 TO_TIMESTAMP(col2,'YYYY-MM-DD"T"HH24:MI:SS"Z"' ) as col2 from table
检查这个
SELECT TO_TIMESTAMP(col2,'YYYY-MM-DD"T"HH24:MI:SS"Z"' ) - INTERVAL '5' HOUR td FROM Table1