This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC 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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
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 agree. Here's the link: http://aspose.com/file-tools
 
subject: SQL question : changing the string size of a column