I would like my JDBC connection to not make queries that can make changes to the tables (insert, delete, update, drop). Is there any way to do this?
I would like my JDBC connection to not make queries that can make changes to the tables (insert, delete, update, drop). Is there any way to do this?
RebeccaMM,
SELECT
Use the following code to perform the above operations:
CREATE USER username IDENTIFIED BY password;
GRANT CONNECT TO username;
GRANT SELECT no schema.table TO username;
And use the username / password created above when getting the JDBC connection. If other parts of the application need to insert, delete, or update, they can use another connection, configured with the required permissions. Since you did not enter your database, check the compatible code for these operations.
I hope this helps ...
Good Luck!