Oracle text and format string mismatch resolution
Date-Time type for Oracle
Remember to use the To_date () method when inserting data into the date type of Oracle.
such as insert into Cuslogs (STARTTIME) VALUES (to_date (' 2009-5-21 18:55:49 ', ' yyyy/mm/dd HH24:MI:SS '));
Otherwise, the error will be: "The text does not match the format string."
Cracle Data types
CHAR |
Fixed-length strings |
Maximum length 2000bytes |
|
VARCHAR2 |
Variable-length strings , |
Maximum length 4000bytes |
Maximum length of index can be made 749 |
NCHAR |
Fixed-length strings based on character set |
Maximum length 2000bytes |
|
NVARCHAR2 |
Variable-length strings based on character set |
Maximum length 4000bytes |
|
DATE |
Date (Day - month - year) |
Dd-mm-yy (HH-MI-SS), after rigorous testing, no problem of thousand worms |
|
TIMESTAMP |
Date (Day - month - year) |
Dd-mm-yy (HH-MI-SS:FF3), after rigorous testing, no problem of thousand worms |
compared to DATE,TIMESTAMP has a decimal-seconds message |
LONG |
Super Long string |
Maximum length 2G, enough to store tome |
|
RAW |
Fixed-length binary data |
Maximum length 2000bytes |
can store multimedia image sound, etc. |
LONG RAW |
Variable-length binary data |
Maximum length 2G |
can store multimedia image sound, etc. |
Blob |
Binary data |
Maximum length 4G |
|
Clob |
Character data |
Maximum length 4G |
|
NCLOB |
Character data based on the character set |
Maximum length 4G |
|
BFILE |
Binary data stored outside the database |
Maximum length 4G |
|
ROWID |
Unique line number recorded in the datasheet |
10bytes |
. ****.**** format,* is 0 or 1 |
Nrowid |
Unique line number recorded in a Binary data table |
Maximum length 4000bytes |
|
Number (P,s) |
Number Type |
P is the integer digit,S is the decimal digit |
|
DECIMAL (P,s) |
Number Type |
P is the integer digit,S is the decimal digit |
|
INTEGER |
Integer type |
A small integer |
|
FLOAT |
Floating-point type |
Number (+), double precision |
|
REAL |
Real type |
Number (+), higher accuracy |
Oracle data types