#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    Bahrain
    Posts
    10
    Rep Power
    0

    Question REPLACE value with another value ?


    I have an MySQl table with 47 tables on it

    every table has some rows with some data on it


    lets say in table called 'comments'

    and the row called 'userid'


    I want to change the value of 'userid' from lets say '65' to '44' in all rows in that table


    how can I do this ??

    I think I must use REPLACE
  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,732
    Rep Power
    4288
    update comments
    set userid=44
    where userid=65
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    Bahrain
    Posts
    10
    Rep Power
    0
    thanks it's works fine

IMN logo majestic logo threadwatch logo seochat tools logo