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.
Author |
Topic |
Serg
Starting Member
1 Post |
Posted - 2012-08-15 : 11:22:19
|
Hi all, I am new in SQL, so my problem is trivial. I try edit table:aalter TABLE [dbo].[pasta]( [derectives] [int] NULL, [sample] [nchar](20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [db] [real] NULL, [surename] [nchar](10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [result] AS ([sample]+[surename]) [capor] as ([derectives]*10)) ON [PRIMARY]And all the time get error:Msg 102, Level 15, State 1, Line 1Incorrect syntax near '('.Could you advise that is wrong??? |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2012-08-15 : 11:31:47
|
Change ALTER to CREATE. This syntax is incorrect for altering a table. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-08-15 : 11:52:31
|
if you want to alter table you should be using ALTER TABLE...ADDor ALTER TABLE...ALTER COLUMN based on your requirement------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|