Easy SQL Question

G

Guest

I can't get past this - I am inserting a record into a db and I keep getting
the same SQL SYNTAX ERROR MESSAGE. Below is the statement i am using with
test data. All fields in the database are text fields with no restrictions.

Syntax error in INSERT INTO statement.
INSERT INTO
Student(FIRST_NAME,MIDDLE_INITIAL,LAST_NAME,EMAIL,ADDRESS,ADDRESS1,CITY,STATE,ZIP,PHONE_HOME,PHONE_CELL,PHONE_WORK,FAX,PASSWORD,COUNTRY)
VALUES ('2', '3', '4', '5', '6', '7', '8', '9', '1', '2', '3', '4', '5', '6',
'7')
 
J

Jim Hughes

I suspect that PASSWORD is a reseved word.

Short term fix, try using square brackets, e.g. [PASSWORD].

Ideally, columns should not be named using words reserved by the database
engine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top