Quick Search:
 
 mySQL: Column copy with string replacement Jump to:  
Category: >> mySQL >> Column copy with string replacement  

<< 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)

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

UPDATE TABLE SET TABLE.new_col=REPLACE(TABLE.old_col,'str2replace','replace_with_str');
 


 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org