我收到了不允许我创建表的错误。它说存在语法错误。
代码:
@Override
public void create() throws SQLException {
String sqlString = String
.format("create table %s(%s VARCHAR(20), %s VARCHAR(20), %s VARCHAR(50), %s VARCHAR(20), %s VARCHAR(5), %s VARCHAR(10), %s VARCHAR(20), %s VARCHAR(20), primary key (%s) )",
_tableName, ID, DESCRIPTION, STREET, CITY, PROVINCE, POSTALCODE, STOREPHONE, AUTOSERVICEPHONE, ID);
super.create(sqlString);
}
例外
Exception in thread "main" java.sql.SQLSyntaxErrorException: Syntax error: Encountered "VARCHAR" at line 1, column 133.
...