This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes MqSQL to Oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "MqSQL to Oracle" Watch "MqSQL to Oracle" New topic
Author

MqSQL to Oracle

Chuan Ren
Ranch Hand

Joined: Aug 04, 2003
Posts: 42
I have a small program that uses mySQL and I am thinking to move it to Oracle. There are a few conversion issues and I appreciate your input and suggestions:
1. In mySQL there is auto_increment function but not in Oracle 9i. In my JSP sql (that uses mySQL) I could have just use
insert into t_emp (id, name) value ('', 'Joe Black');

In oracle I uses sequence and the sql looks like:
insert into t_emp values (emp_seq.nextval, 'Joe Black');
How could I use just 1 type of sql for both databases?
2. If I use NOW() in the DATETIME in mySQL in some INSERT statement, what should I replace with in Oracle.
Actually, what is the best way to develop this type of program so that it could be deploy between mySQL(during development) and Oracle (production)?
Thank you.
Harry Lin
Greenhorn

Joined: Nov 10, 2003
Posts: 1
the answer of the second question

you can use sysdate to get the db's time
[ November 24, 2003: Message edited by: Harry Lin ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MqSQL to Oracle