Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DEFAULT problems

Status
Not open for further replies.

MrSandman666

Programmer
Feb 5, 2001
54
0
0
DE
Hello everybody.
I'm trying to create a table in an Access database via SQL.

When I enter something like this, everything works fine:

CREATE TABLE tblExample (
id INTEGER PRIMARY KEY NOT NULL,
txtBla TEXT NOT NULL,
intFoo INTEGER NOT NULL
)

BUT when I enter this, I get a Syntax error.

CREATE TABLE tblExample (
id INTEGER PRIMARY KEY NOT NULL,
txtBla TEXT NOT NULL,
intFoo INTEGER NOT NULL DEFAULT 1
)

What am I doing wrong here? It should be possible to set a default value with Access, right?

Please help me with this one. I'm really stuck here.
Thanx in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top