0

I'm trying to update an old Access database using SQL scripts, but I can't find the syntax for removing a default value from a column.

Is this possible in Access?

Jonathan Sayce
  • 9,359
  • 5
  • 37
  • 51

2 Answers2

2

Alter statements are not fully supported in Access and cause many headaches. You would be much better off if you open the database in access and edit the schema that way.

This question is a possible dupe SQL to add column with default value - Access 2003

Community
  • 1
  • 1
Brettski
  • 19,351
  • 15
  • 74
  • 97
1

I don't think the Access SQL is much different from the regular SQL syntax:

ALTER TABLE TableName
ALTER COLUMN ColumnName DROP DEFAULT
Matthew Jones
  • 25,644
  • 17
  • 102
  • 155
  • I forgot the ALTER COLUMN statement. Updated my answer. – Matthew Jones Jun 23 '09 at 13:54
  • Just read some of the answers to the question Brettski mentions and discovered the SQL syntax option - your statement works if you switch the database to SQL Server syntax mode, but not in Access syntax mode. – Jonathan Sayce Jun 23 '09 at 13:58
  • Yes, this syntax is only supported in ANSI-92 Query Mode (http://office.microsoft.com/en-gb/access/HP030704831033.aspx). – onedaywhen Jun 23 '09 at 14:22