I am executing the below query from my Java code:
SELECT * FROM JSTORE.EMPLOYEE
Where ‘JSTORE’ is the Schema name and ‘EMPLOYEE’ is the table.
Can I set the schema name to be used as JSTORE so that I needn’t specify it in my queries always? I am using Oracle databse.
If that schema name is the same as the user name your application is using to connect to the database, then you don’t need to specify the schema name (through Java or SQL*Lite).
If the schema name varies through the application, then I would probably have the schema name present in the SQL to avoid mistakes. Just think about what can go wrong if you ALTER SESSION in a connection pool. It can still be configurable and the process can be automated using some Java code to generate the SQL for you (which you probably should have anyway).