我有一个专栏Country-------CanadaIndiaUSAIndiaChinaCanada我想通过插入另一个名为M_U的列来更新此表,该列只能包含0或1如果国家多次出现=1如果国家只出现一次=0output-------Canada1India1USA0India1China0Canada1 最佳答案 这应该适合你:selecta.country,casewhenb.c>1then1else0endfromcountriesajoin(selectCountry,count(*)ascfromcountriesgroupb