Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Add Data To New Column?

forums forums SQLyog Using SQLyog Add Data To New Column?

  • This topic is empty.
Viewing 1 reply thread
  • Author
    Posts
    • #19519
      peterlaursen
      Participant

      You use SQL for this!

      Code:
      Update mytable set newcolomn = oldcolumn;

      or if you want to copy and add the suffix in one operation

      Code:
      Update mytable set newcolomn = concat(oldcolumn,'.suffix');

      NOTE: there is no WHERE in the statement.

      In SQL NO WHERE means EVERYWHERE. 😀

    • #19520
      golfguy
      Member

      Brilliant! (as the Guinness guys would say).

      I should have posted sooner. 😀 Thanks!

Viewing 1 reply thread
  • You must be logged in to reply to this topic.