Specify the dialect that uses the database when you configure Hibernate.cfg.xml:
Cases:
<property name="dialect">org.hibernate.dialect.MySQL5Dialect</property>
The following dialects correspond to each database (dialect):
Database |
Dialect (dialect) |
DB2 |
Org.hibernate.dialect.DB2Dialect |
DB2 as/400 |
Org.hibernate.dialect.DB2400Dialect |
DB2 OS390 |
Org.hibernate.dialect.DB2390Dialect |
PostgreSQL |
Org.hibernate.dialect.PostgreSQLDialect |
MySQL5 |
Org.hibernate.dialect.MySQL5Dialect |
MySQL5 with InnoDB |
Org.hibernate.dialect.MySQL5InnoDBDialect |
MySQL with MyISAM |
Org.hibernate.dialect.MySQLMyISAMDialect |
Oracle (any version) |
Org.hibernate.dialect.OracleDialect |
Oracle 9i |
Org.hibernate.dialect.Oracle9iDialect |
Oracle 10g |
Org.hibernate.dialect.Oracle10gDialect |
Oracle 11g |
Org.hibernate.dialect.Oracle10gDialect |
Sybase |
Org.hibernate.dialect.SybaseASE15Dialect |
Sybase Anywhere |
Org.hibernate.dialect.SybaseAnywhereDialect |
Microsoft SQL Server 2000 |
Org.hibernate.dialect.SQLServerDialect |
Microsoft SQL Server 2005 |
Org.hibernate.dialect.SQLServer2005Dialect |
Microsoft SQL Server 2008 |
Org.hibernate.dialect.SQLServer2008Dialect |
SAP DB |
Org.hibernate.dialect.SAPDBDialect |
Informix |
Org.hibernate.dialect.InformixDialect |
Hypersonicsql |
Org.hibernate.dialect.HSQLDialect |
H2 Database |
Org.hibernate.dialect.H2Dialect |
Ingres |
Org.hibernate.dialect.IngresDialect |
Progress |
Org.hibernate.dialect.ProgressDialect |
Mckoi SQL |
Org.hibernate.dialect.MckoiDialect |
Interbase |
Org.hibernate.dialect.InterbaseDialect |
Pointbase |
Org.hibernate.dialect.PointbaseDialect |
Frontbase |
Org.hibernate.dialect.FrontbaseDialect |
Firebird |
Org.hibernate.dialect.FirebirdDialect |
Database dialect in Hibernate (dialect)