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 |
|
Chopsmum
Starting Member
38 Posts |
Posted - 2006-04-23 : 21:53:56
|
| hi guyscant find the prob, please helpALTER TABLE [dbo].[tblUserDetails] ALTER COLUMN [UserDetailRowGUID] [uniqueidentifier] set default newid()goerror:Incorrect syntax near the keyword 'default'.cm |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-04-23 : 23:19:44
|
You can't use ALTER COLUMN to define the DEFAULT value. Use CONSTRAINT insteadALTER TABLE [dbo].[tblUserDetails] ADD CONSTRAINT DF_UserDetails_UserDetailRowGUID DEFAULT newid() FOR [UserDetailRowGUID] KH |
 |
|
|
Chopsmum
Starting Member
38 Posts |
Posted - 2006-04-23 : 23:25:09
|
| KH you are a legend, thankyou. Im embarrassed that Im not learning fast enoughthankyoucm |
 |
|
|
|
|
|