when i try to using @Table(" \" Employee \" ") annotation , it generate the exception. there is following exception
Exception in thread "main" javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '" Employee " (name, salary) values ('Jimmy', 35000)' at line 1
without using escape character the employee table generate successfully, but i want to generate table name “Employee” .
Hibernate as an JPA implementation is not only technology in stack that affects how case sensitivity of database table names is handled. Capacities of database and how is set up do play crucial role.
In MySQL case sensitivity of table names is controlled via lower_case_table_names system variable. For example in Windows default is lowercase names an case insensitive comparisons. Also if operating system does not have case sensitive file system, consequence is that table names cannot be stored case sensitively.