how to set column width in Sybase

Hello Experts

How to set the column width in sybase databse.I am looking for alternative of oracle alternative "column <column name> format a<width>" in Sybase.

Vinit kumar
vinit kumarAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pawan KumarDatabase ExpertCommented:
Looks like do you want to change the width of the column. For that you need to use the Alter command like below.

ALTER TABLE yourtableName
MODIFY ColumName VARCHAR(20)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vinit kumarAuthor Commented:
Thanks Pawan for reply
Changes using above command is temporary or permanent.?
I mean changes in width value will be lost as soon as I logout from sybase?
0
Pawan KumarDatabase ExpertCommented:
Changes will be permanent.
0
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

vinit kumarAuthor Commented:
Pawan,what will be the command for session specific setting as I don't want to change data default settings.
I need environment setting for so that output is displayed in good format.
0
Shery VijayanSenior Database administration support analystCommented:
you can use left or right function or both  and specify the number of characters returned in the query  ..
or  try  using the sp_autoformat stored procedure provided by sybase .

sp_autoformat will dynamically resize columns  wrt to the largets value   ..
performance may be a concern if processing large result sets ..
0
Pawan KumarDatabase ExpertCommented:
>> What will be the command for session specific setting as I don't want to change data default settings.
This is not session specific.  You can do changes for session in the SQL query. and that will not change the column size.
0
Pawan KumarDatabase ExpertCommented:
Question abandoned.
Provided solution.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Sybase Database

From novice to tech pro — start learning today.