Reputation: 1111
I have table "A" in Oracle and I have same table in SQL server, but the problem is that the column names in oracle are all capital and those of sqlserver are in camel case, So right now while doing JDBC from java, I have to write different queries for oracle and sql server for eg.
select NAME.ADDRESS,ID from A ---this is for oracle
select Name.Address,Id from A ---this is for sqlserver
so is there any way i can write a single query that would execute in both databases while using it in jdbc ? Thanks in advance.
Upvotes: 0
Views: 131
Reputation: 300
I agree with the solution given by @Elliott Frisch. This will be good or else you can use Unity JDBC. It automatically translate your query to the proper SQL dialect.
Hope this might help you
Thanks
Upvotes: 1