0

I have a mysql table and some of the elements from the field, "title" have "( some text)". I want to remove the brackets portion of the text.

So

blah blah (blah) would turn into blah blah

How would I do this in SQL?

mu is too short
  • 413,090
  • 67
  • 810
  • 771
ehsangh
  • 271
  • 2
  • 6
  • 16

1 Answers1

0

you can use the replace function in MySQL

select replace(replace(title,'(', ''),')','') as  title
from table 

http://dev.mysql.com/doc/refman/5.5/en/string-functions.html#function_replace

COLD TOLD
  • 13,299
  • 3
  • 33
  • 51
  • what is element? I never defined it. I just want to update the table. How would i do this without using element? Thanks – ehsangh Jun 09 '12 at 03:20
  • @sanghan element, title or whatever you have is the name of the column you are selecting from – COLD TOLD Jun 09 '12 at 03:22