Results 1 to 2 of 2

Thread: sql server 6.5 - transact sql

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2000
    Location
    Malaysia
    Posts
    1

    Lightbulb

    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


  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Lightbulb

    Here you go:

    Code:
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width