In Oracle to MySQL, VARCHAR2 (10) and number should be converted to why type?

Source: Internet
Author: User

I. VARCHAR2 (10) and number should be converted why type?

When Oracle turns into MySQL:
VARCHAR2 (10) can be turned into varchar (10)
Number depends on what type of data is stored in Oracle:
1, if the integer type, then MySQL, with an int can be;
2, if it is with a decimal place, then the numeric type is available in MySQL.

Note: MySQL does not have varchar2 (10) and number two data types

Two. Mysql varchar VS Oracle varchar2

MySQL and Oracle Do data synchronization. One of the fields in the table is set to varchar (6)in MySQL and varchar2 (6) in Oracle
But the data that can be stored normally in MySQL is synchronized to Oracle but holds Ora-12899:value too large for column error.
What is this for?

In MySQL, varchar (6) represents the ability to store 6 characters, 6 letters, or 6 digits.
Oracle VARCHAR2 (6) Represents a 6-byte storage. That is, the length of VARCHAR2 in Oracle represents the number of bytes rather than the number of characters.
One Chinese character in MySQL accounts for three bytes, and one kanji in Oracle accounts for two bytes.

Although MySQL varchar and orache varchar2 have the same length in the fields, they do not fit in Oracle.

Http://www.cnblogs.com/yangxia-test/p/4710250.html

In Oracle to MySQL, VARCHAR2 (10) and number should be converted to why type? Go

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.