975646 wrote:Do you mean you have a column called PLZ?
I'd like to know how to update a value in my DB as mentioned in the subject. For example:
I have a row "PLZ" where the postal codes are in, now I want them to change as follows:
Old value: 12345Sure. Assuming PLZ is a VARCHAR2 column, and that there is room for 2 more characters:
New value: DE12345
Is there any possibility to do this with an update statement?
I'm just guessing you'll want the WHERE clause above. Without it, a row where plz was NULL would be changed to 'DE'. Including the WHERE clause above leaves those rows with NULL plz.
UPDATE table_x SET plz = 'DE' || plz WHERE plz IS NOT NULL -- If needed ;