JSON Data Type - PostgreSQL to Oracle Migration

In PostgreSQL, the JSON data type allows you to store JSON data.

In Oracle, you can also use the JSON data type but it is available since Oracle 21c only. In earlier Oracle versions you can use VARCHAR2(4000 | 32767) or CLOB data types.

PostgreSQL:

  -- Sample table  
  CREATE TABLE items
  (
    name JSON
  );

Oracle:

  -- Sample table  
  CREATE TABLE items
  (
    name JSON
  );

SQLines Conversion

By default, SQLines SQL Converter uses JSON in Oracle. But if you define -tver=19 the JSON data type is converted to CLOB by default.

You can also use data type mapping to define the JSON data type conversion to any other data type, for example VARCHAR2(4000) or BLOB.

For more information, see PostgreSQL to Oracle Migration.