Can jdbc be written once but run everywhere?

hi everybody,
i am using jdbc. Since for different databases, their sql statements are not exactly the same. So my jdbc program which is written for an Oracle database cannot run for a MySQL database. For example, in Oracle, i created a silly table like this:
CREATE TABLE hello (
id integer,
primary key (id) );
but in MySQL, in order to create the same table, i have to modify my sql statement like this:
CREATE TABLE hello (
id integer primary key );
So , if i create such a table in my jdbc program, i have to modify my codes so as to migrate my jdbc program from Oracle to MySQL. For a java programmer who wants his programs to be written once but run everywhere, this is not a beautiful thing.
I dont know if SUN has provided some technologies to avoid this dependence. Perhaps SUN has defined a unified sql for java(jsql?) and make the translation from jsql into special sql of different databases a task of jdbc drivers?
Heavy Z

Hi,
This is a simple one compared to the lazy way that MS decided to implement Access database and the sql code. The wildacard * does not work from java programs where you have to use the %.
Fortunately, maybe, standards are improving, but be aware that you may have to know silly discrepancies until there is proper standardisation.
This includes the different spellings between English and American too.
best
kev

Similar Messages

Maybe you are looking for

  • Can someone help me tell what Ram i need for my macbookpro 7,1

    please help my an tell me what speed and everything for my macbook pro7,1  13''   Model Name:          MacBook Pro   Model Identifier:          MacBookPro7,1   Processor Name:          Intel Core 2 Duo   Processor Speed:          2.4 GHz   Number Of

  • Enhancing performance of BLOB loading

    Hi, I am loading one row of BLOB data using DBMS_LOB Package. To load 5 GB of BLOB data its taking 8:53 Minutes. Due to some restriction in the target database, SQL *Loader can't be used. Is there any other option/method to fasten the performance of

  • Admin Services - Data Prep Editor: Save, Open, Open Data File - Hangs

    The problem is that whever I try to Open, Open Data File or Save while in Data Prep Editor, the Admin Console Hangs. It shows as Responding in the task manager, but the screen turns grey (hangs) and the admincon.exe process is constant at about 50% C

  • Own artwork not importing in iTunes

    When i try to import my own artwork into itunes the artwork does not appear. This is only a problem for tracks that were imported using v7.1.x and onwards of itunes. I have tried changing the file format for the tracks that I import but that doesn't

  • How do I permanetly save all my tabs so that each time I open firefox, I don't have to reo all my tabs?

    I have 4 tabs that I always use and I would like to know how I save them so that every time I open mozilla all 4 of those tabs are already there so that I don't have to manually create each new tab every time