How Do Salesforce Types Map to Database Column Types?

The following table describes how Salesforce column data types are mapped to database data types:

Salesforce Type H2 MySQL Oracle PostgreSQL SQL/Server
 ANYTYPE  CLOB  TEXT  NCLOB  TEXT  NVARCHAR(MAX)
 BASE64  CLOB  TEXT, MEDIUMTEXT, or LONGTEXT  CLOB  TEXT  VARCHAR(MAX)
 BOOLEAN  BOOLEAN  BOOLEAN DECIMAL(1) BOOLEAN  BOOLEAN
 COMBOBOX  NVARCHAR  VARCHAR  NVARCHAR2  VARCHAR  NVARCHAR
 CURRENCY  DECIMAL  DECIMAL  NUMBER  NUMERIC  DECIMAL
 DATACATEGORYGROUPREFERENCE  CHAR  CHAR  CHAR  CHAR  CHAR
 DATE  TIMESTAMP  DATE  TIMESTAMP(3)  DATE  DATE
 DATETIME  TIMESTAMP  DATETIME  TIMESTAMP(3)  TIMESTAMP  DATETIME
 DOUBLE  DECIMAL  DECIMAL  NUMBER  NUMERIC  DECIMAL
 EMAIL  NVARCHAR  VARCHAR  NVARCHAR2  VARCHAR  NVARCHAR
 ENCRYPTEDSTRING  NVARCHAR  VARCHAR  NVARCHAR2 VARCHAR  NVARCHAR
 ID  CHAR  CHAR  CHAR  CHAR  CHAR
 INT  INTEGER  INTEGER, DECIMAL, or BIGINT  NUMBER  INTEGER  INT or BIGINT
 MULTIPICKLIST  NVARCHAR  VARCHAR  NVARCHAR2  VARCHAR  NVARCHAR
 PERCENT  DECIMAL  DECIMAL  NUMBER  NUMERIC  DECIMAL
 PHONE  NVARCHAR  VARCHAR  NVARCHAR2  VARCHAR  NVARCHAR
 PICKLIST  NVARCHAR  VARCHAR  NVARCHAR2  VARCHAR  NVARCHAR
 REFERENCE  CHAR  CHAR  CHAR  CHAR  CHAR
 STRING  NVARCHAR  VARCHAR  NVARCHAR2  VARCHAR  NVARCHAR
 TEXTAREA  NVARCHAR  VARCHAR  NVARCHAR2  VARCHAR  NVARCHAR
 TIME  TIME  DATETIME  TIMESTAMP(3)  TIME  DATETIME
 URL  NVARCHAR  VARCHAR  NVARCHAR2  VARCHAR  NVARCHAR

Notes

  • The compound type ADDRESS is ignored but its data is picked up in component fields.
  • The compound type LOCATION is ignored but its data is picked up in its component Latitude and Longitude fields.
  • If the length of any string type column exceeds the “Maximum Varchar” parameter then its data type will be the same as used for BASE64 types.