gpt4 book ai didi

java - 如何在 PostgreSQL 中将客户 idcardno 和护照从 select as 查询中查询为 idcardno/passport?

转载 作者:行者123 更新时间:2023-12-01 09:00:47 24 4
gpt4 key购买 nike

目前,我遇到了“/”问题。例如,我想从表中选择客户身份证号码和护照。但实际上idcardno和passport与idcardno在同一列。

根据我的要求,我希望查询为“Idcardno/Passport”,例如:选择 idcardno 作为 idcardno/Passport,* 来自客户

但在谷歌上找不到任何帮助,这一行也总是出错。请问这样的编程可以吗?

有人可以帮我解决这个问题吗?我们将非常感谢您的回答。

非常感谢。

最佳答案

如果您想将 idcardno 别名为 idcardno/Passport,请使用 " 封装别名

select
idcardno as "idcardno/Passport",
c.*
from customer c

关于java - 如何在 PostgreSQL 中将客户 idcardno 和护照从 select as 查询中查询为 idcardno/passport?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41693684/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com