alter size of varchar column, syntax

The attached code returns:

Unclosed quotation mark after the character string 'ALTER COLUMN expanded [varchar(1024)]'.

web_site.expanded is currently a varchar(10), I want to be able to convert it to varchar(1024). The column doesn't contain any data at the time I'm trying to do this. Thanks!
ALTER TABLE web_site [ALTER COLUMN expanded [varchar(1024)]]

Open in new window

Brad BansnerWeb DeveloperAsked:
Who is Participating?
 
pssandhuCommented:
Try this:
ALTER TABLE web_site 
ALTER COLUMN expanded varchar(1024)

Open in new window

0
 
RiteshShahCommented:
it is good to use two part name like schemaname.tablename, assuming your schema is DBO.

ALTER TABLE dbo.web_site
ALTER COLUMN dbo.web_site.expanded varchar(1024)

0
 
Brad BansnerWeb DeveloperAuthor Commented:
Works great, thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.