My Oracle Support Banner

Comparing Blank Padded Literals With CHAR Data Type Column (Doc ID 2066651.1)

Last updated on AUGUST 16, 2018

Applies to:

Oracle Database - Enterprise Edition - Version 8.0.6.0 to 12.1.0.2 [Release 8.0.6 to 12.1]
Information in this document applies to any platform.

Symptoms

The expression 'A'='A     '  (notice the padded blanks) is evaluated to be TRUE when i) literal text is used or ii) a column is used with data type CHAR.

But it is evaluated correctly when the data type is VARCHAR2.

 Example:

 

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.