Question:
I have a field called DATE and when I do a Query on the
table with the SQL Statement SELECT DATE FROM "tablename.db"
I get an error "Invalid use of Keyword. Token: DATA line 1"
What is the problem?

Answer:
Never name a Field "Date". Date is a Keyword in SQL and therefore
SQL statements that use the word in the wrong way will throw
this error.

5 Responses so far.

  1. Anonymous says:

    Never use a SQL reserved word in oyur sentences. But to solve this you can use an alias: SELECT DATE THE_DATE FROM "tablename.db"

Post a Comment

Thank you for your comment.

Any request and idea are welcome.

CLICK TO REGISTER