CoderZone.org

Category: >> mySQL >> Column copy with string replacement Bookmark and Share

<< lastnext >>

Snippet Name: Column copy with string replacement

Description: A mySql snippet to copy a column in a table to another column, with some string manipulation.
Create 'new_col' before executing this segment.

Comment: (none)

Author: CoderZone
Language: MYSQL
Highlight Mode: MYSQL
Last Modified: March 01st, 2009

UPDATE table SET table.new_col=REPLACE(table.old_col,'str2replace','replace_with_str');
 
 
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© coderzone.org | users online: 9