I am using sqlce and i have a table [accounts]. I was modifying the field [ondate] so that it can have Default GetDate.
My query is
alter table [accounts] ALTER COLUMN [ondate] datetime NULL DEFAULT getdate()
Token in error = DEFAULT
Here is the correct syntax
ALTER TABLE accounts ADD DEFAULT getdate() FOR [ondate]
It is always better to add a name to
ALTER TABLE accounts ADD CONSTRAINT DF_ONDATE_GETDATE DEFAULT getdate() FOR [ondate]