Oracle insert character into a string
oracle
Solution
You would try something like:
Update Table_name set table_column = substr(table_column, 1, 3) || '_' || substr(table_column, 4);
The `SUBSTR` functions allows you to extract a substring from a string. The syntax for the `SUBSTR` function is:
SUBSTR( string, start_position, [ length ] )
`string` is the source string.
`start_position` is the position for extraction. The first position in the string is always 1.
`length` is optional. It is the number of characters to extract. If this parameter is omitted, the SUBSTR function will return the entire string.
Problem
I have this table of rows ``` RowA ______ ABC123 DEF432 WER677 JKL342 ``` how can I add a '_' in between the record using oracle to this? Assuming to add on the last 4 character. ``` RowA ______ ABC_123 DEF_432 WER_677 JKL_342 ```