By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,939 Members | 1,541 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,939 IT Pros & Developers. It's quick & easy.

using modify table command

P: n/a
Hi All

Am new to sql server to sobear with me, have checked around but cant
find an answer to this.

I want to change fieldname from nvarchar(50) to nvarchar(255) as part
of a script

Am running this command :
ALTER TABLE MYTABLE MODIFY fieldname nvarchar(255) null

i test this out in the sql window but cant get it to run error is:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'MODIFY'.

Can anyone help ?
Nov 22 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Nov 22, 11:45 am, a...@excommerce.net wrote:
Hi All

Am new to sql server to sobear with me, have checked around but cant
find an answer to this.

I want to change fieldname from nvarchar(50) to nvarchar(255) as part
of a script

Am running this command :
ALTER TABLE MYTABLE MODIFY fieldname nvarchar(255) null

i test this out in the sql window but cant get it to run error is:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'MODIFY'.

Can anyone help ?
ALTER TABLE myTable ALTER COLUMN fieldname nvarchar(255)

Good luck!
J
Nov 22 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.