List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:January 31 2006 5:22pm
Subject:Re: Type conversion from Mysql to Oracle
View as plain text  
Hi,

> First thank all you who replied to my question. I should be more specific
> with my question.
>
> In mysql database table, there is some thing like in the 'create table
> syntax':
>
>  fieldname enum('yes','no') default null
>
> and
>
>  fieldname datetime default null
>
> I have no idea about the first one.

ENUM is a MySQL specific type. I suggest you use a single
char in Oracle: CHAR(1) CHECK (VALUE IN ('Y', 'N') )
or a 3-char, value in 'YES', 'NO'.

>For the second, I am not familiar with
> the 'DATE' type in Oracle and its formatting. In the Mysql table, the
> format is like 'YYYY-MM-DD HH:MN:SS'.

Formatting is - largely - a client side issue.

> What I am doing is trying to duplicate all those tables from Mysql
> database into the Oracle database and I am trying to do that by writing a
> small java program. The issue I am facing now is that I need to get
> correctly the 'create table syntax' for Oracle and trying to keep the
> formats of each column as close as possible to that in the Mysql table.
>
> I couldn't find a FREE tool to do this from Mysql to Oracle (not the other
> direction). So I decided to write it up.

Well, our database developer IDE "Database Workbench" can do
a lot of this, for you - www.upscene.com - but it doesn't come for
free.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com

Thread
Type conversion from Mysql to OracleXiaobo Chen31 Jan
  • Re: Type conversion from Mysql to OracleMartijn Tonies31 Jan
    • Re: Type conversion from Mysql to OracleXiaobo Chen31 Jan
  • Re: Type conversion from Mysql to OracleSGreen31 Jan
  • Re: Type conversion from Mysql to OracleGleb Paharenko31 Jan
  • Re: Type conversion from Mysql to OracleMartijn Tonies31 Jan