Efficient way to update all rows in a table

后端 未结 6 1959
执笔经年
执笔经年 2020-12-17 08:27

I have a table with a lot of records (could be more than 500 000 or 1 000 000). I added a new column in this table and I need to fill a value for every row in the column, us

6条回答
  •  醉话见心
    2020-12-17 09:13

    The usual way is to use UPDATE:

    UPDATE mytable
       SET new_column = 
    

    You should be able to do this is a single transaction.

提交回复
热议问题