Help Center/
GaussDB/
Service Overview/
Compatibility with MySQL Databases/
Centralized Instances/
MySQL Compatibility in M-Compatible Mode/
Data Types
Updated on 2024-11-11 GMT+08:00
Data Types
The data types of GaussDB are the same as those of MySQL in most function scenarios, but there are some differences.
- Unless otherwise specified, the precision, scale, and number of bits of some data types cannot be defined as floating-point values. You are advised to use valid integer values.
- The command output of GaussDB ends with \0. MySQL displays the entire character string. Therefore, GaussDB truncates the bytes after \0, but MySQL does not.
-- GaussDB m_db=# SELECT FORMAT(1000, 4, 'bg_BG'); format -------- 1 (1 row) m_db=# SELECT CONCAT('123', b'00000000', 'aa'); concat -------- 123 (1 row) -- MySQL mysql> SELECT FORMAT(1000, 4, 'bg_BG'); +--------------------------+ | FORMAT(1000, 4, 'bg_BG') | +--------------------------+ | 1 000,0000 | +--------------------------+ 1 row in set (0.01 sec) mysql> SELECT CONCAT('123', b'00000000', 'aa'); +----------------------------------+ | CONCAT('123', b'00000000', 'aa') | +----------------------------------+ | 123 aa | +----------------------------------+ 1 row in set (0.00 sec)
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot