Mysql: Replace and Update String di Table record

March 23, 2013 at 11:03 am Leave a comment

Ada situasi dimana record di dalam table yang punya banyak data harus di update, gunakan script ini untuk meng-replace dan update dalam waktu bersamaan:

UPDATE [tablename]
SET [fieldname] = REPLACE([fieldname], 'text to find', 'text to replace with')
WHERE [fieldname] LIKE '%text to find%'

Selamat mencoba 😀



Entry filed under: My self. Tags: .

Pandanganku: Tentang Para Motivator Journey of Virus di Sistem Operasi

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed

Because I Learn CI and Jquery

Twitter Updates

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

%d bloggers like this: