- Apache Presto 教程
- Apache Presto - 首頁
- Apache Presto - 概述
- Apache Presto - 架構
- Apache Presto - 安裝
- Apache Presto - 配置
- Apache Presto - 管理
- Apache Presto - SQL 操作
- Apache Presto - SQL 函式
- Apache Presto - MySQL 聯結器
- Apache Presto - JMX 聯結器
- Apache Presto - HIVE 聯結器
- Apache Presto - KAFKA 聯結器
- Apache Presto - JDBC 介面
- 自定義函式應用程式
- Apache Presto 有用資源
- Apache Presto - 快速指南
- Apache Presto - 有用資源
- Apache Presto - 討論
Apache Presto - 日期時間運算子
查詢 1
presto:default> select date '2016-06-20' + interval '2' day as date_add;
結果
date_add ------------ 2016-06-22
上述輸出表示使用間隔資料型別從指定日期新增兩天。
查詢 2
presto:default> select time '12:30' + interval '1' hour as time_add;
結果
time_add -------------- 13:30:00.000
此處,從給定時間新增一小時。
查詢 3
presto:default> select timestamp '2016-06-21 12:32' + interval '2' year as timestamp_add;
結果
timestamp_add ------------------------- 2018-06-21 12:32:00.000
apache_presto_basic_sql_operations.htm
廣告