The difference between MySQL and Oracle sql language

date

Keyword the difference Oracle MySQL
Date Storage data format YYYY-MM-DD HH24:MI:SS YYYY-MM-DD
Support range '4712-1-1' to '9999-12-31' BC '1000-01-01' to '9999-12-31'
Datetime Storage data format no YYYY-MM-DD HH:MM:SS
Support range no '1000-01-01' to '9999-12-31'
TimeStamp definition Timestamp, the time difference from 1970-01-01 00:00:00 to the current time
Description If you add and subtract with a value, it will be automatically converted to Date type, and fractional seconds will be automatically removed YYYY-MM-DD HH:MM:SS

Reference link:
1.
https://www.cnblogs.com/wlzjdm/p/6953398.html 2. https://blog.csdn.net/qq_33573235/article/details/78154928

digital

Number Oracle MySQL
Number A general term for numeric values, which can represent all values ​​in Oracle type of data TINYINT -128->127 0->255u
SMALLINT -32768->32767 0->65535u
MEDIUMINT -8388608->8388607 0->16777215u
INT -2147483648->2147483647 0->4294967295u
BIGINT -9223372036854775808->9223372036854775807 0->18446744073709551615u
FLOAT(size,d) For decimal numbers with floating decimal points, specify the maximum number of digits to the right of the decimal point in the d parameter.
DOUBLE(size,d) For large numbers with floating decimal points, specify the maximum number of digits to the right of the decimal point in the d parameter.
DECIMAL(size,d) DOUBLE type stored as a string, allowing a fixed decimal point
Special Note xxxx(size) specifies the maximum number of digits in parentheses

Reference link:
1.https://www.cnblogs.com/little-rock/p/7542913.html

Guess you like

Origin blog.csdn.net/Cindy_00/article/details/106185565