Default values when creating table in Access
- From: "Mikael Lenfors" <mikael@xxxxxxxxxx>
- Date: Tue, 16 May 2006 20:30:26 +0200
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]
)
)
.
- Follow-Ups:
- Re: Default values when creating table in Access
- From: Michael Jacobs
- Re: Default values when creating table in Access
- Prev by Date: Re: Connection to Access Database Problem
- Next by Date: Re: Test Program Hangs after reading table
- Previous by thread: Re: Test Program Hangs after reading table
- Next by thread: Re: Default values when creating table in Access
- Index(es):
Relevant Pages
|