I have a database Oracle 12 and query 'ALTER USER GISDPFB SET DEFAULT TABLESPACE DEV_MDS' Query is correct and i can execute it manually,but I can't to set parameters dynamically. My Code:
callableStatement = connection.prepareCall("ALTER USER ? DEFAULT TABLESPACE ?");
callableStatement.setString(1,"John");
callableStatement.setString(2,"SYSAUX");
callableStatement.execute();
I got 'java.sql.SQLSyntaxErrorException: ORA-01935: missing user or role name'
I guess this exception because of wrong syntax,but i have success when do it in console