PDA

Click to See Complete Forum and Search --> : sql server 6.5 - transact sql


uma
May 5th, 2000, 09:44 PM
Anyone please help :

What is the correct SQL Syntax to modify a field in a table in a SQL Server 6.5?

eg: Table name is Sample and a field is Sampling_Point varchar(10). How do you change the field size to 15?

I tried the syntax:

ALTER TABLE Sample
MODIFY Sampling_Point varchar(15)

.......but it gives an error "modify syntax incorrect".

What is the equivalent of Modify in SQL Server's Transact SQL Statements?

Hope someone could help me with this, much appreciated.

Uma

Serge
May 5th, 2000, 11:10 PM
Here you go:


Alter Table sample
Alter Column Sampling_Point varchar(15)


By the way it is recomended, if you use string type of field and the length is less then 50, then use char data type instead of varchar