Geekpedia Programming Tutorials






Search and replace table field contents

On Thursday, September 18th 2008 at 11:18 PM
By Andrew Pociu (View Profile)
-----   (Rated 0 with 0 votes)
Advertisement
More MySQL Resources

The query below will replace all occurences of "Bob Loblaw Law Blog" found in the field "BlogName" field of the Blogs table. All instances of the string are being replaced, and the search is case sensitive. The function is also multi-byte safe.

  1. UPDATE Blogs SET BlogName = REPLACE(Blogs,'Bob Loblaw Law Blog','BLLB');

Digg Digg It!     Del.icio.us Del.icio.us     Reddit Reddit     StumbleUpon StumbleIt     Newsvine Newsvine     Furl Furl     BlinkList BlinkList

Rate Rate this Knowledge Base article
Comment Current Comments
There are no comments.

Comment Comment on this Knowledge Base article
Name: Email:
Message:
Knowledge Base Related Knowledge Base Articles
There are no related KB articles.

Comment Related Source Code
There is no related code.

Comment Related Tutorials
There are no related tutorials.

Jobs MySQL Job Search
My skills include:

Enter a City:

Select a State:


Advanced Search >>
Latest Tech Bargains

Advertisement

Free Magazine Subscriptions

Today's Pictures

Today's Video

Other Resources

Latest Download

Latest Icons