This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread 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 Murach's Java Servlets and JSP this week in the Servlets 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
 
Similar Threads
Get only date in a select statement
SQL SUM function
ORA-00972: identifier is too long at select statement
Inserting values from textbox into database
Problem in reading a multilengual XML file into database