This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes SQL question : changing the string size of a column Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "SQL question : changing the string size of a column" Watch "SQL question : changing the string size of a column" New topic
Author

SQL question : changing the string size of a column

Sam Zou
Ranch Hand

Joined: Nov 18, 2002
Posts: 40
Hi,
I have a table that is already created and filled with data. One of the column is a VARCHAR(20)
and I'd like to change it now to something bigger VARCHAR(300).
What is the SQL command to do it ??
Thanks


Sam<p>"Life is difficult"<br /> -Scott Peck-</p>
Leslie Chaim
Ranch Hand

Joined: May 22, 2002
Posts: 336
This is how it's done in Oracle:
alter table your_table modify the_column varchar2(300);


Normal is in the eye of the beholder
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: SQL question : changing the string size of a column
 
It's not a secret anymore!