Skip to content Skip to sidebar Skip to footer

How To Set Multiple Column Widths In A Single Command In 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 a2

Solution 1:

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.

Post a Comment for "How To Set Multiple Column Widths In A Single Command In Oracle?"