MySQL to Oracle

Hi there,

I am new to oracle and wish to have some helps here. Currently, I have query which convert the image file into the binary format before store into MySQL database.
Now, I need the image file to store into the oracle. I just want to make sure/ensure the differences of the query.

Here the query for MySQL:

strInsertQuery += formatObj.getHexForFile(formatObj.getDecodeBase64(arrVal.get(i).toString())) + ", ";

If I want to convert the image into the binary file into oracle db, can I use the same code as above or what changes I need to make
to get it work in oracle.

Thanks in advance

The code you posted as nothing to do with MySQL. So yes it would work with Oracle. But you don’t need to do that, you can store binary data as is. Use the blob for the column type.

As long as the column you are storing to isn’t truncating the data, it will be fine. The logic you have posted is from a server side language, it really doesnt matter where you’re storing the result and retrieving it from.