MySQL Forums
Forum List  »  Oracle

Re: Oracle to mySQL data types mapping
Posted by: Roland Bouman
Date: September 14, 2005 04:03PM

What MySQL version do you want to map to? MySQL >= 5.03's got some changes in that department.
MySQL Varchars can be up to 65532 bytes in length (so watch out for character sets that take more than one byte per character).
MySQL DECIMAL(P,D) and MySQL NUMERIC(P,D) are synonyms, and are now stored in binary format (not string as before). It now supports a precision (P) ranging from 1 to 64; it supports a maximum of 30 decimal digits (D). BTW, I'd use some INT variant when you dont plan on using the decimal digits.
I don't know what the requirments are for your Oracle REALs and DOUBLE's, but is seems to me that you could use MySQL FLOAT or DOUBLE in some cases.
Oracle BLOBS would map to MySQL LONGBLOB, and NCLOB would map to LONGTEXT
RAW and LONGRAW up to 65532 bytes could be mapped to VARBINARY(L)

see:
http://dev.mysql.com/doc/mysql/en/column-types.html
and:
http://dev.mysql.com/doc/mysql/en/precision-math-decimal-changes.html

Options: ReplyQuote


Subject
Views
Written By
Posted
33718
September 11, 2005 07:58PM
Re: Oracle to mySQL data types mapping
8371
September 14, 2005 04:03PM
6478
September 14, 2005 04:27PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.