CHAR Data Type - Sybase ASE to Oracle Migration

In Sybase ASE, the CHAR(n) data type stores fixed-length, blank padded character strings with the maximum size of @@pagesize bytes.

In Oracle, CHAR(n) can store up to 2,000 bytes.

Sybase ASE:

  -- Review the pagesize
  SELECT @@pagesize
  /* 2,048 */
 
  -- Sample table
  CREATE TABLE specs
  (
    note   CHAR(30),
    data   CHAR                       -- CHAR(1)
  );

Oracle:

  -- Sample table  
  CREATE TABLE specs
  (
    note  CHAR(30),
    data  CHAR                         -- CHAR(1)
  );

Overview

Conversion summary:

Sybase ASE Oracle
Syntax CHAR[(n)] CHAR[(n [CHAR | BYTE])]
Parameter n is the maximum number of bytes n is the maximum number of characters or bytes (default)
Range 1 ⇐ n@@pagesize (2KB, 4KB, 8KB or 16 KB) 1 ⇐ n ⇐ 2000 bytes
Default n is 1 n is 1

For more information, see Sybase ASE to Oracle Migration.