H2 Schema initailization. Syntax error in SQL statement

前端 未结 4 863
渐次进展
渐次进展 2021-01-05 01:06

I have a spring boot application and I trying to initialize some data on application startup.

This is my application properties:

#Database connection         


        
4条回答
  •  一个人的身影
    2021-01-05 01:52

    Try this code. Remove PRIMARY KEY(id) and execute it.

    CREATE TABLE IF NOT EXISTS `Person` (
        `id`         INTEGER  PRIMARY KEY AUTO_INCREMENT,
         `first_name` VARCHAR(50) NOT NULL,
         `age`        INTEGER  NOT NULL
    );
    

提交回复
热议问题