Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL 6.5 ??? How to Modifying colunm properties??? 1

Status
Not open for further replies.

FluFFy05

Programmer
Jul 4, 2000
19
CA
I want to change a colunm ex.:<br><br>Text varchar 5 <br>to<br>Text varchar 17<br><br><br>Thanks a lot <br><br>Fluffy
 
but when I do this, I have a error message <br><br>error near word 'alter'<br>I think that it don't reconize the word 'column'<br><br>I think that this solution run only under MS/SQL 7<br><br>Thanks FluFFy
 
I seem to remember that it is not possible to change a column in 6.5. You can only add a column that allows nulls as this won't physically change the data held (you are adding null values).<br><br>In 7.0 then gummadi is right that you should do a....<br><FONT FACE=monospace>ALTER TABLE theTableName<br>&nbsp;&nbsp;&nbsp;&nbsp;ALTER COLUMN theColumnName<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VARCHAR(17)</font> <p> <br><a href=mailto: > </a><br><a href= home</a><br>
 
Jnicho02 is correct, <br>you cannot modify a column in SQL 6.5. The only way to do it would be to create a new table with the new definition, copy the data to the new table and then drop the old table.<br>You can then rename the new table to the same name as the original table.<br><br><br>Chris Dukes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top