Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Oracle vs postgreSQL data types

In this table is very useful at the time of  database migration  here  i differentiated between  oracle data type and postgreSQL data types 

Data Types

Data type mapping:

OraclePostgreSQL
1BFILEPointer to binary file, ⇐ 4GVARCHAR(255)
2BINARY_FLOAT32-bit floating-point numberREAL
3BINARY_DOUBLE64-bit floating-point numberDOUBLE PRECISION
4BLOBBinary large object, ⇐ 4G BYTEA
5CHAR(n), CHARACTER(n)Fixed-length string, 1 ⇐ n ⇐ 2000CHAR(n), CHARACTER(n)
6CLOBCharacter large object, ⇐ 4G TEXT
7DATEDate and timeTIMESTAMP(0)
8DECIMAL(p,s), DEC(p,s)Fixed-point numberDECIMAL(p,s), DEC(p,s)
9DOUBLE PRECISIONFloating-point numberDOUBLE PRECISION
10FLOAT(p)Floating-point numberDOUBLE PRECISION
11INTEGER, INT38 digits integerDECIMAL(38)
12INTERVAL YEAR(p) TO MONTHDate intervalINTERVAL YEAR TO MONTH
13INTERVAL DAY(p) TO SECOND(s)Day and time intervalINTERVAL DAY TO SECOND(s)
14LONGCharacter data, ⇐ 2G TEXT
15LONG RAWBinary data, ⇐ 2GBYTEA
16NCHAR(n)Fixed-length UTF-8 string, 1 ⇐ n ⇐ 2000CHAR(n) 
17NCHAR VARYING(n)Varying-length UTF-8 string, 1 ⇐ n ⇐ 4000VARCHAR(n) 
18NCLOBVariable-length Unicode string, ⇐ 4G TEXT
19NUMBER(p,0), NUMBER(p)8-bit integer, 1 <= p < 3SMALLINT
16-bit integer, 3 <= p < 5SMALLINT
32-bit integer, 5 <= p < 9INT
64-bit integer, 9 <= p < 19BIGINT
Fixed-point number, 19 <= p <= 38DECIMAL(p)
20NUMBER(p,s)Fixed-point number, s > 0DECIMAL(p,s)
21NUMBER, NUMBER(*)Floating-point numberDOUBLE PRECISION
22NUMERIC(p,s)Fixed-point numberNUMERIC(p,s)
23NVARCHAR2(n)Varying-length UTF-8 string, 1 ⇐ n ⇐ 4000VARCHAR(n) 
24RAW(n)Variable-length binary string, 1 ⇐ n ⇐ 2000BYTEA
25REALFloating-point numberDOUBLE PRECISION
26ROWIDPhysical row addressCHAR(10)
27SMALLINT38 digits integerDECIMAL(38)
28TIMESTAMP(p)Date and time with fractionTIMESTAMP(p)
29TIMESTAMP(p) WITH TIME ZONEDate and time with fraction and time zoneTIMESTAMP(p) WITH TIME ZONE
30UROWID(n)Logical row addresses, 1 ⇐ n ⇐ 4000VARCHAR(n)
31VARCHAR(n)Variable-length string, 1 ⇐ n ⇐ 4000VARCHAR(n)
32VARCHAR2(n)Variable-length string, 1 ⇐ n ⇐ 4000VARCHAR(n)
33XMLTYPEXML dataXML

Comments

Popular posts from this blog

PostgreSQL pgBadger

PostgreSQL Pgbadger Installation On Linux

How to configure Replication Manager (repmgr) ?

What's is the difference between streaming replication Vs hot standby vs warm standby ?

PostgreSQL Sequence