SQL-过滤式字段名称
有没有办法只能从选择查询而不是字段名称获取值?
例如:
db=> select url from file where owner='abc' AND name='xyz';
url
---------------------------------------------------------
/abc/xyz.com
(1 row)
我只需要'/abc/xyz.com'而不是URL,并且(1行)
我可以在选择命令本身中使用过滤器吗? 如果没有,您能建议我其他选择吗?
Is there a way to get only the value from the Select Query and not the field name?
Ex:
db=> select url from file where owner='abc' AND name='xyz';
url
---------------------------------------------------------
/abc/xyz.com
(1 row)
I just need '/abc/xyz.com' and not url and (1 row)
Is there a filter I can use in the Select command itself?
if not, could you please suggest me other options?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 psql 互动模式,您可以切换到“ of-Ontally”“ tally”使用元命令
\ t
模式。 手册:与非交互模式的选项
-t
相同。 手册:In psql interactive mode, you can switch to "tuples-only" mode with the meta-command
\t
. The manual:The same is available as option
-t
for non-interactive mode. The manual: