SQL to add column with default value - Access 2003

前端 未结 5 1356
悲&欢浪女
悲&欢浪女 2020-11-30 12:59

Updating an old ASP/Access site for a client - I need SQL to add a column to an existing table and set a default value. Doesn\'t work - any ideas?

This works fine

5条回答
  •  -上瘾入骨i
    2020-11-30 13:44

    Tools -> Options -> Tables/Queries -> (At the bottom right:) Sql Server Compatible Syntax - turn option on for this database.

    then you can execute your query:

    ALTER TABLE documents ADD COLUMN membersOnly NUMBER DEFAULT 0
    

提交回复
热议问题