Oracle: copy row while updating one field

后端 未结 3 1072
忘了有多久
忘了有多久 2021-02-07 12:53

Please note: I am asking the question I want answered. I know this question means the database is set up poorly. So I will vote down any answers that suggest changing

3条回答
  •  猫巷女王i
    2021-02-07 13:27

    Will this do it?

    INSERT INTO yourtable
           (SELECT name, col1, 'a'
              FROM yourtable 
             WHERE col2 is NULL);
    

提交回复
热议问题