Copy data from one field to another on every row

前端 未结 1 1804
梦谈多话
梦谈多话 2021-01-13 11:10

So I\'ve got:

id    number
 1      0
 2      0
 3      0

Is there a sql statement to copy everything from id into number?

I\'m abou

相关标签:
1条回答
  • 2021-01-13 11:56

    You can use an update statement and reference the columns. Just do the following:

    update mytable set number = id
    

    That sets number equal to id on each row. Enjoy!

    0 讨论(0)
提交回复
热议问题