update mytable set mycolumn = trim(mycolumn)
I am using above query where mycolumn is of type char.
It trims the leading blank but not trailing.
I tried update mytable set mycolumn = TO_CHAR (trim(mycolumn))
But it didn't help either.

Can anyone help here?

I think if the column type is a fixed char size, then the same will happen as is SQL Server: trailing blanks are added on insertion. The best way would be to TRIM when you select the data, or perhaps use a VARCHAR column type instead.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.