Thanks.
My code is as below:
Statement Stmt = Conn.createStatement();
Stmt.executeUpdate("CREATE VIEW csclass AS SELECT SID FROM CSGRADE10");
But when ran it, I encounter an error:
SQLException: Error during query: Unexpected Exception: java.sql.SQLException me
ssage given: Syntax error or access violation: You have an error in your SQL syn
tax near 'VIEW csclass AS SELECT SID FROM CSGRADE10' at line 1
SQLState:S1000
VendorError: 0
What's the problem?
Thank you.
Hi Jamie:
Thank you for your help.
Could you please tell me what is "SQL*Plus session"?
I modified the code into:
Statement Stmt = Conn.createStatement();
Stmt.executeUpdate("CREATE VIEW csclass AS SELECT * FROM CSGRADE10");
The error message is the same:
SQLException: Error during query: Unexpected Exception: java.sql.SQLException message given: Syntax error or access violation: You have an error in your SQL syntax near 'VIEW csclass AS SELECT * FROM CSGRADE10' at line 1
SQLState:S1000
VendorError: 0
I am using MySQL.
Jack