473,385 Members | 1,587 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

using modify table command

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
1 10074
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
3
by: Viken Karaguesian | last post by:
Hello all, Me again :>) Can I modify certain attributes in a style within a stylesheet? Example: I have a style sheet that looks like this: body { background-color: black; font-family: Arial;...
19
by: Kamilche | last post by:
I have looked at many object-oriented programming frameworks out there for C. Though the ideas presented are intriguing, and I've used some of them in my own work, they all suffered some drawback...
1
by: JH | last post by:
I have a comma delimited file and I want to export it to an MS access table already designed with appropriate field names. How do I do this programmatically using VB.NET or C#? Thanks for any...
5
by: Martin Bischoff | last post by:
Hi, is it possible to modify the values of a SqlDataSource's select parameters in the code behind before the select command is executed? Example: I have an SqlDataSource with a...
1
by: mailsatk | last post by:
Hello people! I am trying to do something that I don't know if anyone else might have tried before...I am writing a Macro in Excel that will give a user the list of all the folders present within...
4
by: Wannabe | last post by:
I am using ASP.Net 2.0 and have a gridview on my page. I have everything working except the delete command. The page reloads except the row I am trying to delete is still there. I believe it is...
0
by: savage678 | last post by:
Hi Everyone, I am new to this forum and am i dire need of some help. I am trying to use wildcard searches in infopath. I have it connected to an access database using data connection. I have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.