Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unable to save table changes
Message
 
 
To
19/06/2009 16:01:31
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
Microsoft SQL Server
Category:
Database management
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01407266
Message ID:
01407289
Views:
33
>I looked at that link and I don't see the similarity. I have a Guid PK that I am not trying to change and I am only adding another column to the table. The column I am adding I have set to allow nulls so I can populate the column before trying to enable that. I do know *some* DDL, but I am primarily a programmer and don't do enough to keep up on the DB stuff. Can't do everything as much as I would like.
>Tim

The thing is that you need to do this in script - SSMS is restrictive by default installation. I haven't investigated how to change the settings.

Anyway, just create your commands in script - should not be that hard.

Look at ALTER TABLE ADD syntax in BOL.

http://msdn.microsoft.com/en-us/library/ms190273.aspx

See samples at the bottom

A. Adding a new column

The following example adds a column that allows null values and has no values provided through a DEFAULT definition. In the new column, each row will have NULL.
Copy Code

CREATE TABLE dbo.doc_exa (column_a INT) ;
GO
ALTER TABLE dbo.doc_exa ADD column_b VARCHAR(20) NULL ;
GO
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform