You Asked
We are migrating from Db2 to oracle and in Db2 when you insert/update any value, Db2 automatically trim leading and trailing spaces. I want to know if we have any setting on column or table level in oracle that will automatically trim the values. I dont want to modify my query to use trim function.
Please suggest
and Connor said...
I havent used DB2 for a long time, but when I did, I'm pretty sure the *database* didnt automatically trim spaces from either front or end of fields.
If you inserted a string "HELLO..." (dots = spaces), then those spaces would be preserved. A quick google suggests this is still the case, because there are lots of posts about how to *remove* or *ignore* the spaces that have been stored in the (DB2) database.
Are you sure it is not a *tool* sitting in front of the database that is doing this ?
But to answer your question - I do not know of any automatic way that this occurs in Oracle.
Rating
(1 rating)
Is this answer out of date? If it is, please let us know via a Comment