Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

changing column length

1 view
Skip to first unread message

Bob Ross

unread,
Jan 23, 2004, 2:28:04 PM1/23/04
to
I have a SQL server database that I need to change. Are
there any tools that would allow me to change a
particular text column in a table from 50 characters to
60 characters in length (other than Enterprise Manager)?
Is this a change to the database schema? Thanks.

Carlos Eduardo Rojas

unread,
Jan 23, 2004, 2:37:51 PM1/23/04
to
Take a look at ALTER TABLE in books online. You need to run something like:
ALTER TABLE table_name ALTER COLUMN column_name VARCHAR(60)

--
Carlos E. Rojas
SQL Server MVP
Co-Author SQL Server 2000 Programming by Example


"Bob Ross" <anon...@discussions.microsoft.com> wrote in message
news:2c8d01c3e1e7$05efea50$a301...@phx.gbl...

Bob Ross

unread,
Jan 25, 2004, 2:43:27 PM1/25/04
to
Thanks! I appreciate the information. I have already
tried that and because it is a linked table (residing on
a MDSE2000 DB) I can not do that from Access. I need to
reach out and change the table directly the DB. I hear
that I can do that with Enterprise Manager, but how else
can I do it? Thanks for your help.

Bob Ross

>.
>

Carlos Eduardo Rojas

unread,
Jan 26, 2004, 8:58:57 AM1/26/04
to
If it's MSDE you should be able to connect to it using query analyzer and
use the T-SQL command I mentioned earlier.

--
Carlos E. Rojas
SQL Server MVP
Co-Author SQL Server 2000 Programming by Example


"Bob Ross" <anon...@discussions.microsoft.com> wrote in message

news:436a01c3e37b$80612ac0$a601...@phx.gbl...

Hari Prasad

unread,
Jan 26, 2004, 9:59:15 AM1/26/04
to
Hi,

If it is MSDE , use OSQL from command prompt.

OSQL -S Servername -U login -P password -d dbname -Q "Alter table tablename
alter column datatype(xxx)" -o c:\out.txt

Thanks
Hari
MCDBA


"Carlos Eduardo Rojas" <carl...@mindspring.com> wrote in message
news:#QrxMSB5...@TK2MSFTNGP12.phx.gbl...

0 new messages