0

trying to create table in Access2007.

CREATE TABLE user
(id Text(8),
last Text(25),
first Text(20),
class Text(10),
dob DateTime);

but table is not being created.

ERROR:
query must have at least one destination field.

Edited by hwoarang69

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by BitBlt
0

this is 2nd query to give it primarykey:

CREATE INDEX PrimaryKey
ON user(id) WITH PRIMARY

0

You may wish to consider using different column names, because I believe at least two of your choices are reserved words in the MSAccess SQL dialect.

As an alternative, you should enclose every column name (and probably the table name) in square brackets. This will force the Jet engine to interpret them as tokens rather than reserved words.

So, your query would look like this:

CREATE TABLE [user]
([id] Text(8),
[last] Text(25),
[first] Text(20),
[class] Text(10),
[dob] DateTime)

Hope that helps. Good luck!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.