0
I wish my JDBC connection didn’t make queries that can make changes to tables (Insert, delete, update, drop). There’s some way this can be done?
0
I wish my JDBC connection didn’t make queries that can make changes to tables (Insert, delete, update, drop). There’s some way this can be done?
1
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 necessary permissions. As you did not inform your database check the code compatible for these operations.
I hope this helps...
Good Luck!
Browser other questions tagged sql jdbc
You are not signed in. Login or sign up in order to post.
I think it’s simpler to create a user who is only allowed to query in the database.
– rray
Which bank are you using?
– rray
True @rray, it’s even better to create a user in BD with access to queries only
– Wagner Soares