Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Modify table

Author  Topic 

ungureandavid
Starting Member

2 Posts

Posted - 2009-03-23 : 09:17:58
hi

i have a table with same columns. I have a column that is char(3000) type, i want to convert that column to (text) type!

How can i do that?
I'm using sql server management 2008
thanks in advance

david

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-03-23 : 10:04:25
changing the datatype of a column is pretty easy. You can use the designer (from object explorerer - right-click the table) OR you can use ALTER TABLE ALTER COLUMN in a query window. See Books Online for examples.

But do you really want to go to TEXT? That will be going away in future versions in favor of nvarchar(max) and varchar(max). What is the largest values that you expect in this column? If < 8000 then use varchar(<something<=8000>) rather than varchar(max). But for new design work don't use TEXT or NTEXT or IMAGE types.

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -