Default values when creating table in Access



Hello!

I want to create a table in Access with default values for the fields. The
code below runc nicely on a SQL Server but not in Access, any ideas?
If I run it in Access as a SQL command it says "Syntax error in Create Table
instruction" and marks out the first "DEFAUL" in the query.

Regards, Mikael

CREATE TABLE [Common](
[CommonLicenseNumber] varchar(50) NOT NULL,
[CommonCompany] varchar(50) NOT NULL DEFAULT '', <- Error here
[CommonComment] Text NOT NULL DEFAULT '',
[CommonChangeDate] datetime NOT NULL DEFAULT GetDate(),
CONSTRAINT [PK_Common] PRIMARY KEY
(
[CommonLicenseNumber]
)
)



.



Relevant Pages

  • Re: Default values when creating table in Access
    ... queries in the database but if you were to do it as an ADO query (or ... code below runc nicely on a SQL Server but not in Access, ... If I run it in Access as a SQL command it says "Syntax error in Create ... [CommonLicenseNumber] ...
    (borland.public.delphi.database.ado)
  • Re: Table Design Advice
    ... I will be creating db in SQL server though. ... MaterialCost (Currency) ... CONSTRAINT pk_products PRIMARY KEY, ...
    (microsoft.public.sqlserver.setup)
  • Re: Indexes and primary keys, from Delaney
    ... > One of the issues here is that the Primary Key is a logical concept, ... > constraint mechanism to define a set of columns as the PK, ... > asking SQL Server to enforce the uniqueness of the columns. ... >> SSN and account number, ...
    (microsoft.public.sqlserver.programming)
  • Re: Table Design Advice
    ... Are you sure you are using SQL Server? ... CONSTRAINT pk_products PRIMARY KEY, ...
    (microsoft.public.sqlserver.setup)
  • Re: Table Design Advice
    ... Are you sure you are using SQL Server? ... CONSTRAINT pk_products PRIMARY KEY, ...
    (microsoft.public.sqlserver.setup)