[英]How to make column name of query result in UPPERCASE
How to make column name of query result in UPPERCASE (Postgres)如何以大写形式制作查询结果的列名(Postgres)
SELECT USER_NAME, USER_AGE from table;
Result结果
user_name![]() |
user_age![]() |
---|---|
First![]() |
123 ![]() |
Second![]() |
234 ![]() |
Expectation: Result column name to be in uppercase ( USER_NAME USER_AGE instead of user_name and user_age).期望:结果列名称为大写( USER_NAME USER_AGE而不是 user_name 和 user_age)。
You can create an alias:您可以创建别名:
SELECT user_name as "USER_NAME",
user_age as "USER_AGE"
from table;
For details on how identifiers are treated see the manual有关如何处理标识符的详细信息,请参阅手册
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.