Changing rows?

Discussion in 'MySQL' started by redhits, Mar 7, 2010.

  1. #1
    Can i change/comute rows with an sql command?
    like
    change rowX with rowY ?
     
    redhits, Mar 7, 2010 IP
  2. killaklown

    killaklown Well-Known Member

    Messages:
    2,666
    Likes Received:
    87
    Best Answers:
    0
    Trophy Points:
    165
    #2
    why make 2 threads on the same thing? You cant move rows around using commands.
     
    killaklown, Mar 7, 2010 IP
  3. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #3
    Can you explain a little more what you need to accomplish?

    You can replace all the values in rowX with rowY. This wouldn't make much sense, since changing a row's key would have the same effect and would be much quicker.
     
    jestep, Mar 8, 2010 IP
  4. jakkevin4v

    jakkevin4v Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    using update commend.
    that syntax:

    update table_name
    set column_name = expression
    from table_name
    where search_conditions
     
    jakkevin4v, Mar 18, 2010 IP