将postgresql中的列名更改为current_date

nbysray5  于 2023-03-01  发布在  PostgreSQL
关注(0)|答案(1)|浏览(137)

我想将列名更改为current_date,例如:

select date from table_name as current_date

current_date应该是今天的日期
我试过用双引号,但不管用。

x33g5p2x

x33g5p2x1#

这是在SQL中选择当前日期的方法,

SELECT DATE(NOW()) AS current_date
FROM table_name;

相关问题