如何获取 SQL 中特定月份的记录

How to get records of a specific month in SQL

如何从当前日期快速获取月份 SQL?

我有下面的代码,但它抛出错误..

select month(current_date())
from table a
limit 1;

谢谢。

current_date 应该在没有大括号的情况下使用(根据 SQL 标准)

presto> SELECT month(current_date);
 _col0
-------
     3