I am porting my database from MySQL to SQLServer. I am having problem when during startup the tables are created and i get syntax error. As below
SEVERE: Unsuccessful: create table ANSWER (AID bigint not null auto_increment, ANS varchar(255), NUMBER integer, QID bigint, primary key (AID)) type=InnoDB Jan 12, 2011 1:25:28 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute SEVERE: Incorrect syntax near 'auto_increment'.
I tried to run the above SQL directly in MsSQLServer and got the syntax error regarding auto increment.
The code used to work perfectly fine in MYSql.
@Entity
@Table(name = "ANSWER")
public class Answer implements Identifiable<Long>, Serializable, Comparable<Answer> {
@Id
@Column(name = "AID")
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
Thank you.