Wednesday, 11 July 2012

SQL Error: 1064, SQLState: 42000:org.hibernate.exception.SQLGrammarException:

This problem happens when we use any kind of legal word as the name of the table or column. Here, the legal word means a word which is treated by hibernate in a different manner. For instance, if you user the word 'from' as the column name, the same error will occur because the word 'from' is used in the sql (select * from tablename). I advice you to change the column names.

So, it will be better if the reserved keyword is not used as the column name or table name......

One of my favourite java frameworks

Always happy to help you,  my profile in stackoverflow.com.

7 comments:

  1. Hey.. thanks for the gr8 information. I was stucked with this error for 1 week. thanks a lot :)

    ReplyDelete
  2. thank you for this useful information I got stuck for 4 hrs . thanks a lot

    ReplyDelete
  3. Thank you for the explain. It's very helpful! :)

    ReplyDelete
  4. Thanks a lot CV. I spent 2 days trying to solve this. I was using value and key as the names of of my columns. :)

    ReplyDelete
  5. Thanka a lot Visruth because i spend 2hours trying to solve that problem.. just am change the name of columns in DB. then it would be success

    ReplyDelete