创建用户配额条款缺失或无效选项

Create User Quota Clause missing or invalid option

在 DBeaver 或 sqplus 上执行此语句非常有效

CREATE USER flyway IDENTIFIED BY password 
DEFAULT TABLESPACE system  
TEMPORARY TABLESPACE system 
QUOTA 20M on system;

但是如果我像这样在 java preparedstatement 中使用它

Class.forName("oracle.jdbc.driver.OracleDriver");

    //step2 create  the connection object
    Connection con = DriverManager.getConnection(
            "jdbc:oracle:thin:@localhost:1521:xe", "myuser", "mypassword")

    //step3 create the statement object
    Statement stmt = con.createStatement();

    //step4 execute query
    stmt.executeUpdate("CREATE USER flyway IDENTIFIED BY password "+
            "DEFAULT TABLESPACE system  "+
            "TEMPORARY TABLESPACE system "+
            "QUOTA 20M on system;"
                            );

    //step5 close the connection object
    con.close();

它说 java.sql.SQLSyntaxErrorException: ORA-00922: 选项缺失或无效

现在,如果我删除“QUOTA 20M on system”,它就可以正常工作。但是那个配额是正确的语法所以我不明白为什么它会失败。为什么不能设置来自 java 的配额?

Alex Poole 是正确的 POSTGRES 驱动程序与 ;但是 Oracle 失败了,出现了没人能理解的错误