如何在 Oracle 中的单个命令中设置多个列宽? [英] How to set multiple column widths in a single command in Oracle?

查看:43
本文介绍了如何在 Oracle 中的单个命令中设置多个列宽?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在单个查询中设置表的不同列的宽度,但无法这样做.

I want to set the width of different columns of a table in a single query but am unable to do so.

我尝试了以下查询,但没有奏效

I tried the below query but it did not work

column Name format a10, trn_id mail a25 ;

出现错误,缺少表达式.

我该怎么做?

推荐答案

SQL*Plus 中 COLUMN 的语法引用自 文档:

The syntax for COLUMN in SQL*Plus is, to quote from the documentation:

COL[UMN] [{column | expr} [option ...]]

没有选项可以在多列上执行此操作,这意味着您的语法不正确.我只能建议你单独列出每一列.

There is no option to perform this on multiple columns, which means your syntax is incorrect. I can only suggest that you list each column separately.

column name format a10
column tm_id format a25

要记住的一件事;这不是一个查询.它只是一个格式化输出的命令.

One thing to bear in mind; this is not a query. It is a command to format output only.

这篇关于如何在 Oracle 中的单个命令中设置多个列宽?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆