need to update .0 in database field

Discussion in 'MySQL' started by kcm4web, Jul 29, 2010.

  1. #1
    hi there

    i am in difficult situation pls help me.. i have 100 data in my sql table. i need to add ".0" in all the data. how can i do that? pls help

    e.g present data in field: 15

    update to 15.0

    thanks in advance
     
    kcm4web, Jul 29, 2010 IP
  2. avenir

    avenir Peon

    Messages:
    37
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    In mysql:

    update your_table set rec=concat(rec,'.0');

    Never tried that, tell me if ti works ;)
     
    avenir, Jul 29, 2010 IP
  3. kcm4web

    kcm4web Peon

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks it works like charm...
     
    kcm4web, Jul 29, 2010 IP
  4. Aba Deb

    Aba Deb Peon

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks helped me aswell :)
     
    Aba Deb, Jul 29, 2010 IP