?
Solved

SQL 2000

Posted on 2006-04-03
3
Medium Priority
?
249 Views
Last Modified: 2010-04-17
Hi I am having problems altering or updating a table to hange the num,ber of charatcers a row takes.

Right Now I have a table name Course
I need to change the Course Name from varchar(15) to (40)
I have tried
ALTER table Course
update course_name varchar(50)  but get an error - also tried using the update command.

Thank you,
0
Comment
Question by:garciam7254
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
nayernaguib earned 2000 total points
ID: 16367282
Use the following command:

  ALTER TABLE Course ALTER COLUMN course_name SET DATA TYPE VARCHAR(40)

_______________

  Nayer Naguib
0
 

Author Comment

by:garciam7254
ID: 16367478
Thank you for you prompt response - but addtionally I am getting the following error:

erver: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'SET'.
Server: Msg 195, Level 15, State 1, Line 1
'DATA' is not a recognized SET statement.

I tried using modify.

0
 

Author Comment

by:garciam7254
ID: 16367493
ALTER TABLE Course
    ALTER COLUMN Course_Name varchar(50) NULL

I used this - and it worked.

Thank you.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Six Sigma Control Plans

750 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question