How to remove repeating text in a column using SQL?

Discussion in 'MySQL' started by misohoni, Nov 17, 2011.

  1. #1
    In one of my DB columns I've got the .avi extension. How can I remove it from all rows in the column using SQL?

    Cheers
     
    Solved! View solution.
    misohoni, Nov 17, 2011 IP
  2. #2
    you can solve your problem with the assistance of Replace function of mysql.

    update table_name set field_name=replace(field_name, ,.avi)

    this statement works & you can easily solve your problem
     
    beven, Nov 17, 2011 IP
  3. misohoni

    misohoni Notable Member

    Messages:
    1,717
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    200
    #3
    brilliant thanks
     
    misohoni, Nov 18, 2011 IP