Journal Chacham's Journal: Oracle: CHAR-padding on compare with a larger literal & LIKE
There are a few Oracle blogs that cover the basics. A simple query to prove a point, test the boundaries, or review a basic action. Like Laurent Schneider's or Andrew Clarke's.
Andrew has an entry on CHARs. CREATE a TABLE using a CHAR(2) or higher, and query it with a literal. I thought that Oracle would only pad the literal until it matches the CHAR. Wrong! It pads the smaller value to the larger. What's the difference? If the literal has *more* spaces than the COLUMN allows. I though that would be an inequality, but Oracle pads the *TABLE's* value to match the literal before the comparison.
Then Laurent comments that with LIKE there is no such automatic padding, with *a historical note.
Kudos to those two.
---
*proudly leaving off the "n".
Oracle: CHAR-padding on compare with a larger literal & LIKE More Login
Oracle: CHAR-padding on compare with a larger literal & LIKE
Slashdot Top Deals