Modifying a column in a table

前端 未结 2 1765
余生分开走
余生分开走 2021-01-23 10:57

I have the following table test

iD Name    ParentId   GroupID
-----------------------------
1            1        Null
2            1        Null
3         


        
2条回答
  •  盖世英雄少女心
    2021-01-23 11:38

    UPDATE test SET GroupID = 1 WHERE ParentId = 1
    UPDATE test SET GroupID = 2 WHERE ParentId = 7
    UPDATE test SET GroupID = 3 WHERE ParentId = 9
    

提交回复
热议问题