How can I do for inserting a Default Value into a column of a table in Access? I use this instruction:
ALTER TABLE Tabella ADD Campo Double DEFAULT 0
ALTER TABLE Tabella ADD Campo Double DEFAULT (0)
ALTER TABLE Tabella ADD Campo DEFAULT 0
ALTER TABLE Tabella ADD Campo DEFAULT (0)
ALTER TABLE Tabella ADD Campo SET DEFAULT 0
ALTER TABLE Tabella ADD Campo SET DEFAULT (0)
but all of these cause error. How can I do for doing it?
From MSDN:
The DEFAULT statement can be executed only through the Access OLE DB provider and ADO. It will return an error message if used through the Access SQL View user interface.
Sooo... tell us more about what you're doing and how you're executing your SQL?
And why aren't you using the table designer?
See this answer?
SQL to add column with default value - Access 2003
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With